Over the past eleven years we have become so accustomed to the United States intervening in the affairs of other countries, to include regime change and military invasion, it is sometimes possible to forget that some other nations have also found themselves mired in situations that they cannot extricate themselves from when they pursued similar policies. America’s closest and most important ally in the Middle East Turkey now finds itself in a largely lose-lose situation in its dealings with its neighbor Syria.

Turkey certainly has many detractors who point to the increasing authoritarianism of the Recep Tayyip Erdoğan government, its increasing drift from secularism to a mild Islamism, and the de facto limits on civil liberties and rule of law demonstrated in its arrests and prosecutions of journalists and political opponents. But both visitors and longtime foreign residents would also note the country’s dynamic society and vibrant economy at a time when much of the Western world appears to be mired in self-doubt and historical revisionism. Turkey’s economy has been growing, currently at an 8% annual rate, and its centrality as a militarily powerful moderate Muslim regime has led to speculation that they are a possible role model for other developing Islamic states in the Middle East and North Africa.

Mustafa Kemal Ataturk, modern Turkey’s founder, was a passionate secularist, believing as he did that it was the Medievalism of Islam that retarded the nation’s development. He was also a nationalist. During and immediately after the First World War Turkey was a polyglot nation with large Greek, Armenian, Kurdish, Jewish, and Arab minorities. Turkish ethnics were a majority, but nearly half of the nation was non-Turkish. Pogroms against the Armenians and the war of liberation against an invasion by Greece produced major population shifts, sharply reducing the numbers of Christians in the country. But the other major ethnic groups remained. Ataturk’s solution to the country’s ethnic diversity consisted of declaring that henceforth all citizens of the Republic of Turkey would be Turks, whether they liked it or not and without regard to what language they spoke at home and how they chose to worship. This was referred to as “Turkification” and some languages, including Kurdish, were actually made illegal. Ethnic riots in the 1950s further reduced the number of Greeks, primarily in Istanbul, but the fundamental instability of the Turkish state based on its large, predominantly Kurdish minority remained.

Turkey has been engaged in an armed conflict with Kurdish nationalists since the founding of the republic in the 1920s. In the 1930s there were major resettlement programs in an attempt to break up concentrations of Kurds, resulting in the deaths of tens of thousands of civilians. By some estimates, Kurds constitute one quarter of Turkey’s population yet it is only recently that they have been able to use their own language and celebrate their culture though they are still subject to censorship and possible prosecution. The suppression of the Kurds has spawned an indigenous and also transnational terrorist movement seeking to create a Kurdish state made up of Kurds from Turkey, Iran, Syria, and Iraq. In support of the independence movement, a number of armed groups organized in the 1970s and have repeatedly crossed international borders and staged attacks inside Turkey as well as in neighboring Iran.

Turkey’s response to these attacks has been interventionism, initially against the Kurdish region of post-Saddam Iraq and more recently by acting preemptively against Syria.  Hitting terrorist bases in Iraq, using intelligence supplied by the United States, has not exactly worked very well. The leading terrorist group the Marxist-Leninist Kurdish Workers’ Party or PKK continues to stage cross border attacks and continues to kill large numbers of Turkish soldiers and paramilitary policemen with the inevitable retaliation by Ankara against Kurdish targets killing large numbers of civilians.

As a consequence of the lack of anything that can be described as success against Iraq, Turkey has proceeded somewhat more gingerly with Syria, initially supporting the government of Bashar al-Assad in early 2011 and then pushing for reform when the violent suppression of protesters led Ankara to fear that there would be major refugee and security problems developing along the two states’ six hundred mile long border.  The Turkish Foreign Ministry initially recommended not getting involved, but Prime Minister Erdoğan, perhaps vainly, saw Turkey’s potential role as decisive and gradually became more engaged in the developing conflict. Ankara eventually threw its support behind the Syrian National Council and the Free Syrian Army, providing bases and other facilities in Iskenderun and Antakya, close to the border. It also facilitated the transit of equipment from NATO sources and allowed major western intelligence services to set up shop in and around Adana. It permitted Saudi Arabia and Qatar among others to provide direct clandestine assistance to the rebellion in what was optimistically seen as a broadly based Sunni solution to changing the Syrian government.

So what has happened? Turkey’s expectation that there would be a quick resolution to the Syrian problem leading to a change of government that would soon restore order has proven to be a chimera, just as it was for the United States and its allies in Iraq, Libya, and Afghanistan. Instead, Syria is engaged in a civil war with neither side about to surrender but the rebels controlling an increasing number of border crossing points. An enormous refugee problem is developing, and there are concerns that a new government could easily prove to be both radical and ultimately destabilizing for the entire region. A successor regime might also lack authority and resources and so be powerless to prevent what Turkey fears most, namely an increase in manifestations of Kurdish national sentiment along the border. The Turkish press is already noting that there has been evidence of terrorists, including foreign jihadis who are using the camps to refit before returning to Syria, mingling with the 83,000 refugees that have been allowed to enter Turkey. The concern is at such a level that most movement of refugees has been halted and there has been consideration of Turkish military intervention to establish a safe zone on the Syrian side of the border, a solution to the problem that is no solution at all as it merely de facto moves the border back without resolving instability feeding the population shift that is fueling the crisis.

Now Erdoğan is also facing blowback at home. Popular support for the Turkish intervention in Syrian affairs is plummeting with most Turks supporting non-involvement and now saying that it had been a mistake to take sides. There have been demonstrations in cities including Antakya that have borne the burden of the flood of refugees. The fact that Ankara is now in so deep that there is no face saving way out has also not escaped the Turkish popular media, which has begun to strongly criticize the Prime Minister and his policies. There are concerns that southeastern Turkey, which has Kurdish and Arab majorities straddling both sides of long and largely indefensible borders, could easily become a semi-lawless zone awash with weapons and armed men looking for trouble. There is particular opposition to the Turkish Army’s actually having to intervene to restore order, with parallels being drawn to the clueless American misadventure in neighboring Iraq. Turks speak Turkish, not Arabic and, having been an imperial power once ruling the current Arab states, would be a demonstrably alien presence that would invite the Syrians of all stripes to rally around in opposition.

The situation is eerily reminiscent of the long hangover that the US experienced from its involvement in Iraq and the current national disquiet about how to get out of Afghanistan. It also demonstrates the truism that intervention in the politics of a foreign country is very rarely successful, even if that country is right on one’s doorstep, seems to be familiar and appears to be well understood.

Philip Giraldi, a former CIA officer, is executive director of the Council for the National Interest.