Iranian President Hassan Rohani has confirmed that Iran may collaborate with international forces against the Islamic State of Iraq and the Levant (ISIL), an extremist jihadist group that has carved out a part of Iraq and Syria for the establishment of its own state.

Rohani’s statement followed earlier reports by Reuters that a senior Iranian official had said that Iran may be ready to collaborate with the U.S. to help fight against the jihadist ISIL fighters.

That first report indicating that the Iranian leadership was mulling over the idea was rejected today by Marzieh Afkham, a spokesperson for Iran’s foreign ministry, who said Iran will only collaborate in an international framework aimed at peace in Iraq.

ISIL recently took over the Iraqi city of Mosel and parts of Western Iraq, including two cities near the Iranian border.

President Hassan Rohani said today that Iran would not send forces to Iraq but would consider any help within the bounds of international law.

The Iranian president called for the “practical and verbal” confrontation of terrorist groups by all countries. When he was asked if Iran would collaborate with the U.S. in fighting the Sunni insurgents in Iraq, he said: “We can consider it when and if the U.S. begins confronting terrorist groups in Iraq and elsewhere.”