ANKARA, Turkey - The United States and European Union warned Turkey's military on Wednesday to stay out of the country's political showdown between the Islamic-rooted government and those in the secular establishment who fear the country will shift toward Islamic rule.

Prime Minister Recep Tayyip Erdogan has found himself besieged ever since his party's decision to nominate one of his closest allies as president. At the heart of the conflict was a fear that the ruling party would misuse its control of both Parliament and the presidency.

Erdogan's party called for new elections Wednesday after the secular opposition last week boycotted a parliamentary vote on Foreign Minister Abdullah Gul's candidacy and was backed by the Constitutional Court, which invalidated the ballot because a quorum was not present.

Secretary of State Condoleezza Rice joined calls by the European Union warning the Turkish military, which considers itself the guardian of secular, modern Turkey and has overthrown governments in the past.

"The United States fully supports Turkish democracy and its constitutional processes, and that means that the election, the electoral system and the results of the electoral system and the results of the constitutional process have to be upheld," she said.

EU Enlargement Commissioner Olli Rehn said Turkey must abide by the rule of law and civilian control over the military, warning that if the government in Ankara wanted to join the EU "it needs to respect these principles."

With Gul's candidacy in disarray, Erdogan chose the option of early elections on June 24 as a way to defuse tension in a country that has endured military coups, economic chaos and weak coalition governments over the decades. The apparent hope is that a government with a fresh mandate could also lend legitimacy to the presidential election.

Secularists have staged huge demonstrations, the stock market has tumbled and the military has threatened to intervene as a way to curb the growing influence of Islam.

The markets rose Wednesday after the call for early elections, and Erdogan appealed for unity.

"To interpret Turkey as if it is divided into two camps is murder," he said. "Even if our views and life styles are different, we are one nation and one Turkey."

The prime minister criticized the nation's highest court, a strongly secular body, for canceling the presidential vote.

The court's decision, Erdogan told ruling party lawmakers,"has made it almost impossible for the Parliament to elect a president in the future. This is a bullet fired at democracy."

With new elections, Erdogan could win another strong majority that would allow him to implement more economic reforms and initiatives geared to Turkey's bid to join the European Union. But he also risks seeing secularist parties band together to win more legislative seats -- leading to a coalition government and potentially paralyzing factional squabbling.

Erdogan's party said it will appeal to Parliament to hold a new presidential vote on Sunday, but would abandon the process if a quorum is not reached again. Gul, whose wife covers her hair with an Islamic-style head scarf that secularists view as an alarming symbol of the primacy of religion over state, has said he will not withdraw his candidacy.

Erdogan's party has tried to ban adultery and forbidden the sale of alcohol in cafes run by its municipalities. It has encouraged religious schools and has spoken of ending the prohibition on Islamic head scarves in public offices and schools.

More than 700,000 pro-secular Turks demonstrated in Istanbul on Sunday, 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 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 an Islamist president.

Erdogan also 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 and we will find a way to open presidential elections to our people," he said.

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 though it has 66 percent of the seats in parliament.

In 1997, the military pushed pro-Islamic Prime Minister Necmettin Erbakan out of power, sending tanks into the streets in a message that any concessions on secularism would not be permitted.

The founder of modern, secular Turkey, Mustafa Kemal Ataturk, gave the vote to women, restricted Islamic dress and replaced the Arabic script with the Roman alphabet. But Islam remains a powerful and attractive alternative for many Turks in this predominantly Muslim nation of more than 70 million.