TEHRAN, Iran — Iran’s President Hassan Rouhani claimed Saturday that the international sanctions regime against his country has crumbled and will not be rebuilt, while saying Tehran and Washington may work together to help Iraq fight insurgents.

Rouhani told a press conference Saturday that it is still possible to reach a comprehensive nuclear deal before a July 20 deadline and that his government will in any case remain committed to its policy of constructive interaction.

But, he said, “If we can’t reach a final agreement in negotiations by July 20… Conditions will never go back to the past. The sanctions regime has been broken,” Rouhani said.

Iran and the five permanent members of the UN Security Council plus Germany reached an interim deal in November that limited Iran’s uranium enrichment program in exchange for the easing of some sanctions.

Rouhani said Iran may consider cooperating with the United States in fighting Sunni extremist fighters in Iraq if Washington acts against them, adding Tehran had “no option but to confront terrorism.”

He was responding to questions of whether mutual interests in fighting terrorism could possibly bring together Tehran and Washington — traditional foes that have had no diplomatic relations in more than three decades.

“If we see that the United States takes action against terrorist groups in Iraq, then one can think about it,” Rouhani said at a press conference marking a year since he was elected president.

Rouhani suggested in a press conference Saturday that the Sunni militants who have seized cities in northern Iraq this week are linked to Iraqi politicians who lost in parliamentary elections held in April.

Iran has built close political and economic ties with postwar Iraq, and many influential Iraqi Shiites have spent time in the Islamic Republic. Iran this week halted flights to Baghdad because of security concerns and said it was intensifying security on its borders.

Rouhani said Iran will study any request for aid and was “ready to provide assistance within international law.”

Both Iranian and American leaders have separately pledged support for the government of Iraqi Prime Minister Nuri al-Maliki in fighting advancing fighters from the Islamic State of Iraq and the Levant (ISIL).

“We have said that all countries must unite in combating terrorism. But right now regarding Iraq we have not seen the Americans taking a decision yet,” Rouhani said, mentioning that problems in neighboring Syria have been made worse by Western support for rebels there.

The Times of London reported on Friday that Iran had already sent special forces to Iraq to help Baghdad.

According to the report the country sent a team of 150 elite Revolutionary Guard troops to advise Iraqi forces on matters of strategy and training.