Iranian President Hassan Rouhani said in a speech Saturday that he believes it is possible to conclude a comprehensive nuclear agreement with major world powers by a July 20 deadline.
Remaining differences could be settled through goodwill and flexibility, he said.
In the nuclear talks the main stumbling block has been the permissible scope of Iran's uranium enrichment. The lack of progress in bridging gaps has left the parties' deadline for a long-term settlement looking increasingly unrealistic and Iran has said a six-month extension may be necessary.
Rouhani also added that Iran stands ready to help Iraq's government in its fight against Sunni Muslim insurgents within the framework of international law, although Baghdad has so far not requested assistance.
Shi'ite Muslim Iran, which has strong leverage in Shi'ite-majority Iraq, is so alarmed by the Sunni jihadist advance from Iraq's north that it may be ready to cooperate with longtime arch-enemy Washington in helping Baghdad fight back.
A senior Iranian official told Reuters earlier this week that the idea is being discussed within the Tehran leadership. For now, officials say, Iran will send its neighbor advisers and weaponry, although probably not troops, to boost Baghdad.