A party with Islamic roots won a mandate in Turkey, but a wary military is likely to severely constrain the party's ability to carry out any changes to the secular, pro-Western system.

The Justice and Development Party is also likely to face a push from its own grass roots, many of whom backed the party in the hopes that it would bring a more Islamic character to the state and curb corruption.

The party's time in power is likely to be a tug-of-war signifying the traditional struggle between East and West in Turkey, a crucial Western ally and NATO's only Muslim member.

Turkey hosts U.S. warplanes at its southern Incirlik air base, which was a staging point for attacks on Iraq during the Gulf War. Ankara's support would be key to any U.S. operation against Iraq.

Immediately after his party's victory, Justice leader Recep Tayyip Erdogan, who was once jailed for anti-secular activities, took pains to assure the public that he had no intentions of changing the country's pro-Western orientation.

"We included in our program that we're not a religious-oriented party," he told reporters Monday. "Our future practices will show it clearly. We are fed up with such questions and giving answers."

He also emphasized that his party would support a U.S. attack on Iraq if it had U.N. approval.

Washington reacted cautiously to the result in mostly Muslim Turkey, a crucial U.S. ally.

"Turkish people have a right to choose who will be their leaders and we ... look forward to working with the new Turkish government," said U.S. Undersecretary of State Marc Grossman, who was in Greece.

State Department spokesman Richard Boucher said he wouldn't speculate on Turkey's future. "We await the formation of a new government."

Many Western leaders seemed relieved at the party's promise not to veer the country sharply toward a new path.

Foreign Minister George Papandreou of Greece, a traditional rival of Turkey, said he hoped for a "leap in our relations to resolve various long-standing and historical problems."

In Britain, Prime Minister Tony Blair said he was "very encouraged" by the party's statements after its victory.

Germany, which has significant ties to Turkey due to its large Turkish immigrant population, said, "We view the first signals favorably."

The Justice and Development Party captured 34 percent of the vote, a result that gives it a majority in Turkey's parliament.

The party took 363 in the 550-seat legislature — enough to rule without a coalition — and the Republicans won 178. The remaining nine seats went to independents. More than a dozen parties failed to cross the 10 percent threshold needed to get seats.

Voters, straining under Turkey's worst recession in four decades, evicted the last of the politicians who had dominated government for much of the previous half-century.

The losers included Prime Minister Bulent Ecevit. He received about 1 percent of the vote and resigned from office Monday. The frail 77-year-old premier has agreed to stay on as a caretaker until a new government is in place.

Another group ousted from parliament is Mesut Yilmaz's Motherland Party, which dominated in the 1980s and installed a market economy, but has been sullied by corruption. Also out is the True Path Party of scandal-tainted Tansu Ciller, Turkey's first female prime minister.

Some observers in Washington have said the party's victory could benefit the United States as Erdogan will be so closely watched by the military that he will have almost no room to maneuver. The military regards itself as the guardian of Turkey's 80-year tradition of secularism and has led three coups. The military has made no comments since the elections.

"The military will be very vigilant," said Seyfi Tashan, the director of the Foreign Policy Institute in Ankara. The Justice party "will not have much leeway."

Analysts also say it may become the party that pushes strongest for European Union reforms, knowing that the EU is looking to limit the amount of influence the military has in politics.

In a highly symbolic move, Erdogan announced Monday that he would visit Greece to push for Turkey's bid for EU membership.

Six years ago, when a pro-Islamic government took power in Turkey, leader Necmettin Erbakan made his first trips to Iran and Libya, setting in motion a conflict with the military that led to his eventual ouster from power. Erdogan was mayor of Istanbul as part of Erbakan's party.

Erdogan's message of moderation — he made no mention of religion in his campaign speeches — and his image as a clean politician stressing social welfare led to his party's success.

Many of the voters who supported Erdogan were not religious and were looking to cast a protest vote against Turkey's traditional politicians. The party stalwarts are generally more religious and supported religious parties that were banned earlier.

"Although its electorate basis is predominantly moderate, its leadership is not and here there is going to be a tug of war," said Soner Cagaptay, an analyst at the Washington Institute for Near East Policy.

Traditional Islamic party voters are pushing strongly to boost the amount of religious education in schools and end a ban in universities and government offices on women who wear the Islamic head scarf.

The issues are inflammatory in Turkey, where many see pro-Islamic changes as attempts to erode the character of the secular state.

The party "will ... have to dance on thin ice here," Cagaptay said.

That issue was clear to Serife Cicek, an activist who campaigned door-to-door for the Justice party in the shantytown where she lives in Ankara.

"With the permission of Allah, our party won the elections," Cicek said. "And again with the permission of Allah there will be the freedom for the head scarf and the Quran courses."