Iranian Supreme Leader Ayatollah Ali Khamenei has admitted he made a mistake in allowing the country's foreign minister to speak to his US counterpart during negotiations that led to a 2015 international nuclear agreement.
International sanctions on Iran were lifted when the pact with world powers came into force in 2016, but the expected level of foreign investment to help revive the economy has never materialized.
Then this May US President Donald Trump pulled out of the agreement and is now reimposing US sanctions in stages.
Khamenei, who rarely admits in public to making errors, said he had done just that over the nuclear talks. "With the issue of the nuclear negotiations, I made a mistake in permitting our foreign minister to speak with them. It was a loss for us," he said.
The comments made by Khamenei, the highest authority in the country, were tweeted on Wednesday by the Khat-e Hezbollah newspaper, a weekly affiliated with his official website.
Khamenei made the remarks on Monday, but the newspaper said it was now quoting them due to inaccurate accounts published previously by other media.
Iranian Foreign Minister Mohammad Javad Zarif negotiated the deal with counterparts from six powers, including then US Secretary of State John Kerry.
Tehran undertook to curb its nuclear program in return for relief from the international sanctions which have been throttling its economy.
New US sanctions against Iran took effect last week, and Trump said companies doing business with the country will be barred from the United States.
Washington had said Tehran's only chance of avoiding the sanctions would be to accept an offer by Trump to negotiate a tougher nuclear deal.
Iranian officials, from Khamenei down, have rejected the offer. Vice President Eshaq Jahangiri said on Wednesday that the United States is trying to make Tehran surrender through the imposition of sanctions.
"The first priority for all of us under a sanctions situation is to work toward managing the country in a way that brings the least amount of damage to people's lives," Jahangiri said.
"America is trying by applying various pressures on our society to force us to retreat and surrender," the Iranian vice president continued.
The new sanctions targeted Iranian purchases of US dollars, metals trading, coal, industrial software and its auto sector, though the toughest measures targeting oil exports will only take effect in four months.
Few US companies do much business in Iran so the impact of sanctions mainly stems from Washington's ability to block European and Asian firms from trading there.
Iranian President Hassan Rouhani made similar comments to Jahangiri, although he did not specifically refer to the United States. "We will not let the enemy bring us to our knees...America itself took actions which destroyed the conditions for negotiation" Rouhani said.
"There were conditions for negotiation and we were negotiating. They destroyed the bridge themselves...If you're telling the truth then come now and build the bridge again" the Iranian president added.
The Iranian economy is beset by high unemployment and a Rial currency which has lost half its value since April. The decision to reimpose the sanctions could also make the economic situation worse.
Rouhani said the economy is the biggest problem facing the country.
Thousands of Iranians have protested in recent weeks against sharp price rises of some food items, a lack of jobs and state corruption. The protests over the cost of living have often turned into anti-government rallies.