Vienna: Iran and six world powers re-launched talks on Tuesday to rescue prospects for a deal on Tehran’s nuclear activity by a July deadline, striving to prevent a long-time standoff from descending into a wider Middle East war.

With time running short if a risky extension of the nuclear talks is to be avoided, negotiators face huge challenges to bridge gaps in positions over the future scope of Iran’s nuclear programme in less than five weeks.

The talks, coordinated by European Union foreign policy chief Catherine Ashton, stumbled during the last round in mid-May. Both sides accused the other of lacking realism in their demands and French Foreign Minister Laurent Fabius said the negotiations had “hit a wall”.

Although such rhetoric may in part be a negotiating tactic, it also underlines how far the sides are from resolving a dispute that could unleash war in the region. Israel sees a nuclear-armed Iran as an existential threat and has in the past suggested it could carry out air strikes on its installations.

The powers want Iran to significantly scale back its uranium enrichment programme, denying it any capability to move quickly to production of a nuclear bomb. Iran denies any such ambition and demands that crippling economic sanctions, eased slightly in recent months, be lifted entirely as part of any settlement.

The sides also must resolve other complex issues, including the extent of UN nuclear watchdog monitoring of Iranian nuclear sites, how long any agreement should run and the future of Iran’s planned Arak research reactor, a potential source of plutonium for atomic bombs.

“We don’t have illusions about how hard it will be to close those gaps, though we do see ways to do so,” a senior US official said on Monday, signalling the pace of diplomacy would intensify in the days and weeks ahead.

However, sounding a cautiously hopeful note after a bilateral US-Iranian meeting in Geneva last week, the official said that “we are engaged in a way that makes it possible to see how we could reach an agreement”. He did not elaborate.

In Tehran, Foreign Minister Mohammad Javad Zarif said: “If the other parties enter in negotiations with realistic views, the possibility of a final agreement exists. But if they act irrationally, we will act in accordance to our national rights.” Zarif, Ashton and the US delegation, led by Under Secretary of State Wendy Sherman and including Deputy US Secretary of State Bill Burns, held trilateral talks on Monday ahead of the start of formal negotiations on Tuesday.

US and Iranian diplomats also spoke about the rapidly deteriorating security situation in Iraq on Monday. A State Department official said any such talks would not touch on any military coordination between the long-time adversaries.

Both Washington and Tehran are alarmed by the rapid advance in Iraq of insurgents from the radical Islamic State of Iraq and the Levant (Isil), which is seeking to revive a mediaeval-style Islamic caliphate across much of Iraq and neighbouring Syria.

In a sign of warming relations between Iran and the West, Britain announced plans on Tuesday to reopen its embassy in Iran with an initially small presence 2 1/2 years after a mob ransacked its Tehran legation.

Britain is one the of six powers negotiating with Iran, alongside France, Germany, China, Russia and the United States.

Diplomatic sources have told Reuters that it is increasingly likely Iran will seek an extension of the talks deadline.

But Western officials insisted the focus remained on sealing the deal by late next month, noting that any extension must be agreed by all sides and would likely be short.

“If there is an extension it will be for a few weeks,” said a diplomat from one of the six powers. If a deal were really within reach the sides should not need six more months.

The seven states agreed on the July deadline to reach a comprehensive agreement as part of an interim deal on the decade-old nuclear stalemate in Geneva struck on November 24.

That accord — under which Iran suspended some sensitive nuclear activities in exchange for limited sanctions relief — allowed for a six-month extension if necessary for a settlement.

It would allow up to half a year more for partial sanctions waivers and restraints on Iranian nuclear activity as agreed in Geneva. To avoid open conflict with a hawkish Congress, US President Barack Obama would want lawmakers’ approval to extend.

An extension would have its perils. Analysts say both sides might come under pressure from hardliners at home to toughen the terms during this extra time period, further complicating the chances of a successful outcome.

This week’s talks are expected to last until Friday and resume some time next month ahead of the July 20 deadline.