ANKARA, Turkey - Turkey's highest court yesterday halted a parliamentary vote that looked certain to lead to a president rooted in political Islam, a victory for secularists who fear the country is moving toward Islamic rule that would undermine their Western way of life.

Prime Minister Recep Tayyip Erdogan responded by calling for a constitutional amendment to allow the president to be elected by popular vote, rather than by the parliament. And he said new parliamentary elections could be held as early as June 24, instead of November as scheduled.

The goal would be to elect a government with a fresh mandate and to resolve a crisis that has seen the stock market plummet and the pro-secular military threaten to intervene.

"God willing, Turkey will go back to its track," Erdogan told reporters late yesterday, referring to the economic and political stability that Turkey had enjoyed in recent years.

Earlier, Foreign Minister Abdullah Gul, the ruling Islamist party's presidential candidate, said he would not withdraw his candidacy despite yesterday's setback from the Constitutional Court.

At the heart of the conflict is a fear that Gul's party would use its control of both parliament and the presidency to overcome opposition to moving Turkey toward Islamic rule. More than 700,000 pro-secular Turks demonstrated Sunday in Istanbul, many of them women who believe political Islam would deprive them of personal freedoms and economic opportunities.

Secularists are deeply skeptical of the government - despite its stated commitment to secularism, as well as to reforms aimed at gaining membership to the European Union - because many ruling-party members made their careers in Turkey's Islamist political movement. Erdogan once spent several months in jail after reciting an Islamic poem that prosecutors said had incited religious hatred.

The ruling party has advocated an eventual move toward a U.S.-style presidential system with a more powerful executive, adding to concerns about a president with an Islamist tilt.

Erdogan said a new presidential vote would proceed in parliament tomorrow.

In his remarks late yesterday, Erdogan said he would push for a referendum if necessary on a constitutional amendment allowing the president to be elected by popular vote.

"If we cannot get the parliament to choose a president, we will take this subject to the people," he said, "and we will find a way to open presidential elections to our people."

Parliament, which since 2002 has been dominated by pro-Islamic politicians from Erdogan's ruling Justice and Development Party, elects the president in Turkey. In the first two rounds of voting, a candidate needs two-thirds of the lawmakers' votes to win, but by the third, only a simple majority is needed.

The Constitutional Court ruled yesterday that there were not enough legislators present during the first round of voting Friday, and canceled the round. The opposition had boycotted the vote, depriving the ruling party of a quorum of two-thirds of lawmakers in the 550-seat parliament.

The bitter debate over the role of Islam in politics has exposed deep divisions in Turkey. Pro-secular groups say the ruling party, which came to power in 2002 with 34 percent of the vote, did not have a strong popular mandate, even though an electoral quirk gave it 66 percent of the seats in parliament.

The showdown has also led to fears that the military could intervene and push the elected government out of power.