Succinctly stated, Turkey’s relations with Iraq and Iran, (the largest of its numerous neighboring countries) have not been easy. To Turkish officials, the two countries have been a central source of regional instability since at least the Iran-Iraq war, which lasted from 1980-1988. While the relationship between Iran and Turkey has oscillated between cooperation and competition, security concerns have overshadowed Iraq-Turkey relations for a long period of time. From the vantage point in Ankara, the presence of PKK fighters stationed in the Qandil mountains (which at times have launched cross-border attacks on Turkey) justifies the perception that Iraq represents a security threat.
In the aftermath of the 2003 U.S. invasion of Iraq, Baghdad fell under heavy influence of both Washington and Tehran. Therefore, it was difficult for Ankara to establish relations with Baghdad independent of these two players. As the withdrawal of the U.S. from Iraq in 2011 left Iran as the primary actor calling the shots in Iraq, Turkey faced even greater obstacles in developing mutually beneficial relations with Baghdad. Contrasting positions regarding the Arab revolutions, particularly regarding Syria, put Iran and Iraq in opposition to Turkey. Simultaneously, Ankara viewed Tehran’s project to establish a ‘Shiite crescent,’ as a sectarian effort to isolate Turkey from the Arab world and the GCC in particular.
However, despite Ankara’s political disagreements with both Tehran and Baghdad, Turkey has worked to maintain a level of healthy economic/energy relations with both countries. Contextually, this is a typical Turkish policy whereby Turkish decisionmakers have historically favored the economy over politics, a trend that is very evident in the case of Iraq and Iran.
In 2012, when Ankara and Tehran were pursuing contrasting agendas in the region, the volume of trade between Turkey and Iran reached an all-time high of around $22 billion. The same increase has been seen in Turkish-Iraqi relations, during what was arguably an even more politically tense relationship. During the Nouri al-Maliki era when Turkey-Iraq relations suffered a severe deterioration due to al-Maliki’s sectarian policies and his proximity to the Iranian regime, bilateral trade still reached an all-time high of around $12 billion in 2013.
Fast forward to 2017, and Turkish relations with Iran displayed a relative relaxation that can be credited to three main factors. First, the Gulf crisis pushed Ankara to open up politically toward Iran in order to secure a fast and more economically-sustainable route to help Qatar overcome the Saudi-led blockade. Second, the Kurdish factor, (namely the KRG secession referendum and increasing security concern of the U.S.-supported YPG activities in Syria) opened a small window of opportunity between the two capitals to work on specific, common security-related issues. Third, U.S. pressure on Turkey and dual sanctions on Turkey and Iran demonstrably brought both countries closer together.
After the United States’ withdrew from the JCPOA in May 2018 and re-imposed sanctions on Tehran, Turkish officials initially refused to comply by determining to resist U.S. demands that it stop oil imports. Ultimately however, due to the fear of being sanctioned by the U.S., Ankara had no choice but to stop importing oil from Tehran. Still, it vowed to maintain its trade relations, and the two nations announced their aim to increase the volume of their bilateral trade to $30 billion in the coming years. 
Despite measures taken by both countries to minimize the effect of U.S. sanctions on their trade, 2018 figures evidence a decline in the overall volume of bilateral trade to around $9.3 billion, compared to the previous volume of around $11 billion. Furthermore, a September economic report shows that Iran posted its first trade deficit with Turkey in 18 months. If the current pace in bilateral trade is not changed, it is estimated that year-on-year trade between both countries would decline by 24.5 percent by the end of 2019. In this sense, sanctions on Iran continue to constitute a challenge for both countries.
To compensate for the oil coming from Iran, Turkey understandably had to look elsewhere, and Iraq emerged as a favorable alternative. Relations between Ankara and Baghdad witnessed a reset at the end of 2018 amid the election of Barham Saleh as the new President of Iraq, and the appointment of Adil Abdul Mahdi as the new Prime Minister. Both sides expressed a desire to turn a new page in their bilateral relations. Several bilateral visits between both countries’ leadership, namely the Iraqi President’s two visits to Turkey in five months, the Prime Minister’s visit to Ankara last May, and the Turkish Foreign Minister’s visit both Baghdad and Erbil last April have each signaled the rebuilding of diplomatic momentum.
As both countries attempt to avoid being caught in the middle of escalating U.S.-Iran tensions in the Gulf, the situation has created an opportunity to further promote joint political, economic, and security cooperation. After being put on hold for one year, the activities of the “Supreme Council for Strategic Cooperation” between the two countries are expected to resume work when Erdogan visits Iraq at the end of 2019.
Following the defeat of ISIS in Iraq, Turkey stressed that it would help Baghdad in its re-construction efforts. To that end, Ankara pledged to allocate $5 billion for the rebuilding efforts, making it the largest single supporter. Moreover, Turkey promised to expand the work of Turkish construction companies in the country.
Given the current situation, re-activating the Karkuk-Cihan oil pipeline is a strategic priority for Turkey.  Ankara is also looking for ways to provide Iraq with much needed electricity to help it avoid power shortages, especially during its brutal summers. On both sides, water security has always been an obstacle. To show Iraq that it is taking this file seriously, President Erdogan appointed Veysel Eroglu as a Special Representative to Iraq on water issues. Since this appointment, both sides have already drafted an action plan to address this water security issues.
In 2018, Turkey’s trade volume with Iraq reached roughly $13 billion. U.S. sanctions against Iran offered an opportunity for both sides to maximize their economic cooperation, and officials in each capital signaled their desire to raise this number to $20 billion. However, over the last few months, Turkish goods have been systematically banned in Iraq for what Turks believe are politically motivated reasons. Fingers are pointed toward Iran, as Tehran considers Ankara a competitor in Iraq and in the past has not spared any efforts to hinder Ankara’s capacity to cover the demands of the Iraqi market in Baghdad and the southern provinces.
This procedure will cast a shadow over attempts to strengthen relations between the two countries. In its worst case scenario, it might also affect already existing plans to open a new border gate, “Ovaköy.” The intention is that the gate will serve as an alternative to the KRG-controlled Habur-Ibrahim Khalil crossing, to stimulate cross-border trade between Turkey and the Turkmen-majority areas of northern Iraq. Moreover, Turkey and Iraq have long hoped to establish a railway connecting Mersin in Turkey, to Basra in Iraq, and then onward to the GCC states. Such a project would boost trade, tourism, construction and development between Turkey, Iraq and the GCC countries. However, Iran would not look favorably on any of these projects.
Recently, Iran has used its influence in Iraq to ease the implications of U.S. sanctions. The Iraqi government used to pay Iran around $2 billion annually for imported gas and electricity. The volume of trade between the two countries reportedly stood at around $13 billion. Just like Turkey and Iraq, the Iranian President expressed his desire to heighten the economic relations between his country and Iraq to $20 billion. Iran has also been using Iraq to smuggle oil using that falsely claims the oil is Iraqi.
The strong Iranian influence in Iraq, lack of trust between Turkey and Iran, in addition to the continued political disagreements between Ankara and Tehran over a range of regional issues including Syria, might hinder Ankara’s efforts to increase its relations with Iraq. In sum, complicated relations with both Iran and Iraq might be on track to continue, however, Erdogan’s upcoming visit to Iraq at the end of the year will test whether Iraq is serious about turning a new page with Turkey, or if Iran’s influence is stronger than its will to do so.
Dr. Ali Bakeer is an Ankara-based political analyst and researcher. He holds a Ph.D. in political science and international relations.
 Ali Bakeer, “Turkey’s Worries over Iran Sanctions,” Carnegie Endowment for International Peace. June 20, 2018
 Ali Bakeer, “العراق في حسابات تركيا الاستراتيجية والتوجهات المستقبلية,” AlJazeera Center for Studies, January 18, 2015
 Humeyra Pamuk, “Turkey stopped purchasing Iranian oil as of May: Turkish official,” Reuters, May 22, 2019
 “Turkey will continue to trade with Iran: Minister,” Hurriyat Daily News, Reuters. May 9, 2018
 “Iran-Turkey trade volume expected to reach $12 billion by March,” Mehran News. November 13, 2018
 “Turkey-Iran Economic and Commercial Relations,” Turkish Ministry of Foreign Affairs. Retrieved on October 29, 2019 from: http://www.mfa.gov.tr/economic-and-commercial-relations-with-iran.en.mfa
 “Iran posts first trade deficit with Turkey in 18 months: Report,” Press TV, September 5, 2019
 Maher Chmaytelli and Ahmed Hagagy, “Allies promise Iraq $30 billion, falling short of Baghdad’s appeal,” Reuters, February 14, 2018
 Karwan Faidhi Dri, “Iraq seeks alternative oil export route via Turkey amid Persian Gulf tensions,” Rudaw, August 28, 2019
 “تركيا: تشغيل خط أنابيب “كركوك-جيهان” أولوية استراتيجية” TurkPress, September 14, 2019
 Haydar Karaalp, “Turkey, Iraq to set up water resources center,” AA
 “Ankara eager to maximize economic ties with Baghdad in all areas,” Daily Sabah, June 21, 2019
 Bilge Nesibe Kotan, “Why is Iraq banning Turkish products?” TRT World, July 9, 2019
 “Turkey, Iraq look to open new border gate,” Hurriyet Daily News, August 8, 2018
 “Iraq plans to connect railway with Turkey,” Daily Sabah, July 30, 2019
 “Iraqis linked to Iran use money-laundering scam to beat US sanctions,” Arab News, August 1, 2019
 “Iraq sets up ‘loophole’ in US sanctions to buy Iranian power,” France 24, July 2, 2019
 “Rouhani says Iran ready to expand gas, power trade with Iraq,” Reuters, April 6, 2019
 Roslan Khasawneh, Ahmed Rasheed, and Ahmed Elumami, “Exclusive: How Iran fuel oil exports beat U.S. sanctions in tanker odyssey to Asia,” Reuters, March 20, 2019