Major powers and Iran stretched marathon talks on Tehran's nuclear program into a second day past their deadline, with diplomats saying prospects for a preliminary agreement were finely balanced between success and collapse in the coming hours.
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 blew past the 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.
U.S. Secretary of State John 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," Fabius said upon his return.
"It's not done yet. We want a robust and verifiable agreement and there are still points where there needs to be progress especially on the Iranian side," he said.
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.
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 of Iran'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 enemies Iran and the United States since the Iranian revolution in 1979, but face skepticism from conservatives in both Washington and Tehran.
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.
After missing the March 31 deadline, the negotiators broke for a few hours rest in the early morning hours of Wednesday, with an air of disunity as delegations scrambled to get contradictory viewpoints across.
All sides have described the talks as fragile. Asked by a reporter later on Wednesday if collapse of the negotiations was a possibility, Germany's Steinmeier replied: "Naturally."
"Whoever negotiates has to accept the risk of collapse," he added. "But I say that in light of the convergence (of views) that we have achieved here in Switzerland, in Lausanne, it would be irresponsible to ignore possibility of reaching an agreement."
He said he would consider further travel plans on Thursday morning depending on how the talks develop. New proposals and recommendations were expected later on Wednesday, he said, but the onus was on Tehran to make them.
Kerry's spokeswoman Marie Harf said progress had been made but the sides had not reached a "political understanding".
Iran's Foreign Minister Mohammad Javad Zarif told reporters 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 told reporters.
But Iran expressed optimism that an initial agreement was within reach. So did Russia, which is closest to Iran among the powers.
Senior Iranian negotiator Abbas Araqchi told state television Tehran hoped to wrap up the talks on Wednesday evening. He added that he 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.