The UN nuclear watchdog could issue a report on its investigation into past Iranian research suspected of being linked to nuclear weapons development by the end of the year if Tehran cooperates, the agency's chief said yesterday.

"With cooperation from Iran, I think we can issue a report by the end of the year on the assessment of the clarification of the issues related to the possible military dimensions," International Atomic Energy Agency (IAEA) director-general Yukiya Amano told reporters.

Answering the IAEA's so-far unresolved questions about the possible military dimensions (PMD) of past Iranian nuclear research will be a condition for easing some sanctions on Iran if Tehran and six powers succeed in agreeing on an historic nuclear accord in Vienna, diplomats close to the talks say.

Amano was in Tehran on Thursday for meetings with Iranian President Hassan Rouhani and other top Iranian officials to discuss the stalled IAEA investigation into Tehran's past nuclear work.

He said that during his trip progress had been made in moving his investigation forward but more work would be needed, echoing a statement the IAEA issued on Friday.

Iran's foreign minister on Friday used a YouTube posting to say a comprehensive agreement over its nuclear programme has never been closer.

Javad Zarif said that the agreement would open new ways to address common challenges such as extremism in the Middle East.

US Secretary of State John Kerry agreed that they were "making progress" but said lots of work was still to be done. Negotiators are racing to meet a deadline for an agreement on 7 July.

Zarif also called for an end to "coercion and pressure" at the nuclear talks, in the video message on Friday

Iran is in talks with the United States and five other powers - Britain, China, France, Germany and Russia - on an agreement to curtail its nuclear programme for at least a decade in exchange for relief from economic sanctions.

All sides say a deal is within reach. But there are several difficult sticking points, one of which is the IAEA's stalled investigation into the PMD. Others include access to Iranian sites and the timetable for lifting sanctions.

The negotiators missed a June 30 deadline for a final agreement, but have given themselves until this week and foreign ministers not already in Vienna are due to return today for a final push.

Secretary of State John Kerry, Iranian Foreign Minister Mohammad Javad Zarif and Chinese Foreign Minister Wang Yi have remained in Vienna. Senior officials from Iran and the six powers have continued meeting to try to finalise an agreement.

US Energy Secretary Ernest Moniz and Iranian nuclear chief Ali Akbar Salehi also met yesterday, a US official said.

Western and Iranian officials said there were signs of a compromise emerging on one of the major sticking points: access to Iranian sites to monitor compliance with a future agreement.

Another potential compromise emerging relates to Iran's low enriched uranium stockpiles. Western and Iranian diplomats said Tehran was considering shipping most of the stockpile out of the country, something Tehran had previously ruled out.

Regarding the PMD issue, Western diplomats said they were not demanding a public confession that Iran had conducted research into building a nuclear warhead, but that the IAEA had to be satisfied it knew the full scope of past Iranian activity to establish a credible basis for future monitoring.