Iran has agreed to allow U.N. nuclear inspectors into two sites where experts believe the regime may have kept undeclared nuclear material -- just as the U.S. is trying to rally the international community to take a tougher stance on the regime.

The International Atomic Energy Agency (IAEA) said in a statement that “Iran is voluntarily providing the IAEA with access to the two locations specified by the IAEA and facilitating the IAEA verification activities to resolve these issues.”

UN SECURITY COUNCIL REJECTS US MOVE TO 'SNAPBACK' IRAN SANCTIONS; TRUMP ADMINISTRATION PLEDGES TO KEEP GOING 

It said dates for the inspections had been agreed but did not say when. The breakthrough comes after Director General Rafael Grossi made his first visit to Tehran this week to urge the country’s compliance with the IAEA’s months-long calls for access to the sites.

The two sites are believed to contain undeclared nuclear material and were used in the early 2000s. Iran has been resisting giving access to inspectors long before signing the 2015 Joint Comprehensive Plan of Action (JCPoA), claiming the U.N. has no basis to inspect them.

Grossi said Wednesday that the outcome of his visit to Iran was “very important because the work of our agency was being interrupted. Our essential work for nonproliferation had found an obstacle, and we were having serious difficulties in overcoming this obstacle for many, many months.”

US FORMALLY MOVES TO RESTORE UN SANCTIONS ON IRAN, AS POMPEO PROMISES 'AMERICA WILL NOT APPEASE' 

The inspections come at a crucial time both for Iran and the JCPoA. The U.S. last week triggered a “snapback” mechanism in U.N. Security Council Resolution 2231 -- this would re-impose U.N. sanctions that had expired or were set to expire as part of the 2015 accord.

The U.S. left the deal in 2018 but claims to still have rights under 2231, which codified the JCPoA. It’s an argument that was rejected by the Security Council this week, but the U.S. intends to forge forward anyway.

Evidence of stored-up nuclear material would add fuel to the U.S. argument that Iran has not given up its nuclear ambitions and is not in compliance with its obligations to the international community.

CLICK HERE TO GET THE FOX NEWS APP

European allies have expressed concern about Iran’s non-compliance, but have not supported the U.S. move to snapback sanctions amid fears that it could lead to Iran departing the deal altogether.

Iranian President Hassan Rouhani, who on Wednesday met with the IAEA chief, said Grossi's visit had produced a “good agreement that can help for moving on a correct and proper path and achieve the final resolution of problems.”

The Associated Press contributed to this report.