Iran's President Hassan Rouhani said Monday that even if there is no comprehensive deal with the West on its nuclear programme by next month's deadline, neither side would walk away.
With discussions for a comprehensive agreement seemingly deadlocked, Rouhani's comments were the strongest signal yet that the long-running talks seeking an agreement will continue.
Rouhani said there was "no turning back" on the need for a deal but with the cut-off date of November 24 just 40 days away the reality was that further discussions may be necessary.
"Our will is that in 40 days the matter will be resolved but if other things happen and we are not able to solve all the problems, the two camps will find a solution," he said in a live interview on state television.
"We succeeded in a provisional agreement and we have a great task in reaching a final agreement. This problem has lasted 12 years and it cannot be solved in a few days, though we made positive steps."
Iran and the P5+1 group of nations (Britain, China, France, Russia, the United States plus Germany) signed an interim deal in January that gave Iran some relief from economic sanctions in return for curbs on its disputed nuclear programme.
But the road to a final deal has stalled since because of disputes on the extent of uranium enrichment Iran would be allowed to undertake and on the timetable for sanctions on the Islamic republic to be lifted.
Signup to our newsletter and follow us on Facebook and Twitter!
Iran insists its nuclear activities are entirely peaceful but the West has not yet accepted its assurances and believes Tehran's activities could mask the long-term military plan of building an atomic bomb.
"The world has accepted our nuclear programme and agreed that this issue should be resolved through negotiations and a win-win solution," Rouhani said.
Pointing out the economic benefits of a deal, the Iranian president said "hundreds of big companies were waiting to rush" to Tehran to cash in on what the energy-rich country had to offer.
Iran has the world's fourth largest crude oil reserves and, according to some estimates, the largest gas reserves, but international trade has been dramatically hit by nuclear sanctions imposed by the West.
Talks on the nuclear issue resume in Vienna on Wednesday with US Secretary of State John Kerry and EU foreign policy chief Catherine Ashton meeting Iranian Foreign Minister Mohammad Javad Zarif.
The US and Iran have spoken of big gaps between their negotiating teams.
Eight days of intensive talks at the end of September between Iran and the P5+1 group on the sidelines of the UN General Assembly in New York failed to make significant progress.
However, in his interview Monday, Rouhani said French President Francois Hollande said if there was a nuclear deal, the two countries would "interact" on nuclear matters, with France supplying "modern technology."