International Atomic Energy Agency chief Rafael Grossi obtained the agreement in a last-minute trip to Tehran he called "constructive" before a meeting of his agency's 35-nation Board of Governors this week at which Western powers were threatening to seek a resolution criticising Iran for stonewalling the IAEA.
A resolution risked an escalation with Tehran that could kill the prospect of resuming wider, indirect talks between Iran and the United States on reviving the 2015 Iran nuclear deal, aimed at keeping Iran at arm's length from being able to develop a nuclear weapon if it chose to. It denies ever wanting to do so.
Those talks stopped in June, and Iran's hardline president, Ebrahim Raisi, took office in August. Western powers have urged Iran to return to negotiations and said time is running out as its nuclear programme is advancing well beyond the limits set by the deal, which Washington abandoned in 2018.
"This is not a permanent solution, this cannot be a permanent solution. This has always been seen, for me at least, as a stopgap, as a measure to allow time for diplomacy," Grossi told reporters at Vienna airport after his trip.
He added: "We managed to rectify the most urgent issue: The imminent loss of knowledge we were confronted with until yesterday. Now we have a solution."
The coordinator of the now-stalled nuclear talks, European Union political director Enrique Mora, said on Twitter that the agreement "gives space for diplomacy", adding it was crucial for the talks to resume as soon as possible.
The 2015 agreement introduced monitoring of extra areas of Iran's nuclear programme beyond those supervised under Iran's core legal obligations to the IAEA. Iran said in February it was abandoning that monitoring, which covers areas like the making of parts for centrifuges - the machines that enrich uranium.
Concerned that without monitoring of those areas, Iran could secretly siphon off unknown quantities of equipment and material that could potentially be used to make a nuclear weapon, Grossi had previously reached agreement with Tehran for it to keep servicing the equipment, although Iran later abandoned that too.
That equipment must be serviced every three months to make sure its memory cards do not fill up and there are no gaps in the monitoring. With three months having passed more than two weeks ago, the agreement came as time was running out.
Grossi stopped short of saying that so-called continuity of knowledge had been maintained but said the agreement gave the IAEA the technical means it needed.
"The reconstruction and the coming together of the jigsaw puzzle will come when there is an agreement at the JCPOA level, but at that time we will have all this information and there will not have been a gap," he said, referring to the 2015 deal by its full name, the Joint Comprehensive Plan of Action.
The servicing of the monitoring equipment will start "within a few days", Grossi said, adding that even cameras damaged and removed from a centrifuge workshop that was the victim of suspected sabotage in June would be replaced.
MORE PROBLEMS AHEAD
The agreement did little to resolve another issue between the IAEA and Iran - Tehran's failure to explain uranium traces found at three undeclared former sites. Grossi said Iran had invited him to return soon and he expected to meet the country's "highest authorities".
"This may take time. It's not heroic but it's much better than any alternative," he said of efforts to resolve that issue.
Diplomats said the United States and its European allies had not yet decided whether to seek a resolution against Iran at the IAEA Board of Governors meeting, which starts on Monday.
"Clearly a resolution is less likely now," one Vienna-based diplomat said.
While describing Iran's "concessions" on monitoring as "very modest," Eurasia Group analyst Henry Rome said "they will almost certainly be sufficient to avert censure at this week’s meeting."