Major powers and Iran negotiated into the early hours of Thursday on Tehran's nuclear program two days past their deadline, with diplomats saying prospects for a preliminary agreement were finely balanced between success and collapse.
The negotiations, aimed at blocking Iran's capacity to build a nuclear bomb in exchange for lifting sanctions, have become bogged down over crucial details of the accord, even as the broad outlines of an agreement have been reached.
After negotiators passed an original self-imposed deadline of midnight on Tuesday, they remained locked in talks through to the early hours of Thursday in the Swiss city of Lausanne.
"It is going to be long," said a senior diplomat.
Marie Harf, spokeswoman for U.S. Secretary of State John Kerry, said on her Twitter account that negotiators had stopped at 6.00 a.m local time (0400 GMT) for a break and would resume in a few hours.
Kerry and German Foreign Minister Frank-Walter Steinmeier said they would stay at least until Thursday in an effort to seal the "political" agreement, a milestone towards a final pact due by the end of June.
In a potentially hopeful sign, French Foreign Secretary Laurent Fabius returned for more talks after flying back to Paris the previous day because progress had been too slow.
"We are a few meters from the finishing line, but it's always the last meters that are the most difficult. We will try and cross them," he said on his return. "We want a robust and verifiable agreement and there are still points where there needs to be progress especially on the Iranian side."
One diplomat close to the talks said late on Wednesday that a deal could be announced within hours but had not yet been reached, and the talks could still fall apart.
Ministers and experts shuffled from meeting to meeting, but there appeared to still not be a breakthrough. There was no full ministerial session overnight.
"We are moving," a surprisingly refreshed Iranian Foreign Minister Mohammad Javad Zarif told reporters as dawn broke.
UNDER PRESSURE
Six world powers - the United States, Britain, France, Germany, Russia and China - aim to stop Iran from gaining the capacity to develop a nuclear bomb. Tehran wants to lift international sanctions that have crippled its economy, while preserving what it views as its right to nuclear technology for peaceful purposes.
The powers and Iran said they had moved closer, but both sides accused the other of refusing to offer proposals that would break the deadlock.
The talks - the culmination of a 12-year process - have become hung up on the issues ofIran's nuclear centrifuge research, details on the lifting of U.N. sanctions and how they would be re-imposed if Iran breached the agreement.
All sides are under pressure not to go home empty handed, but Washington reiterated on Wednesday it was willing to walk away if the sides couldn't agree on a preliminary framework. White House spokesman Josh Earnest told reporters in Washington: "the time has come for Iran to make some decisions."
The talks represent the biggest chance of rapprochement between Iran and the United States since the Iranian revolution in 1979, but face scepticism from conservatives in both nations' capitals.
Washington's allies in the region, especially Israel and Saudi Arabia, are also deeply wary of any deal.
Even if there is a preliminary deal, it will be fragile and incomplete and there is no guarantee of a final deal in the coming months.
CHAOS, DISUNITY
Late on Wednesday, Germany's Steinmeier said new proposals and recommendations were expected, but the onus was on Tehran to make them. He added he would consider further travel plans on Thursday morning depending on how the talks develop.
Zarif told reporters on Wednesday it was the major powers who must budge, not Tehran. "Progress and success of the talks depends on the political will of the other party ... and this is an issue they have always had a problem with," he said.
But Iran expressed optimism that an initial agreement was within reach, as did Russia, which is closest to Iran among the powers.
Senior Iranian negotiator Abbas Araqchi told state television that Tehran expected the parties to issue a joint statement declaring that "progress has been made in the talks and that we have come to a solution on key issues. We will have the solutions in written form."
Western officials questioned Araqchi's optimism.
"I think we have a broad framework of understanding, but there are still some key issues that have to be worked through," British Foreign Secretary Philip Hammond told the BBC.
A key goal of the talks for Washington is to impose conditions on Iran that would increase the "breakout time" Tehran would need to develop a nuclear weapon if it should decide to pursue one.