ISTANBUL As many as one million people rallied in a sea of red Turkish flags in Istanbul on Sunday, accusing the government of planning an Islamist state and demanding it withdraw its presidential candidate.
Despite the protests and a threat from the powerful army to intervene in the election, Foreign Minister Abdullah Gul, architect of Turkey's EU membership drive, said he would remain the ruling AK Party's candidate for head of state.
The protesters flooded the streets of Turkey's largest city, praising the army and denouncing Gul and Prime Minister Tayyip Erdogan, whose AK Party enjoys a huge parliamentary majority, as a threat to a secular order separating state and religion.
"Turkey is secular and will remain secular", and "shoulder to shoulder against sharia (Islamic law)," they chanted carrying portraits of the nation's founder Mustafa Kemal Ataturk.
The AK Party faces its biggest crisis since it was elected in 2002. Parliament picks the president, who carries great symbolic weight and has important veto and appointment powers.
"We are here to stop the creation of an Islamic state," said businessman Irfan Kadim, 35. "We fear for the secular republic."
Many secularists are worried by Gul's Islamist past and the fact his wife wears the Muslim headscarf, banned in universities and public offices. They fear she will wear it as a first lady.
The AK Party, which has vigorously pressed liberal reforms and overseen strong economic growth, denies any Islamist agenda.
Police told Reuters more than 750,000 attended, while CNN Turk said the district town hall put attendance at 1.2 million.
Many analysts say the only way to defuse the crisis would be to call early general elections, scheduled for November.
Turkey's top business association, TUSIAD, backed a call for early elections, which opinion polls showed the AK Party would be well placed to win. Secularists hope a newly elected parliament would choose a consensus president.
"Gul's candidacy is in jeopardy. I have serious doubt he can continue as if nothing has happened," Turkish commentator Cengiz Aktar told Al Jazeera television.
"I think we are in the middle of a crisis...but I don't think the armed forces is willing or wants to do another coup."
Gul, a soft-spoken diplomat known to EU leaders and viewed with confidence on markets, gave no ground.
"The process (of electing a president) has begun and will continue ... There can be no question of my candidacy being withdrawn," Gul told reporters in the capital Ankara.
Only 10 years ago the army, with public support, hounded out of office a democratically elected Islamist government.
Secularists, including army generals and judges, say Erdogan and Gul will show their true colors once they have the presidency, the last major state institution outside their control, and boost the role of religion in Turkish life.
The army General Staff raised the stakes on Friday, hours after an inconclusive first round of voting in parliament on Gul's nomination, with a threat to intervene in the election.
The Istanbul protesters said they backed the army, long viewed here as the ultimate guardian of the secular republic.
The opposition has criticized the ruling AK Party for failing to consult with them on a candidate and ignoring their calls for a person who would be accepted by the majority.
The Istanbul rally mirrored a smaller one of 350,000 in Ankara two weeks ago against Erdogan running for president. After that protest, Erdogan nominated the more conciliatory Gul.
A second round of voting in parliament on Gul's nomination is set for Wednesday, though he is not expected to secure enough votes from deputies until a third round scheduled for May 9.
But the main secularist opposition party has asked the Constitutional Court to rule the presidential election invalid. The court says it will try to deliver its verdict by Wednesday.
If the strongly secularist court upholds the opposition appeal, Erdogan must call an early parliamentary election. Outgoing secularist President Ahmet Necdet Sezer would remain in office until a new parliament could choose his successor.
The EU, which began accession talks with Turkey in 2005, and the United States, Ankara's NATO ally, have both called for a democratic and constitutional resolution of the crisis.
(Additional reporting by Thomas Grove and Gareth Jones)