Last Friday was a sleepless night. I was in Bodrum with my Turkish partner. We’d arrived the day before from Antalya, where my mother lives. ISIS’ attack on Istanbul’s airport was fresh in people’s minds, but it felt like business as usual for Turkish politics. Events unfolded in dizzying and dramatic succession.

Bridges spanning the Bosphorus in Istanbul were closed to traffic. Then came news of tanks in the capital, Ankara. Before long, the Turkish president called on people to take to the streets. An attempted coup was taking place, which was denounced by senior military figures.

People did take to the streets; some facing down tanks, mostly manned by conscripted soldiers but some went much further.

Images of soldiers being lynched by angry mobs have caused disquiet among most Turks. But the crowds did not represent a cross section of Turkish society, or even supporters of the governing AKP.

A statement read on public broadcaster TRT said martial law had been imposed and the military had assumed control, yet private broadcasters continued to conduct interviews with government figures.

The coup failed. Hundreds have been killed and society’s identity crisis continues, but the media and opposition have shown maturity. Unusually, the four main political parties issued a joint declaration condemning the coup and pledging to uphold democracy. It is to be applauded that military intervention no longer has any serious takers in a country that has suffered from previous coups.

The government has already embarked on a purge of people allegedly sympathetic to Fethullah Gülen, the US-based cleric accused of backing the coup.

Minorities, including Jews, feel vulnerable from the frenzied crowds. Calls for the death penalty to be reinstated are placing crushing pressure on Turkey-EU relations, but rapprochements with Israel and Russia are unlikely to be impacted. Turkey’s priority must be to strengthen secular democracy and reduce tensions, but I fear we are likely to see more political upheaval first.