In all the drama of the failed coup attempt, there could be no doubt this partial military uprising will be a brutal setback for Turkey and for already slim hopes for stability in the Middle East.

Now the outcome is clear, it's widely expected that an already authoritarian and notoriously thin-skinned President Recep Tayyip Erdogan will reassert his power with a vengeance.

Expect crackdowns and purges of suspected disloyal elements in the military and other sectors of society, then a regime that will likely shift even further along a populist Islamic direction, impatient of opposition, more iron-fisted in imposing its authority.

As for Turkey's position as the largest and most strategic power in the region, it was further weakened at a time when the nation was already reeling from successive attacks by ISIS and Kurdish militants at home and growing diplomatic isolation abroad.

Turkey's growing isolation

As I wrote in this space two weeks ago, Erdogan's standoffish approach to all, including friends and allies, has grown to a point his followers sometimes defend it as a "precious loneliness."

Indeed that sense of Turkey's growing isolation may have encouraged the coup plotters — whatever their deeper motives — to strike at this time.

They clearly underestimated Erdogan's enormous popularity among at least half the Turkish population, as well as his followers' willingness to confront tanks in the streets.

While the regime now acts to consolidate power and punish resisters, however, its overall fortunes are likely to be even more shaky on several fronts.

EU membership prospects dim

This lurid night of military-civilian violence will further push back the country's increasingly slim hopes of gaining membership in the European Union. Many EU members have quietly resisted Turkey's entry for reasons ranging from human rights abuses to too prominent a military role in society.

People against the attempted coup gather on Istanbul's Bosporus Bridge on Saturday. Government officials said the coup appeared to have failed as Turks took to the streets overnight to confront troops attempting to take over the country. (Selcuk Samiloglu/Associated Press)

This resistance is an ongoing setback to a formerly booming Turkish economy, while the latest violence will greatly compound the new economic misery incurred this year by a dramatic loss of vital tourist income following a succession of bombings and other attacks.

Foreign visitors account for almost 10 per cent of Turkey's GDP, while more than 30 million visitors a year helps employ two million workers. Serious instability can only devastate this sector and severely undercut the country's economic strength.

The country has been hit with 16 terror attacks in just a year — many ISIS-directed or inspired, some others the work of Kurdish militants. Many of the attacks are clearly directed at foreigners to maximize Turkey's loss of income, especially the recent Istanbul Airport attack that struck at the central nervous system of Turkish travel and tourism.

Even before the coup attempt, Turkey expected a 40 per cent drop in tourists this year, a major blow to national revenues. Some of that loss was also due an absence of Russian visitors during the standoff between Russia and Turkey over the shooting down of a Russian warplane by Turkey.

The two countries recently settled that dispute, following an apology by Turkey, but it is not at all clear that large numbers of Russians will want to risk holidays in so clearly unstable an area.

Suspicion from the West

On the diplomatic front, a lingering suspicion of Erdogan will likely persist in the West, in spite of the fact major powers, including the U.S. and Germany, quickly sided with his government against the plotters during the tense hours of the coup.

Inside NATO, Turkey is a key partner, the second largest military in the Alliance, while holding its strategic south-eastern front on both the Black Sea and Mediterranean shores. It is also enormously important during the current refugee crisis as it continues to shelter up to four million refugees who would otherwise add to a movement of migrants into Europe.

Still, for years Western allies, especially the U.S. and U.K., suspected Turkey of taking only a half-hearted approach to combatting ISIS. It seemed obvious to all that Erdogan made at best a sluggish effort to block ISIS foreign recruits and arms in transit through Turkey before crossing its highly porous borders into Syria and Iraq.

Turkey appeared far more concerned with toppling the Assad regime in Syria, and combatting Kurdish militants in the border region, than in taking on ISIS, which was by far the main concern of Western allies. In the past two years, Turkey has concentrated more effort on defeating ISIS, but suspicions persist that it could be doing far more.

Role of the Gulen Movement

More tense relations between Turkey and Washington may develop following Erdogan's claim that the coup attempt was inspired by an Islamist cleric, Fethullah Gulen, who leads a controversial Gulen Movement of moderate Islamic reformers from a base in the U.S.

The movement has denied any involvement in the coup, but for years Erdogan has accused it of trying to destabilize his government and has purged hundreds of members from government positions and the military. It would be awkward for the U.S. if the movement, which regularly lobbies U.S. politicians for support, is now discovered to be prominent among coup planners.

Until the dust settles, it will remain difficult to predict how Turkey will come through this experience. Some who follow its affairs feel Erdogan may soften his approach in an effort to broaden his appeal and lessen deep divides within the population.

Others are equally sure he will double down on his authoritarian instincts, and use the occasion to weaken both the military and political opposition in the state.

A populist following for Erdogan

Certainly Erdogan has reasons to act energetically, for Turkey post-coup attempt still faces immense problems, as war rages along its southern borders with Syria and Iraq and various terrorist groups plague the country's interior.

In all the uncertainty, Erdogan will know he has an enormous and dedicated following that seems to revere his strongman approach and a large military that proved itself for the most part loyal.

This is not unlike the combination of forces that shore up Russian President Vladimir Putin, another hardline leader that Erdogan is often said to see as a model for his own style of leadership.

This thought is not an encouraging one for those who wish a democratic Turkey well.