Turkish Prime Minister Recep Tayyip Erdogan is in Iran to bolster trade and energy ties, in an apparenrt bid to defuse tensions between the countries over Syria and capitalise on Tehran's diplomatic opening to regional rivals and the West.
Iran has been a strong strategic ally of Syrian President Bashar al-Assad since the start of the uprising against him, while Turkey has been one of his fiercest critics, supporting his opponents and giving refuge to rebel fighters.
Our relations with Turkey have entered a new phase and we hope this trend continues. Besides serving the interests of the two countries, we hope our dialogue [with Turkey] serve regional interests as well.
But Iran's election last June of President Hassan Rouhani, a relative moderate who says he wants to thaw the Islamic Republic's ties with the West, and shared concern over the rise of al-Qaeda in Syria, have spurred hopes of a Turkish-Iranian rapprochement.
Diplomats and government officials say both sides want to mend a relationship that could be pivotal to the fast-changing political map of the Middle East.
The United States believes detente between Turkey and Iran is important to wider stability in the Middle East, a strategic breakthrough Washington hopes to achieve from talks that world powers are pursuing with Tehran to curb its nuclear programme.
Erdogan met Iranian Supreme Leader Ayatollah Ali Khamenei on Wednesday, as well as Rouhani, whose foreign policy of "prudence and moderation" has eased Tehran's international isolation and revived contact with longtime arch-enemy Washington.
"Our relations with Turkey have entered a new phase and we hope this trend continues," Iranian Foreign Ministry spokeswoman Marzieh Afkham told reporters in Tehran.
"Besides serving the interests of the two countries, we hope our dialogue [with Turkey] serve regional interests as well.
"As two neighbours and Muslim countries, Iran and Turkey enjoy many commonalities and many cooperation opportunities."
Analysts said the main focus of Erdogan's visit was expanding economic cooperation, finessing any political disputes for now.
"Today we had a good chance to review bilateral ties," Erdogan said in remarks translated into Farsi by Iranian television as it showed him meeting Vice President Eshaq Jahangiri.
"I would like to mention specifically, and to express my satisfaction with, the agreement we signed in the preferential trade field," he said.
"It is obvious that we import from Iran crude oil and gas, which are strategic energy sources, and we [will be] able to increase the volume of these imports."
No details were immediately released about the three trade pacts, or Erdogan's meetings with Khamenei and Rouhani, who plans to visit Turkey within the next few months, according to Iranian and Turkish media.
Iranian officials say trade between the countries stood at $22bn in 2012, before dipping to $20bn in 2013, and that it should reach $30bn in 2015.