Up to a million people rallied in a sea of red Turkish flags in Istanbul today, accusing the government of planning an Islamist state.
They demanded that the governing AK party withdraw its presidential candidate.
But despite the protests and a threat from the powerful army to intervene in the election, Foreign Minister Abdullah Gul said he would remain the ruling party's candidate for head of state.
The protesters praised the army and denounced Mr 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,' they chanted.
Top Turkish businessmen called for early parliamentary elections, which the AK party would appear well placed to win.
Many secularists are worried by Mr Gul's Islamist past and the fact his wife wears the Muslim headscarf banned in universities and public offices.
But the AK Party, which has vigorously pressed liberal reforms and EU membership ambitions, since its election in 2002, denies any secret agenda.