Iran and Turkey must work with one another to root out the threat of extremism in the region, President Hassan Rouhani told his Turkish counterpart, the official IRNA news agency reported.
The two countries "should achieve a joint plan and a practical solution, with each other's help, for uprooting terrorism in the region," Rouhani told Recep Tayyip Erdogan in a Wednesday night telephone call.
"A consolidation and expansion of ties between Tehran and Ankara is of paramount importance to us," he said.
Nearly a year after a US-led coalition started air strikes against the Islamic State group, Ankara has launched a two-pronged offensive against the jihadists in Syria and Kurdistan Workers' Party (PKK) militants based in northern Iraq.
Turkey's strikes began two weeks ago after a series of attacks inside its territory including a devastating suicide bombing blamed on IS.
The security situation has since deteriorated, with several attacks blamed on PKK fighters in Turkey, including two on the Tehran-Ankara railway, leading to a suspension of the train route.
Signup to our newsletter and follow us on Facebook and Twitter!
Shiite Iran, an ally of President Bashar al-Assad, has urged Turkey to respect Syria's sovereignty in its bombing of IS targets.
"Any action that leads to the weakening of national governments can, in effect, encourage terrorist groups to fulfil their criminal actions," Iran's Foreign Ministry spokeswoman Marzieh Afkham said.
In his phone call, Rouhani also suggested Turkey should "coordinate" attacks with both Syrian and Iraqi governments.
"Any operation against terrorism necessitates the coordination with the countries' central governments," he said.
Erdogan for his part called for more collaboration in the fight against IS.
"Daesh is part of Al-Qaeda and the continuation of the operation of this terrorist group is dangerous for the Islamic world," he said, using an Arabic acronym for IS.
"Cooperation between Iran and Turkey in fighting the terrorist groups is of huge importance."