Jenny White is a professor of Turkish studies at the Stockholm University Institute for Turkish Studies and the author of ' Muslim Nationalism and the New Turks .' The views expressed are her own.

(CNN) Until Friday afternoon, Turkey remained a competent and stable, if problematic, country that served as a buffer between Europe and the imploding Middle East and a partner for the United States. It suffered from terrorist attacks like European countries, and shared a world where solidarity could be demonstrated by Facebook posts and projecting the Turkish flags on national monuments .

The military action, the results of which are still unclear, took Turkey out of Europe and placed it squarely in the Middle East. It tore away the country's stability, replacing polarization with what could end up being outright civil war, whether the coup succeeds or not.

All this adds yet another conflict to those already blooming like unholy flowers on Turkish ground: ISIS suicide attacks; renewed fighting with the Kurdish separatist Kurdistan Workers' Party (PKK); wholesale destruction of Kurdish towns by Turkey's security forces which have been given immunity ; not to mention the ongoing low-level violence that infects Turkey's society, especially targeting women. Turkey can no longer be a buffer against violence; it has become a sacrifice on its own altar.

People take to the streets during clashes with military forces in Istanbul Friday.

As a result, the reality is that Turkey's usefulness as a "safe" haven for Syrian refugees is now in doubt, destabilizing the already morally suspect EU pact that provides money to Turkey in return for keeping hundreds of thousands of refugees.

Meanwhile, Turkey's descent into what is likely to be a government witch hunt for "putschists" and massive violent reprisals means more anger, more polarization and a destabilized population that is more likely to seek protection from outside.

Helmet and vests lay on the Bosphorous Bridge on Saturday.

Groups like ISIS will likely capitalize on this disenchantment to seek more recruits inside Turkey. From there, they will be able to pass to Europe, just as jihadis in past years had moved through Turkey on their way to Syria as the Turkish government turned a blind eye . As the saying goes, the enemy of my enemy is my friend, and ISIS and other jihadis were fighting Kurdish militants, Turkey's biggest bugaboo that blinded it to all other dangers.

The United States and opposition parties within Turkey disapproved of Friday's attempted coup. But if the ruling AKP (Justice and Development Party), led by President Erdogan, neuters it, as it appears at the time of writing to have done, we can expect President Recep Tayyip Erdogan to use it as an excuse to ruthlessly crush what thin spine of opposition remains, breaking the back of the military once and for all and arresting -- or worse -- all manner of perceived and real "traitors."

