Rouhani made the remarks in a meeting with Russian President Vladimir Putin on the sidelines of a summit of the Shanghai Cooperation Organization (SCO) in the Chinese port city of Qingdao on Saturday.
The Iranian president commended Moscow's leading role in the nuclear agreement, officially known as the Joint Comprehensive Plan of Action (JCPOA), which was signed between Iran and the P5+1 group of countries, including Russia.
"Based on the reports of the International Atomic Energy Agency (IAEA), Iran has fulfilled its commitments under the JCPOA," Rouhani said.
"After the US unilateral and illegal exit, Moscow has an important role in the reinforcement of the JCPOA and fulfillment of the opposite sides' commitments," he added.
US President Donald Trump announced on May 8 that Washington was walking away from the nuclear agreement, which was reached between Iran and the five permanent members of the UN Security Council - the United States, Britain, France, Russia and China - plus Germany, Presstv reported.
Trump also said he would reinstate US nuclear sanctions on Iran and impose "the highest level" of economic bans on the Islamic Republic.
Under the JCPOA, Iran undertook to put limits on its nuclear program in exchange for the removal of nuclear-related sanctions imposed against Tehran.
IAEA Director General Yukiya Amano on Monday reaffirmed the agency's accesses to all the required nuclear sites in Iran, and called on Tehran to ensure "timely and proactive cooperation" with inspections under the nuclear agreement.
"As stated in my latest report to the Board [of Governors], the agency has conducted complementary accesses under the Additional Protocol to all the sites and locations in Iran which we needed to visit," Amano said in his introductory statement to the first meeting of the IAEA's Board of Governors since the US pullout from the nuclear accord.
In a speech to a quarterly meeting of the Board of Governors in Vienna in March, Amano once again confirmed Iran's compliance with the nuclear agreement, warning that any collapse of the deal would be a "great loss."
"As of today, I can state that Iran is implementing its nuclear-related commitments … If the JCPOA were to fail, it would be a great loss for nuclear verification and for multilateralism," he said.
Iran, Russia to continue anti-terror fight: Rouhani
Elsewhere in his remarks, Rouhani said Iran and Russia should continue multilateral cooperation in the fields of security and regional issues.
"Cooperation between Iran and Russia in the fight against Daesh and other terrorist groups in the region has been effective and fruitful and such cooperation will be continued," the Iranian president said.
Putin stands up for JCPOA
The Russian president, for his part, criticized the US unilateral and illegal move to pull out of the nuclear agreement.
He said Russia would continue to hold talks with the other sides to support the nuclear accord.
Putin also stressed the importance of Tehran-Moscow consultations to promote regional stability and said the two sides would continue cooperation on regional issues, particularly the settlement of the crisis in Syria.
He further threw Russia's weight behind Iran's full membership in the SCO.
Iran is currently an observer member of the SCO, though it has long sought full membership.
The SCO was formed in 2001 in Shanghai by the leaders of Kazakhstan, China, Kyrgyzstan, Russia, Tajikistan, and Uzbekistan to curb extremism in the region and enhance border security.
The intergovernmental organization seeks to strengthen mutual trust and good neighborly ties between the member countries, contribute to regional stability and facilitate cooperation in different sectors, including political, trade, economic and energy issues.