Iran celebrated Donald Trump’s midterm election defeat as regional mediators pushed for an interim deal to end the nine-month war. Mohsen Rezaei said, "The Iranian nation handed Trump a strategic defeat." While Tehran feels vindicated, leaders remain uneasy, fearing an unpredictable president might still launch a new, intense campaign.

Regional negotiators, led by Qatar, have stepped up efforts to broker an interim agreement between Washington and Tehran

As the scale of Donald Trump's stunning rebuke in the American midterm elections has become clear, Iran's leaders have not shied away from displaying their sense of schadenfreude.

"The Iranian nation handed Trump a strategic defeat on the battlefield and in the Hormuz -- and a political defeat in Washington," Mohsen Rezaei, Iran's top security official, boasted on X. "Anyone who takes on Iran will pay the price."

Ever since the US and Israel launched the war, one of Iran's prime aims has been to raise the economic and political costs for the American president -- and after the election results, the mood in Tehran's corridors of power was one of vindication.

"This is certainly a victory for Iran. A US that threatened to destroy Iran's civilisation can now see that we are standing tall," said Mohammad-Sadegh Javadi-Hesar, a reformist politician based in the holy city of Mashhad.

The sentiment in Iran was buoyed by an unlikely source -- even Trump's vice-president JD Vance concluded that "the reason we lost is the war".

For months, Iran has driven up global energy prices by attacking shipping in the Strait of Hormuz as well as targeting oil and gas facilities across the Gulf.

But given the US president's unpredictability and the fact he has two more years in office, the sense of celebration in Tehran is also an uneasy one.

With diplomatic efforts to broker an interim deal between Washington and Tehran struggling to break the deadlock, and the US naval blockade strangling Iran's economy, Iranian leaders and politicians believe the war, which is in its ninth month, is far from over.

Regional mediators, led by Qatar, have in recent weeks stepped up efforts to broker an interim deal between the US and Iran -- fearing that after the midterms Trump could launch a new, intense campaign against the republic.

Mediators have been pushing Trump to give diplomacy more time, with diplomats saying both sides want a deal. But significant gaps between the warring parties remain.

Both sides had been separately reviewing the latest suggestions from mediators aimed at bridging the gaps, a person briefed on the talks said.

There is also still the suspicion that an angry, vengeful Trump could strike out against Iran, possibly targeting its infrastructure, something he has been weighing.

Perhaps the strongest words of caution came from Iran's Supreme Leader Ayatollah Mojtaba Khamenei, who dismissed as a fallacy any hopes that shifts in US domestic politics would change the "behaviour of the hegemonic system".

He warned that the "slightest inclination towards surrender" would only embolden the enemy to launch further aggression.

"Those who harbour the slightest hope that partisan and factional shifts could result in a different approach or who imagine that by giving concessions to the US, they can make it abandon its hostility towards Iran, are seriously mistaken," the leader said in a written message on Wednesday.

Hostility and resistance to the US and Israel have been core characteristics of the republic since the 1979 Islamic revolution. On Wednesday, the day the American results were announced, regime loyalists gathered outside the abandoned US embassy in Tehran to celebrate the 47th anniversary of the hostage crisis that precipitated former President Jimmy Carter's political demise.

The regime, which believes it is in the midst of an existential battle for its survival, has repeatedly insisted it has a higher pain threshold than the US, even as its economic crisis is exacerbated by the war, tightening sanctions and the American blockade.

In the weeks leading up to the US midterms, Iran stepped up its attacks on tankers in the Hormuz, through which about a fifth of global oil and gas passed before the war.

Hamid-Reza Taraghi, a hardline politician, likened Trump's rebuke at the midterms to Carter's humiliating loss at the 1980 presidential election.

Taraghi hopes that Democrats controlling Congress can limit Trump's ability to keep pursuing the war by blocking funding for the conflict. But he added that Iran was wary the election loss might fuel Trump's "anger and make him seek a victory, even if short and only for a few hours".

"We believe our resilience is greater than that of the Americans and even the Europeans, who have now taken to the streets [in protests]," Taraghi told the FT. "Trump has no choice but to accept Iran's conditions. Iran is closing off his options one by one, with great patience."

Yet Iran experts caution that the republic could overplay its hand as it sticks to its demands to secure a favourable deal with Washington.

"There's a risk the Iranians might feel triumphant and ask for more, overestimating what the midterms really mean, and that will leave them in a stalemate," said Sanam Vakil, director of the Middle East and North Africa programme at Chatham House in London.

In negotiations through mediators, the two warring parties have been haggling over the details of a proposal based on a version of a seven-day plan presented by Iran in September

Under the proposal, Iran would allow shipping to move freely through the Strait of Hormuz if the US lifts its blockade on Iranian ports, allows Tehran to export oil, and grants it access to some of its frozen assets held overseas. The parties would then restart negotiations on a final deal.

But sticking points include the sequencing and the fate of Iran's 440kg stockpile of highly enriched uranium.

The US wanted Iran to agree to a schedule to allow International Atomic Energy Agency inspectors to visit its main nuclear facilities, which were bombed, a person briefed on the talks said. The stockpile is believed to lie beneath the rubble of those plants.

The Trump administration has also repeatedly insisted that Iran give up its stockpile, which is enriched close to weapons grade, and transfer it offshore. But Iranian officials publicly reject any such move.

Hamidreza Azizi, at Crisis Group, described Iran's conditions as "maximalist", noting the republic wants most of the US commitments frontloaded, while nuclear elements -- Trump's priority -- are deferred to the next stage.

"If the US agrees to those conditions, they would be willing to take that deal. But I don't see that, because that would be acceptance of defeat by the US," he said.

The danger was that a continued stalemate could push Trump towards another military escalation, he added.

But for now, senior Iranian officials have taken the moment to troll their American counterparts.

Replying to Vance's lengthy post on X, Mohammad Bagher Ghalibaf, Iran's main negotiator, said: "Losing gambler energy, can't walk away from the table."

He continued: "Skip the TED talk. Why not say this to your boss?"