Turkish President Recep Tayyip Erdogan and Iranian counterpart Ebrahim Raisi are both close to Hamas. AFP
Analysts believe that Raisi will pressure Turkish President Recep Tayyip Erdogan to move past the rhetoric and cut its blossoming trade and energy relations with Israel.
"Iran expects Turkey to end its direct and indirect trade with Israel," Istanbul's Centre for Iranian Studies director Hakki Uygur told AFP.
"Turkey, on the other hand, has taken an attitude that cares about separating political and commercial issues."
According to Palestinian figures, more than 15,000 were killed and 40,000 were wounded by Israeli airstrikes since 7 October - -- with more than two-thirds of them women and children.
Raisi's visit comes with efforts focused on extending a truce that has seen dozens of Israeli captives freed in return for the release of more than 100 Palestinian prisoners.
Iran and Turkey share a 535-kilometre (330-mile) border and a complex history of close economic relations and opposing views on regional disputes.
Turkey-backed rebel efforts to topple Iranian and Russian-backed President Bashar al-Assad during Syria's civil war.
Ankara's support for Azerbaijan's two victorious wars over Armenian separatists in Nagorno-Karabakh also created deep unease in Iran.
Tehran fears that Baku's resurgence in the Caucasus region could feed the separatist ambitions of Iran's large ethnic Azerbaijani minority.
Iran is also anxious about a proposed trade route running along its northern border between Azerbaijan and Turkey that could potentially complicate its access to Armenia.
"The most important conflict between Turkey and Iran was over the Caucasus and Karabakh," Ankara-based Iran expert Arif Keskin said.
"With the Gaza conflict, this issue was pushed to the back burner, but it still remains there as an important issue," Keskin told AFP.
The Turkish presidency said Erdogan discussed finding "a common stance against Israel's brutality" by phone with Raisi on Sunday.
Analysts believe that Iran is trying to calibrate the extent to which it uses its relationship with allies such as Hamas and Hezbollah in Lebanon to pressure Israel and the United States.
"Iran has been wary of intervening in the ongoing Middle East crisis and is likely to avoid any action that might escalate the conflict," the Eurasia Group said in a report.
"As Iran does not have total control over its allies, there is a risk that unintended actions bring US retaliation and escalate the conflict," it said.
Erdogan has also voiced repeated worries about the spread of war.
"Iran and Turkey will continue to work in unity to make the temporary ceasefire permanent and achieve permanent peace," Erdogan's office said after his call with Raisi.
*This story was edited by Ahram Online