The United Nations atomic watchdog said its remaining inspectors in Iran have left the country, deepening the blackout over Tehran’s nuclear program just weeks after it was targeted by massive U.S. and Israeli airstrikes.

Earlier on Friday, a western diplomat, who asked not to be identified discussing sensitive information, said the inspectors had been withdrawn from the Islamic Republic because of a new law passed by Tehran that could potentially criminalize international nuclear monitoring. The withdrawal is likely to draw swift rebukes from Western governments, which have been urging Tehran to allow a resumption of IAEA visits since a ceasefire in the Israel-Iran war last month.

Instead, the Israeli decision to bomb nuclear sites and military targets on June 13 has effectively put up a barrier, ending oversight of whether Iran is capable of developing a weapons program.

The International Atomic Energy Agency said in a statement that all of its specialists safely left Tehran on Friday for Vienna, where the agency is based, adding that it was of “crucial importance” that discussions with Iran are resumed “as soon as possible.”

The IAEA’s decision to withdraw from Iran comes a day after Iranian Foreign Minister Abbas Araghchi said his country would continue cooperating with the agency, raising questions about the law’s range and legal status. According to the legislation, cooperation with IAEA has been suspended pending review in three months.

Since Israel started its attacks on Iran — which the U.S. joined on June 22 by dropping more than a dozen 30,000-pound bombs on some key nuclear facilities — its relationship with the IAEA and its Director General, Rafael Mariano Grossi, has deteriorated dramatically.

Iranian officials have accused the IAEA — and singled out Grossi — of being complicit in Israel’s attacks, claiming that his last report provided Israel with a pretext to bomb the Islamic Republic. Grossi has strongly denied the accusations.

Security concerns among a handful of inspectors who had remained in Tehran had increased in recent days, following Iranian calls to try to punish Grossi, according to a second official.

The IAEA monitors had already checked out of their official hotel and relocated to an undisclosed location, said the person, who asked not to be identified discussing private information. Their departure coincided with the first day Iranian airspace reopened to commercial flights in three weeks.

The 274 IAEA monitors accredited to conduct inspections had been verifying the location of Iran’s 902 pounds of near-bomb-grade uranium, which is now unknown.

It’s the first time since Iran began enriching uranium two decades ago that IAEA nuclear inspectors — who conducted almost 500 inspections in the Islamic Republic last year — have been forced to leave the country.

Tehran’s envoy in Vienna said the Israeli and U.S. strikes have caused irreparable harm to the nuclear Non-Proliferation Treaty, the international agreement that allows non-weapons states access to nuclear technologies in return for IAEA inspections.

While Iran has yet to leave the NPT, it can argue it’s legally entitled to suspend monitoring under provisions of the Vienna Convention on the Law of Treaties, which allows signatories to withdraw cooperation if their rights have been breached. It’s widely established internationally that attacks against nuclear facilities break legal norms.

Whether Iran’s legal arguments gain purchase at the IAEA or beyond may influence whether the ceasefire between the Persian Gulf nation and Israel holds. Fighting stopped on June 24 after 12 days, but neither side has ruled out resuming hostilities.

To help deter against a renewed assault, Iran could use uncertainty over the whereabouts of its highly enriched uranium to try to dictate events. For the U.S. and Israel to gain knowledge of the state and location of the stockpile, physical inspections and verification will need to be carried out, most likely via negotiated access for the IAEA.