Iraq feels it owes Iran a debt of gratitude for Tehran's support against IS. On Dec. 9, Iraqi Oil Minister Jaber al-Luaibi announced that Baghdad had signed an agreement to move the Kirkuk oil through Iran — which came as a major blow to Turkey. The agreement calls for pumping 30,000-60,000 barrels of oil daily to Kermanshah, Iran.

Turkey was pleased that Kirkuk was once again under Baghdad's control, particularly because of the 600-mile-long Kirkuk-Ceyhan pipeline. This line, with a daily capacity of 150,000 barrels, was being used only sporadically, and the flow halted altogether after the September referendum. After Baghdad took over Kirkuk, Turkey hoped the flow would resume and serve Turkey's economic interests — but it hasn't.

During the Islamic State (IS) offensive, the Kurdistan Regional Government (KRG) in Iraq recaptured Kirkuk in 2014. For three years, the KRG sold oil from Kirkuk via a pipeline running from there to the Turkish Mediterranean port of Ceyhan. But tension recently mounted in the region when the KRG held an independence referendum in September. In response, the Iraqi army marched on Kirkuk and with the support of the mostly Shiite, Iran-backed Popular Mobilization Units, captured the oil fields.

Since the British first discovered oil in Iraq at Kirkuk in the late 1920s, the struggle for its ownership has never ceased, although the players involved have changed. This lucrative oil source — whose ownership is claimed outright by both Kurds and Arabs, and partially by Turkey — is back in the news.

DIYARBAKIR, Turkey — The Kurds in Iraq are suffering from their loss of the lucrative Kirkuk oil fields , which the central government retook by force recently. What some people might not realize is, Turkey also has a lot to lose because of the change.

The deal could change many equations in the region.

Arez Abdullah, a senior member of the Patriotic Union of Kurdistan (PUK) party in the Iraqi parliament, and also chairman of the parliamentary Oil and Gas Committee, said Iraq is keen to develop its oil and trade relations with Iran. Abdullah noted that with this agreement, the existing Kirkuk-Ceyhan pipeline could become irrelevant and inoperative.

“This is going to affect Turkey badly. The Kirkuk-Ceyhan pipeline will remain for the time being. Iraq will assess its profits and may well abandon the Ceyhan line,” he told Al-Monitor.

Abdullah said the United States will not be pleased with the Iraq-Iran agreement. “But I don’t think it will openly come out against it, as the United States knows well the close economic, social and religious ties between the two countries,” he added.

Arzu Yilmaz, the chairman of the Department of International Relations at the American University of Kurdistan in Dahuk, said the agreement has diverse dimensions.

“Kirkuk is also the economic heart of Kurdistan. Iran, while dominating the Baghdad region economically, militarily and politically, could not extend its dominance to Kurdistan. With this agreement we can say that Iran has added Kurdistan to its sphere of influence, by controlling Kirkuk [through Iraq]. This deal will have repercussions also in the domestic politics of Kurdistan," Yilmaz told Al-Monitor.

She said, "The Kirkuk-Ceyhan pipeline has played a key role in economically strengthening the Kurdistan Democratic Party [KDP] rule. This pipeline had a significant role in developing economic and political relations with Turkey. Transiting the pipeline through KDP-controlled terrain profited the Kurdish authority. Now the [route could instead] traverse the areas controlled by the Gorran and PUK parties and may provide similar benefits to Yekiti-Gorran factions."

Yilmaz thinks that if a political settlement is reached in Syria's conflict, an oil route from Kirkuk to the Syrian port of Banias can be discussed, which would further marginalize Turkey in the regional economic structure. "Recent developments suggest that this is a likely option" that would isolate Turkey economically from Iraq, and Ankara is already isolated from Baghdad politically, she said. "After the 2014 IS offensive, Turkey was sidelined from the Iraqi political scene. An Iraq-Iran oil accord will mean some economic hardships for Turkey, but if a Kirkuk-Banias line is activated, Turkey would be totally isolated,” she added.

How will the United States react to Iran's growing influence in the region? Yilmaz noted that the United States and Iran have been quietly cooperating for a long time to combat IS. “Although the US president keeps making anti-Iran statements, US-Iran cooperation [against IS] in the Iraqi scene is obvious. The United States — which has serious issues with Turkey — is having problems abandoning Iran. While Turkey flirts with Russia, the United States discreetly continues to work with Iran,” she said.

In the tension that arose with the Kurdish referendum, Turkey chose to side with Baghdad instead of mediating. Turkey, which at one time had kept its distance from the Iraqi Kurdish market because of the Kurds' nationalist sentiments, had been slowly coming to dominate this market, particularly its oil segment. Iran’s latest move has at least partially challenged Turkey’s market domination.

If this becomes reality, then Turkey will be totally sidelined. Turkey, along with the United States, is slowly abandoning Iraq's political and economic scenes, leaving Baghdad to Iran. The biggest loser will again be the Kurds.