Turkey's disputed election of a new president - pitting secularists against the ruling Islamist-rooted AK party - has gone to the constitutional court.
Istanbul saw a massive show of support for secular institutions
The court is now examining a petition from the opposition to cancel the election of a new president.
As many as one million people marched through Istanbul on Sunday, opposing presidential candidate Abdullah Gul.
Turkey's currency has tumbled amid fears the army may block the election of Mr Gul, the foreign minister.
Mr Gul says there is no question of him withdrawing from the presidential election.
His wife wears the Islamic headscarf, which remains highly controversial in Turkey.
The first round of the election in parliament ended in disarray on Friday amid a dispute about the number of deputies present for the vote.
The secularist Republican People's Party (CHP), which boycotted Friday's vote, said it would challenge the election in court because a quorum of MPs had not been obtained - a charge the AK (or Justice and Development Party) denies.
A second round of voting is due on Wednesday and the court has said it will try to rule on the appeal before the vote.
The powerful military has said it is ready to act to protect Turkey's separation of religion and state.
If the court upholds the CHP position and cancels the presidential election, the ruling would trigger an early general election.
The business elite has called for an early general election to calm the tensions.
The AK, led by Prime Minister Recep Tayyip Erdogan, has an overwhelming majority in parliament.
It has sharply criticised the army threat to intervene in politics, saying the military must remain under civilian control.
Mr Erdogan named Mr Gul as the AK candidate after more than 300,000 secularists rallied in Ankara two weeks ago to prevent Mr Erdogan himself standing.
The prime minister is due to make a televised address to the nation at 2015 (1715 GMT) on Monday.
EU Enlargement Commissioner Olli Rehn has said the row is "a clear test case whether the Turkish armed forces respect democratic secularisation and democratic values".
The BBC's Sarah Rainsford in Istanbul says the army statement on Friday night caused a real stir in Turkey.
The army has carried out three coups in the last 50 years - in 1960, 1971 and 1980 - and in 1997 it intervened to force Turkey's first Islamist Prime Minister, Necmettin Erbakan, from power.
The AK is an offshoot of Mr Erbakan's Welfare Party, which was banned in 1998.