Turkish President Recep Tayyip Erdogan is due to arrive in Iran on Wednesday to hold crucial talks with his Iranian counterpart Hassan Rouhani and Supreme Leader Ayatollah Ali Khamenei.on the outcome of the Iraqi Kurdish referendum and other regional security issues.
Erdogan's visit to Tehran comes as Ankara continues to seek regional consensus on how to block efforts by the Kurdistan Regional Government (KRG) to split from Iraq -- a move Turkey fears would have a domino effect on its own 15 million ethnic Kurdish population.
Ahead of Erdogan's visit, the Turkish foreign ministry announced on Tuesday that it wants Baghdad to take over from the KRG, the control of the border between Turkey and Iraqi Kurdistan.
OPINION: Is there really a Turkey-Iran rapprochement?
On Sunday, Erdogan told parliament members in Ankara that he expects to draw up an agreement with Iran, on how to respond to the KRG referendum.
Erdogan's visit to Tehran has been expected since August. But his original agenda focusing on military cooperation to fight the Islamic State of Iraq and the Levant (ISIL, also known as ISIS), and the establishment of a de-escalation zones in Syria, has since been overshadowed by a new regional crisis following the Kurdish referendum.
Turkish and Iranian analysts agree that while Erdogan's visit is important for both countries, Ankara has much more at stake on its outcome than Tehran.
From a military and security perspective, Erdogan's visit to Iran is "very important", as Turkey considers more sanctions on the KRG and its regional capital Erbil, including the shutting of its borders, said Sinem Koseoglu, Al Jazeera's Turkey-based correspondent and analyst.
She said Turkey could leverage its warming relations with Iran to put more pressure on the KRG to backtrack from its plan to declare an independent state.
On Monday, Erdogan dispatched Gen. Hulusi Akar, the military Chief of General Staff , to Tehran, the first ever visit for a top Turkish military official since the 1979 Islamic Revolution.
At their meeting, Akar and Iran's military chief, Mohammed Hussein Bagheri, condemned the Kurdish referendum as unconstitutional. In August, Bagheri also became the first ever top military official to visit Ankara since 1979.