Turkey’s president, Recep Tayyip Erdogan, remains in power on Saturday after quelling an attempted coup by military officers who seized control of state television the night before, and then proceeded to shell the parliament in Ankara, deploy troops on major bridges in Istanbul, and put tanks on the streets of both cities.

BREAKING — Group attempting to stage a coup seizes state broadcaster TRT pic.twitter.com/1jtznd8p7K — DAILY SABAH (@DailySabah) July 15, 2016





CCTV footage of TRT World being taken off air by armed soldiers during the #failedcoup attempthttps://t.co/vCpKjxn5DM — TRT World (@trtworld) July 17, 2016





BREAKING Coup leaders claim that they take over the govt, air the statement on state TV. pic.twitter.com/tpK1UJwRXX — CNN Türk ENG (@CNNTURK_ENG) July 15, 2016









Turkish soldiers block both bridges on the Bosphorus in Istanbul and jets flying low in Ankara. Reason not clear yet pic.twitter.com/tMG7KKYvGh — Selin Girit (@selingirit) July 15, 2016





While Erdogan has many critics, and has cracked down on dissent in the streets, in parliament, and on social networks, there was no evidence of popular support for the attempted coup — even from those who have protested against Erdogan’s ruling Justice and Development Party, known by the Turkish acronym AKP.

I protested erdo?an during gezi. I was tear gassed by his police. I think akp is trash. but I support them against a fascist military coup. — elif fât?ma ????? (@eelifgorken) July 15, 2016

Opposition lawmakers, who sheltered in a bunker with members of the ruling party after the parliament was bombed during a debate, were quick to denounce the attempted coup.

Chaos in Turkish parliament as explosion heard. pic.twitter.com/Ty75Q9mG8U — Gilgo (@agirecudi) July 16, 2016





TBMM s???na??nday?z; 10 dakika oldu bomba sesi yok... pic.twitter.com/mVb1HpSdEt — Mehmet Bekaro?lu (@MBekaroglu) July 16, 2016

The united opposition of Turks to the coup against Erdogan and his ruling Islamist party stood in marked contrast to comments from some Americans expressing support for the attempt to force an elected leader from power.

After Brad Sherman, a Democratic congressman from California, suggested that a coup could bring about “real democracy,” Turkey’s ambassador to the United States, Serdar Kilic, replied: “You should be ashamed of yourself for supporting a coup attempt and expecting democracy out of it.”

Military takeover in Turkey will hopefully lead to real democracy - not Erdogan Authoritarianism — Brad Sherman (@BradSherman) July 15, 2016

The public mood late on Friday was perhaps best summed up in a Snapchat video of tanks driving by an outdoor cafe on Bagdat Avenue in Istanbul, captioned with an emoji expressing alarm and the words, “ne oluyor,” or, “what is happening?”

Bagdat caddesi, Fenerbahce'nin önünden paletli tanklar geciyor. pic.twitter.com/x8GQqdL0x8 — Ahmet STARKG?L. (@yanmasadakigenc) July 15, 2016

The plotters failed, despite following a script that might have succeeded in the 20th century, in part because Erdogan was able to rally support for democratic rule using 21st century tools: video chat and social media. After the officers claimed control of the country in a statement they forced a presenter to read on TRT, the state broadcaster, the country’s internet and phone networks remained out of their control. That allowed Erdogan to improvise an address to the nation in a FaceTime call to CNN Turk, a private broadcaster the military only managed to force off the air later in the night, as the coup unraveled. In his remarks, the president called on people to take to the streets.

BREAKING Turkish President Erdo?an blames #Gulenist network & calls on public to go to public squares and airports. pic.twitter.com/vmQlYLyv35 — CNN Türk ENG (@CNNTURK_ENG) July 15, 2016









Turkish president invites citizens to take to street in wake of military coup attempt pic.twitter.com/0epadOZvQY — ANADOLU AGENCY (ENG) (@anadoluagency) July 15, 2016

Given that Erdogan’s government has shuttered privately owned television news channels that have been critical of him in the past year, he had reason to be thankful that CNN’s Turkish outlet was still on the air when he needed it. The channel has not, however, been known as an enthusiastic supporter of Erdogan’s critics. When protesters took to the streets against his government in 2013, CNN Turk was widely mocked for broadcasting a documentary about penguins instead of live reports on the dramatic events unfolding live in Istanbul’s Taksim Square.

Minutes later, the president repeated his plea for protesters to defend democracy on his own Twitter feed.

Milletimizi demokrasimize ve milli iradeye sahip ç?kmak üzere meydanlara, havalimanlar?na davet ediyorum. — Recep Tayyip Erdo?an (@RT_Erdogan) July 15, 2016

