Iran has thrown its weight behind Syrian President Bashar al-Assad during Syria's three-year-old civil war and has also acknowledged sending military advisers to Iraq to help the Iraqi army in its battle against ISIL fighters.
However, it is not part of a U.S-led coalition carrying out airstrikes against the militants who control swathes of Syria and Iraq, and has cast doubt on Washington's reasons for launching the attacks.
The Iraqi and Syrian foreign ministers attended a conference in Tehran on violence and extremism, local media reported, taking advantage of the occasion to hold rare, three-way talks with their Iranian counterpart, Mohammad Javad Zarif.
"At the end of the meeting ... it was confirmed that communication and coordination would continue, especially in fighting Da'esh and Nusra and other terrorist organisations," Syrian state TV said, referring directly to the ISIL and Syria's al Qaeda offshoot.
"Iran has always stood by the Syrian and Iraqi people from the beginning to fight this threat. Our support will always continue," Zarif was quoted as saying."Peace conference"
The conference was inaugurated by Iranian President Hassan Rouhani, who warned about the menace violence and extremism pose to the world in his opening speech.
Rouhani said: "Governments should orchestrate policies to push aside extremist groups."
He proposed Dec. 18 as the World Day against Violence and Extremism. The date coincides with the anniversary of the UN General Assembly resolution approving the summit last year.
He said that now, more than ever before, it was imperative that the international community agree on ways to combat violent extremism and the wide-ranging problems it creates.
According to one of the participants, Jan Øberg, one of the main goals is to generate trust between countries by strengthening ties between communities and emphasizing common bonds and interests.
Øberg is a Danish peace researcher and head of the Swedish Transnational Foundation for Peace and Future Research, TFF.
He told the Anadolu Agency: "The West and Iran basically understand each other well and there are no anti-Western feelings per se in Iran. The opposite is the case - as any visitor has experienced. But Iran is an immensely resourceful country, and there can be no stability of peace in the Middle East without its participation."
One idea, he says, would be a truth and reconciliation commission under the auspices of the UN.
The main subject of the conference includes different ways to address the “global concern about the violent conditions in the contemporary world.”
At the conference on Tuesday, President Rouhani further stressed the importance of enhancing efforts "by all governments and peace-loving movements to optimize coordination, interaction, understanding, cooperation and zeal worldwide to fight violence and extremism."
The conference in Teheran was unanimously endorsed by the UN General Assembly on Dec. 18, 2013, stating that “all Member States (are) to unite against violent extremism in all its forms and manifestations, as well as sectarian violence.”
The resolution encourages efforts by leaders to discuss within their communities the causes of violent extremism and discrimination, and evolve strategies to address them.
It also recommends the promotion of community engagement in countering violent extremism.