Photos: Turkey's President Recep Tayyip Erdogan Turkish President Recep Tayyip Erdogan addresses a crowd gathered at his palace for Iftar -- the meal eaten after sunset during the Islamic holy month of Ramadan -- in Ankara, Turkey, on Monday, June 27. Hide Caption 1 of 19 Photos: Turkey's President Recep Tayyip Erdogan President Recep Tayyip Erdogan speaks on CNN Turk via a FaceTime call in Istanbul on Friday, July 15, after members of the country's military attempted to overthrow the government. Hide Caption 2 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, his wife Emine, his grandchildren and Istanbul Metropolitan Municipality Mayor Kadir Topbas, left, greet the crowd at a presidential election rally in Istanbul on August 3, 2014. Hide Caption 3 of 19 Photos: Turkey's President Recep Tayyip Erdogan U.S. President Barack Obama shakes hands with Erdogan during a meeting in the Oval Office at the White House in Washington on December 7, 2009. Hide Caption 4 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan oversees the rescue efforts in the eastern province of Bingol on May 1, 2003, following a 6.4 magnitude earthquake that rocked the Turkish region. Hide Caption 5 of 19 Photos: Turkey's President Recep Tayyip Erdogan Russian President Vladimir Putin, left, and Erdogan wear helmets in Durusu village near Turkey's northern city of Samsun, on November 17, 2005, during the inauguration ceremony for the major trans-Black Sea gas pipeline Blue Stream. The pipeline runs from Russia to Turkey. Hide Caption 6 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan addresses the media after a meeting with his deputies at his ruling Justice and Development Party (AK Party) headquarters in Ankara, Turkey, on May 1, 2007. Erdogan unveiled a reform package, including having future presidents elected by popular vote instead of by parliament. Hide Caption 7 of 19 Photos: Turkey's President Recep Tayyip Erdogan Britain's Queen Elizabeth II, accompanied by Erdogan and his wife Emine Erdogan, gives a David Beckham signed soccer ball to a Turkish boy during at a garden party held for her birthday at the British Embassy in Ankara, Turkey, on May 16, 2008. It was the Queen's first visit to Turkey in 37 years. Hide Caption 8 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan attends a swearing in ceremony in Ankara, Turkey, on August 28, 2014. Erdogan was sworn in as Turkey's 12th president at a ceremony in parliament, cementing his position as the country's most powerful modern leader. Hide Caption 9 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan leaves a polling booth after casting his vote in Turkey's 26th general election at a polling station in Istanbul on November 1, 2015. Hide Caption 10 of 19 Photos: Turkey's President Recep Tayyip Erdogan Romanian President Klaus Werner Iohannis, right, and Erdogan walk together during an official welcoming ceremony at the presidential complex in Ankara, Turkey, on Wednesday, March 23. Hide Caption 11 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan delivers a speech during his visit to the Turkish War Colleges Command in Istanbul on Monday, March 28. Hide Caption 12 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, right, kicks a soccer ball while Former Turkish President Abdullah Gul watches at Besiktas soccer club's new Vodafone Arena on its opening day in Istanbul on Sunday, April 10. Hide Caption 13 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, right, shakes hands with King Salman of Saudi Arabia after the Saudi monarch received Turkey's highest state medal during a ceremony at the presidential complex in Ankara, Turkey, on Tuesday, April 12. Hide Caption 14 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, center, chairs the meeting of the 65th Cabinet of Turkey at the presidential complex in Ankara, Turkey, on Wednesday, May 25. Hide Caption 15 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, seventh from the left, attends the Kinaliada Corvette Ceremony at Pendik Naval Shipyard in Istanbul on Saturday, June 18. Hide Caption 16 of 19 Photos: Turkey's President Recep Tayyip Erdogan Erdogan, right, attends an Iftar dinner during his visit to the Tank Battalion campus in the Cizre district of Sirnak, Turkey, on Saturday, June 25. Hide Caption 17 of 19 Photos: Turkey's President Recep Tayyip Erdogan From left, U.S. President Barack Obama, France's President Francois Hollande, Erdogan and German Chancellor Angela Merkel take their positions for a photo ahead of a working dinner at the presidential palace during the NATO Summit in Warsaw, Poland, on Friday, July 8. Hide Caption 18 of 19 Photos: Turkey's President Recep Tayyip Erdogan Turkey's President Recep Tayyip Erdogan and former Turkish president Abdullah Gul pray during the funeral of a victim of the coup attempt in Istanbul on July 17. In an interview with CNN's Beckey Anderson Erdogan said, "The people now have the idea, after so many terrorist incidents that these terrorists should be killed, that's where they are, they don't see any other outcome to it. I mean, life sentence, or aggravated life sentence... why should I keep them and feed them in prisons, for years to come, that's what the people say. So, they want a swift end to it, because people lost relatives, lost neighbours, lost children, 8-year-olds, 15-year-olds, 20-year-old young people, unfortunately have all been killed during these incidents. Of course they have parents, mothers and fathers, that are morning, they're suffering so the people are very sensitive and we have to act very sensibly and sensitively." Hide Caption 19 of 19

The coup plotters' manifesto reportedly stated that they stepped in because, among other things, the president and government have created an autocracy that made the legal system unworkable. This much is true -- that over the past five years, the ruling party has systematically throttled the independence of state institutions, the media, education, civil society, and recently two of the highest courts in the land . In short, the AKP has been dismantling Turkey's democratic walls brick by brick.

And this is not the first time Turkey has been faced with a coup attempt. The country has a history of coups in which the military brought down governments they thought were too autocratic, too inept, or too religious in an attempt to press the democratic reset button. Yet since the AKP came to power in 2004, it has tried to muzzle the army through a series of court cases that jailed hundreds of officers including generals . In 2011, Turkey's top military commanders resigned , saying that their soldiers were demoralized and the commanders could no longer do their jobs.

Turkish soldiers on the streets.

The officers were later released , and the military still remains one of the most trusted institutions in the country. But it is not the same military, nor the same citizenry as in the past. In former coups, the population was cowed into accepting, or willingly went along with, martial law. Institutions, while corrupted or closed down under martial law, remained intact, to be repopulated in the next election.

This time, thousands of Erdogan supporters heeded his call to take to the streets. They threw themselves in front of tanks and cornered terrified looking soldiers as minarets called for jihad. Yet ultimately, whether the coup succeeds or not, this brings the prospect of civil war closer -- and heightens the likelihood of a lost generation before Turkey can rebuild the image of itself. It is a dramatic departure from just five years ago, when the country had earned the respect and admiration of the world.

Friday's tragedy is largely self-inflicted by a government that has been willing to trade in a functioning democracy for dictatorial power. Ironically, it seems likely to use a failed coup to further that goal.