Of course, having an iPhone and access to the internet is not alone enough to foil a coup — if it were, Mohamed Morsi would still be Egypt’s president, since he posted a similar plea for support on the presidency’s YouTube channel as he was being deposed in 2013. In that case, however, the coup was welcomed by millions of anti-government protesters, and the military was united and ruthless enough to massacre dissenters who took to the streets. As TRT’s English-language channel explained later in an account of the night’s events produced after the coup failed, Erdogan’s call for protesters to flood the nation’s squares and airports to resist the putsch was heeded by his supporters.

Resistance to the coup was also encouraged by vivid images on social networks of abuses by the military forces, including distressing video clips of a helicopter gunship firing at civilians and fighter jets swooping low over Istanbul.









Fighter jets fly low above our head in downtown Istanbul and apparently hit targets.

Woe onto the bandits in uniform that caused this. — Mustafa Akyol (@AkyolinEnglish) July 16, 2016





There was also extremely graphic video of a tank running over protesters in Istanbul, leaving many crushed beyond recognition. While some major television channels were barred from broadcasting, Turkish journalists managed to streamed live video of the anti-coup protests using Facebook and Periscope.





sabah 4 ataturk havaalani onunde yakaladigimiz icinden 6 er 2 rutbeli 8 askerin linc edilerek cikarilmasi https://t.co/OvXKWzAo0m — ahmet hasdemir (@HasdemirAhmet) July 16, 2016

As the coup faltered, images began to appear of civilians swarming tanks and soldiers surrendering or being arrested by police officers who remained loyal to the government.

A man lies in front of a Turkish army tank at Ataturk airport in Istanbul via @reuterspictures pic.twitter.com/HaecVOqMWJ — Noah Barkin (@noahbarkin) July 15, 2016





Gaziantep now thousands take to the streets rejection military coup on Turkish government #Turkey pic.twitter.com/2JqBI0fOIB — Rami Jarrah (@RamiJarrah) July 16, 2016





Earlier in Taksim. I talked to the shirtless man. He blamed this on Gulen and wants Erdogan as leader for 100 years pic.twitter.com/70v9MK7MTb — Teymour (@Teymour_Ashkan) July 16, 2016





#Turkey crazy video showing civilians taking over a tank and coup soldier firing shot against them in #Istanbul pic.twitter.com/9OkBGNqod0 — Putintintin (@putintintin1) July 15, 2016





Video from @140journos shows a tank crushing a car in Turkey as people get out of the way pic.twitter.com/CzBXu3Tkez — Brandon Wall (@Walldo) July 16, 2016









Taksim'deki askerler de teslim olmu?. Çok uzun sürmez bu i?... Soldiers in Taksim surrendered to police

https://t.co/jZXKJ8rlLj …#Turkey — hONoUR (@Jakoben1789) July 16, 2016

When soldiers did belatedly arrive at CNN Turk and force the channel off the air, the station’s journalists, and a digital editor at Hurriyet, a newspaper in the same building, managed to report on the raid using Facebook and Twitter.





Sorry for the poor pic quality but it's hard when you are mass-arrested during a coup attempt... pic.twitter.com/TwUC6Yqi71 — Emre KIZILKAYA (@ekizilkaya) July 16, 2016

A short time later, when the soldiers there were arrested, that too was captured on video and reported online.

The moment that rogue soldiers were arrested at the Cnn Turk/Kanal D/Hurriyet complex. https://t.co/3mzrb6I56a — Emre KIZILKAYA (@ekizilkaya) July 16, 2016





cnn'de darbecilere önce polis, sonra siviller müdahale etti pic.twitter.com/fiw5jVRC9v — ismail saymaz (@ismailsaymaz) July 16, 2016

Zeynep Tufekci, a Turkish sociologist who studies the interaction between technology and protest movements, pointed out that Turks are particularly good at finding ways to use the internet to communicate in times of crisis because they have a lot of practice.

Internet is not down. Turkey info flows is very very resistant to throttling. We're practiced. https://t.co/NNjEj2Xi3V — Zeynep Tufekci (@zeynep) July 15, 2016

Restrictions on social networks in the country are common, and Erdogan himself blamed Twitter for popular resistance to his government’s crackdown on protests against the destruction of Gezi Park, a green space in the center of Istanbul, in 2013.

Turkish PM Erdo?an: "There is this curse called Twitter. It's all lies ... That thing called social media is the curse of society today." — Zeynep Tufekci (@zeynep) June 2, 2013

The irony of Erdogan now relying on social networks to rally protesters to his side was not lost on close observers.

How ironic that it was social media and technology that came to Erdogan's rescue. — Karl Sharro (@KarlreMarks) July 16, 2016





So now Erdogan needs protesters to save him. Fate is not without a sense of irony. #Turkey — Daniel Ó C (@DanOCluanaigh) July 16, 2016

Looking back at the events of the past 24 hours, Bilge Ebiri, a Turkish-American film critic, expressed admiration for the courage of Erdogan’s political opponents, who resisted the coup despite the increasingly autocratic way he has attempted to centralize power.