CNN  — 

Iranian President Hassan Rouhani has dismissed US demands for the UN’s nuclear watchdog to inspect Iran’s military sites, saying in a televised interview that “we will not accept anything by force.”

His comments Tuesday were a response to demands by US ambassador to the United Nations Nikki Haley for the International Atomic Energy Agency to inspect military as well as nonmilitary sites in Iran, to check the country’s compliance with a deal that curbs Iran’s nuclear weapons program in exchange for the lifting of sanctions.

“It is regulations that determine our relations with the IAEA, not US pressure. I don’t think that the IAEA does anything under US pressure but if, hypothetically, this happens, we will not accept anything by force,” Rouhani said, according to a transcript of the interview published on his official presidential website.

Rouhani won a second term as president in May.

“We will not be the first to violate the agreement, but at the same time, we will not stand still if the other side does,” Rouhani said.

The Iran nuclear deal, or Joint Comprehensive Plan of Action (JCPOA), was an international agreement hammered out over 20 arduous months of negotiations. China, France, Germany, Russia, the UK, the US, the EU and Iran reached a deal in July 2015 and it was implemented in January 2016.

The IAEA has regular access to nuclear sites inside Iran and verifies that it is implementing its side of the deal; in exchange, the US, United Nations and European Union lifted nuclear-related sanctions. Every 90 days, the US President must certify that Iran is keeping up its end of the deal. Iran remains under multiple sanctions for terrorism-related activities.

President Donald Trump campaigned against the nuclear deal and continues to criticize it but, because Iran is complying, he has certified it twice on the advice of his national security staff. The next deadline to certify the deal is due in October.

Haley’s demand for increased access for IAEA inspectors in Iran came after she met last week with IAEA experts in Vienna, Austria.

“As good as the IAEA is, it can only be as good as what they are permitted to see,” she said Friday.

“Iran has publicly declared that it will not allow access to military sites. But the JCPOA makes no distinction between military and nonmilitary sites. There are also numerous undeclared sites that have not been inspected yet. That’s a problem.

“I have good confidence in the IAEA but they are dealing with a country that has a clear history of lying and pursuing covert nuclear programs, so we are encouraging the IAEA to use all the authorities they have and to pursue every angle possible with the JCPOA and we will continue to support the IAEA in that process.”

Haley has previously said that Iran is not complying with the “spirit” of the deal, pointing to Tehran’s activities in the region, including its support for Houthi rebels in Yemen and its backing of Syrian President Bashar al-Assad.

The country’s ballistic missile program and alleged state sponsorship of terrorism are two items not covered by the nuclear deal.

Iran’s Deputy Foreign Minister warned earlier this month that the US was undermining the Iran nuclear deal by imposing new sanctions on the country.

READ: John Bolton: Trump should cancel Iran deal

CNN’s Richard Roth contributed to this report.