Iran and major world powers were late Sunday closer than ever to a historic nuclear deal on the eve of a new deadline set at marathon talks in Vienna.
"We have come a long way. We need to reach a peak and we're very close," Iranian President Hassan Rouhani said in Tehran.
"We are so close that if you look down from below you feel as if we have got there, but when you do get there you know there are still some steps to take," the Iranian news agency ISNA quoted him as saying.
"I hope we are finally entering the final phase of these marathon negotiations. I believe it," said French Foreign Minister Laurent Fabius, who cancelled a trip to Africa to stay at the talks.
Iran's nuclear chief, Ali Akbar Salehi, told Iranian media that "technical negotiations were de-facto completed".
One remaining task was to re-read the entire document, which spans 100 pages, an Iranian diplomat told AFP.
"Sometimes a country demands that we change a word, sparking several hours of discussions because the meaning can change completely," he said.
The talks seek to nail down a deal curbing Iran's nuclear activities to make it extremely difficult for Tehran -- which denies any such goal -- to develop the atomic bomb.
In return Iran will be granted staggered relief from painful sanctions, although the six powers insist on the option of reimposing the restrictions if Tehran breaches the agreement.
But despite optimism early Sunday that a deal would be clinched during the day, the talks looked set to run into Monday, the latest in a string of deadlines in 16 days of talks in the Austrian capital.
A senior US State Department official said "major issues remain to be resolved in these talks."
Earlier, US Secretary of State John Kerry, embroiled in talks with his Iranian counterpart Mohammad Javad Zarif in Vienna since June 27, was cautiously upbeat.
"I think we're getting to some real decisions. So I will say, because we have a few tough things to do, I remain hopeful. Hopeful," Kerry said, calling his latest meeting with Zarif "positive".
Zarif later told journalists from the balcony of the hotel hosting the negotiations there was still "work to do" on Monday.
Asked whether the talks might be prolonged beyond the current deadline, he replied: "No extension. We finish, hopefully."
Signup to our newsletter and follow us on Facebook and Twitter!
EU foreign policy chief Federica Mogherini who chairs the P5+1 group -- the US, Russia, China, Britain, France and Germany -- negotiating with Iran said on Twitter that these were the "decisive hours".
Russian Foreign Minister Sergei Lavrov arrived back in Vienna to rejoin the talks, along with Moscow's top negotiator Sergei Ryabkov.
British Foreign Secretary Philip Hammond, however, left the discussions on Sunday but was expected to return on Monday morning.
- 'Time to decide' -
A German diplomatic source cautioned the talks "could yet fail."
"But we really are nearly there. The decisive moment has arrived. If Tehran is ready to take the final steps, then things can go very quickly," the source said late Sunday.
Under a framework deal reached in Lausanne in April, Iran is to slash the number of its centrifuges from more than 19,000 to just over 6,000 and sharply cut its stocks of enriched uranium.
Negotiators left the thorniest issues until last, including a mechanism for lifting interlocking EU, US and UN sanctions.
A new hurdle was thrown up in recent days, with the Iranian delegation insisting a UN arms embargo be lifted once a deal is reached.
The talks have also stumbled on demands to give UN nuclear inspectors access to military sites, to probe suspicions Iran sought to develop nuclear weapons in the past.
A final agreement would be a diplomatic victory for US President Barack Obama, who has made the talks a centrepiece of his foreign policy, and for Rouhani, a moderate seeking to end his country's diplomatic isolation.
Both have faced opposition from hardliners at home, as well as from Iran's arch-foe Israel, believed to be the Middle East's only nuclear-armed state, although it has never confirmed this status.
Saudi Arabia and other Sunni-ruled Gulf Arab states are also deeply suspicious of Shiite Iran, accusing it of fomenting unrest in Syria, Yemen and other flashpoints.