"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 canceled a trip to Africa to stay at the talks.
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.
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".
