At least half a million Turks chanting anti-government slogans and brandishing the national flag gathered in Istanbul yesterday as tensions rose between the country's Islamist prime minister and the fiercely secular army.
"Turkey is secular and will remain so," roared the crowds as speakers took turns to deliver fiery speeches extolling the virtues of Kemal Ataturk, the founder of modern Turkey.
"No to America, no to EU, down with the government," they shouted as thousands of riot police looked on.
The mass rally, the second in two weeks, came after a dramatic warning late on Friday from the Chief of General Staff, warning of the dangers posed by radical Islam.
In an official statement, the General Staff declared that "it should not be forgotten that the Turkish Armed Forces is one of the parties to this [secular versus Islamists] debate and is the absolute defender of secularism".
The army added that it reserved the right to "take action" as warranted. The salvo sent shockwaves through the political establishment, with some analysts calling the generals' words a threat to seize power. "No to a coup" declared the headline of the mainstream daily Sabah.
Western diplomats said the military's declaration had dealt a further blow to Turkey's efforts to join the European Union and could unravel more than four years of economic growth and political stability under the country's mildly Islamist government led by Recep Tayyip Erdogan.
But these concerns were not evident at yesterday's protest. "Secularism is more precious to us than democracy," said Cenk Kutludemir, a student. "And the EU won't ever accept us anyway, to hell with EU."
The Turkish army, which views itself as the custodian of Ataturk's legacy, has overthrown four governments since 1960. The generals' persistent meddling in politics is seen as one of the foremost hurdles to Turkey's efforts to join the EU.
Some western diplomats say Mr Erdogan's efforts to reduce the army's power lie at the root of his quarrel with the generals. The trigger for the latest row was parliament's election of a new president.
Mr Erdogan had been eyeing the job himself. But sustained secular opposition, culminating in a huge anti-government rally in Ankara last week, forced Mr Erdogan to nominate his robustly pro-Western foreign minister, Abdullah Gul.
But the military remains unswayed, not least because Mr Gul's wife wears the Islamic headscarf.
"A woman who covers her head cannot sit in Ataturk's palace," said Nesrin Akkoc at yesterday's rally. "Turkey will not become another Iran."
Mr Gul failed to win enough votes in a first round on Friday. A further setback came when an appeal was lodged in the Constitutional Court to annul the vote because not enough deputies were present for a quorum. In order to be elected, candidates need two-thirds of ballots in a second round, and a simple majority in a third and final round.
Should the court rule against the government, Mr Erdogan is expected to call for parliamentary elections before the scheduled date of Nov 4.
"It is unthinkable for an institution like the military, which is attached to the prime minister, to make any statement against the government on any issue in a democratic state," said Cemil Cicek, the justice minister.
Olli Rehn, the EU's enlargement commissioner, said the presidential election was "a test case" for the military's respect for democracy.
The dilemma for the secularists is that opinion polls consistently give Mr Erdogan's party a huge lead.