JERUSALEM (MarketWatch) — “Come vacation here,” said then-Prime Minister Recep Erdogan to his southern neighbor Bashar Assad in 2004, ignoring Washington’s protests that Damascus was feeding the anti-American insurgency in Iraq.

It was the beginning of a beautiful relationship. Assad arrived in Turkey with his glamorous wife Asma and their two children for a visit that touched off the seven happy years that ended with Erdogan turning his former guest’s removal from office into a major diplomatic goal.

That goal now seems more elusive than at any other point since the Syrian civil war’s outbreak in spring 2011. In fact, other than the Syrian people, Turkey now emerges as this war’s main casualty, as its diplomatic setbacks fan political mayhem and economic flux.

Russia’s ghosts

Turkey’s reactions to the Syrian crisis have failed one by one.

Russian Lawmakers Approve Military Action in Syria

On the refugee front, Turkey’s creation of tent camps and caravan cities along its Syrian border has been impressive both in humanitarian and logistical terms, but its main aim, to block a Syrian influx, has failed.

A least 800,000 Syrians penetrated Turkey proper, besides more than 100,000 who populate the 13 Turkish-built camps. With 100,000 to 200,000 Syrians now inhabiting Istanbul, social problems already abound, since the refugees’ language and ethnicity are entirely different from the non-Semitic Turks.

Worse, Turkey has no shortage of unskilled workers. Unlike Germany, for which the refugees are an economic asset, for Turkish economy they are a liability, weighing on a workforce where nearly one in 10 adults and one in five young adults are jobless.

On the military side, Turkey has failed so far to create an effective proxy within Syria that would rival Iran’s and Russia’s cultivation of Assad. Worse, Ankara’s half-hearted role in the war on Islamic State has made most of the world suspect that its Islamist government is secretly cheering the fundamentalist organization that everyone else is out to subdue.

Finally, on the diplomatic side, Ankara was caught sleeping while Russia redoubled its Syrian foothold with new infusions of warplanes, tanks, troops and advisers, underscored by the construction of a new airbase outside Latakia, less than 80 miles south of the Turkish border.

Moscow’s arrival in the vacuum created by Washington’s creeping retreat from the Middle East is a major setback for Ankara, regardless of its accounts with Syria. Turkey and Russia fought 12 wars since the Middle Ages, fomenting the enmity that climaxed in World War I and continued by other means during the Cold War.

Now, the expanding Russian enclave in Syria might not only save the Assad regime, but also serve Turkey’s historic enemies. Greece, Cyprus, Armenia, and Bulgaria all have historic bonds with Russia. A strong Russian presence on Turkey’s doorstep will greatly improve their position in their future dealings with Ankara.

The setbacks on the Syrian front follow other failures that are already putting off foreign investors, a trend that will likely intensify following November’s premature election.

Just what investors detest

As suspected here two years ago, Erdogan’s bullying of the judiciary, military, and thousands of protesters throughout Turkey marked the end of a golden decade of political stability and economic growth, and the beginning of a hot-money flight.

Sensing lasting turmoil investors shaved that year one fifth off of the lira’s dollar value TRYUSD, -0.25% , from 57 cents to 45 cents. Since then things have only gotten worse.

First, Turkey’s ruling party lost its absolute majority in June, then it failed to produce a coalition, and then it called another election for Nov. 1, a mere five months since the previous poll. In between all these, violence in the Kurdish east resurged, with soldiers’ funerals abounding, national mourning simmering, and public wrath brewing.

This, coupled with Turkey’s setbacks on the Syrian front, adds up to the kind of uncertainty investors detest.

The lira, now worth 32 cents, has lost 40% of its dollar value since foreign investors began doubting Turkey’s direction. Fueling this plunge was the decline of foreign direct investment from $22 billion in 2012 to $12.5 billion last year, and to $2.9 billion in this year’s first half, 25% less than its level over the same period last year.

Pessimism was palpable also in last year’s foreign deposits in the central bank, where outflows exceeded inflows by $2.33 billion. Similarly, so-called greenfield investments, which are intended for either starting or supporting new ventures, plunged last year to $4.6 billion, roughly half their level earlier this decade.

The burgeoning financial flight from Turkey is also visible in the debt market, where foreign investors’ $4.13 billion in bond purchases in 2013 dived last year to $370 million, and where 5-year-bond yields climbed this year from 6.77% in January to 10.98% this month.

In short, Turkey is facing a gathering vote of no confidence by foreign investors who feel insecure in the face of its lost political stability and growing diplomatic uncertainty.

At the moment, all eyes are set on November’s early election, but chances are slim it will be followed by renewed optimism.

When he concocted a premature election Erdogan assumed that his recent electoral setback was but an accident. The markets evidently rejected this politics of denial. They smell another inconclusive poll followed by yet more Kurdish violence, Syrian displacement, and Russian expansion topped by political paralysis in Ankara and economic doubt in Istanbul.

Turkey made many mistakes over the past two years, but the worst was its rival politicians’ refusal to form the coalition that the voters assigned them to produce following June’s election. It was a display of national tunnel vision and political selfishness worthy of the financial markets’ wrath, the wrath that has already battered the lira and will likely intensify come autumn, as the idea of a snap election is exposed in all its futility.