The Mosul operation has made the predominantly Turkmen city of Tal Afar the latest focus of Turkey and Iran’s sectarian struggle for influence in post-Islamic State Iraq. Turkish President Recep Tayyip Erdogan has warned against allowing Iran-backed Shiite militias to liberate the city. He deployed troops to the Iraqi border to back up his words. Erdogan’s interest in Tal Afar is an extension of a domestic agenda to further consolidate his powers under an executive presidential system. The Turkish president knows that Iraq’s Turkmen are crucial to his political future – both for mobilizing nationalist sentiment at home and for burnishing his image as patron of Sunni Muslims abroad.

Iraq’s Turkmen are the remnants of centuries of Turkic migration to the region, particularly after the area came under the Ottoman Empire in the 16th century. Post-Ottoman, republican Turkey considered the Mosul area part of the Turkish “homeland” until 1926, when it agreed it would be part of British-controlled Iraq in return for part of its oil revenues. More recently, Erdogan fanned the flames of irredentism by floating the idea of a “Greater Turkey” including Mosul and other neighboring territories.

Iraq’s Turkmen are estimated to number anywhere between 500,000 to 3 million, making them the country’s third-largest ethnic group – comprising 1.3 to 7.8 percent of the population – after Arabs and Kurds. Like the Arabs (and to a lesser extent Kurds), the country’s Turkmen are religiously diverse: Roughly six in 10 are Sunni and the rest Shia. On top of that layer, local and tribal alliances have formed, cutting across sectarian lines. None of the major Turkmen organizations in Iraq, including the Turkmen Rescue Foundation – an advocacy group – and the Iraqi Turkmen Front – a political umbrella organization – represents a particular sect exclusively.

Turkmen ties with Ankara are complicated. While some welcome Ankara’s recent aid and cooperation, others cling to the belief that Turkey has abandoned them for decades. Ankara was relatively silent during the murder of thousands of Turkmen under Saddam Hussein’s rule and after. More recently, Turkey issued only a muted response to the Islamic State seizing Iraqi-Turkmen towns and committing massacres in Tal Afar, Amirli, and villages south of Kirkuk in June 2014. Thus, despite their linguistic and ancestral kinship with Turkey, most Iraqi Turkmen consider themselves part of Iraq.

Nonetheless, Ankara has refused to withdraw the hundreds of soldiers it has placed near Mosul since last year to train Sunni fighters against the Islamic State, despite calls from Baghdad to do just that. Erdogan fears a refugee flow to Turkish borders: Despite his brazen use of Syrian refugees as a bargaining chip with the European Union, the Turkish president is feeling the economic and security pressures of hosting almost 3 million refugees from Syria and Iraq. More important, Ankara is worried about the growing presence of the outlawed Kurdistan Workers’ Party (PKK) in nearby Sinjar, as well as increased Iranian influence along its border in northern Iraq. Ultimately though, Erdoğan casts himself as the protector of Turkey’s ethno-cultural relatives, the Turkmen – as well as Sunnis generally – across the region. He has even demanded that only “Sunni Arabs, Turkmen and Sunni Kurds” remain in Mosul, conveniently glossing over the sectarian divisions among the Turkmen themselves.

Most Iraqi Turkmen are alarmed by Turkey’s sectarian rhetoric. On October 3, the Turkmen Rescue Foundation published a scathing response to Erdogan’s vows to defend Tal Afar’s Turkmen against Shiite militias, demanding he “respect Iraqi diversity” and condemning him for interfering in its affairs. Asked recently whether he is Sunni or Shia, the leader of the nationalist Turkmen Hak Party responded simply, “I am Turkmen.” Another Iraqi-Turkmen representative lamented that other Iraqis “see Turkmens as one and the same with Turkey,” and that the Turkmen, therefore, tend to pay the price for Erdogan’s bluster.

Some Iraqi Turkmen also feel Turkey’s strong political and economic ties with Iraq’s Kurdistan Regional Government (KRG) have come at their expense, and that Ankara has sided with the country’s Kurds against them. Turkmen feel mistreated by the Kurds, a reality that they say Ankara has done little to alleviate despite its political influence on the KRG President Masoud Barzani in Erbil. This sentiment is particularly pronounced among the Turkmen of Kirkuk, a city contested by both Kurds and Turkmen. Ankara’s policies have actually hurt the Turkmen, community leaders say. “For Turkey economic politics come first, Sunni [politics] come second and we are third,” one Iraqi Turkmen politician said.

Despite the rhetoric, Erdogan is clearly less concerned about Iraqi Turkmen than about his own domestic agenda: the consolidation of power in a centralized presidential system. Seen in that vein, the Turkish president’s firebrand rhetoric on the Turkmen paradoxically helps him solidify the nationalist vote at home, helping him cement the majority necessary for a constitutional referendum to bolster the power of the presidency.

Ankara’s treatment of the Turkmen is unfortunate on many levels. Perhaps the worst fallout of this policy, however, has been its denial of an alternative role for the Turkmen – one in which they could present a secular civic model of unity in a fractured and embattled Iraq. As the country’s third largest minority with a professed commitment to the national unity with all of Iraq’s ethnic and religious diversity, the Turkmen – with the encouragement of an ecumenical Turkish policy – could have offered a viable post-sectarian model to their fellow citizens.

Iraqi Turkmen are between a rock and a hard place. Indeed, they are stuck between Erdogan’s domestic objective of one-man rule and his regional policy of Sunni sectarianism. Both agendas have turned out to be disastrous for the Turkmen so far, and there is scant reason to expect their fortunes to improve any time soon.

Aykan Erdemir is a former member of the Turkish parliament and a senior fellow at the Foundation for Defense of Democracies, where Merve Tahiroglu is a research analyst. Follow them on Twitter @aykan_erdemir and @MerveTahiroglu