Updated

Prime Minister Recep Tayyip Erdogan won a second mandate in elections, in a sign of public support for his party that has espoused Western-style reforms despite having roots in political Islam.

But the new government faces a series of challenges, including a presidential election, Kurdish rebel violence and lingering tension over the role of Islam in society.

Erdogan's Justice and Development Party won 46.6 percent of the votes, according to results Monday, and state-run Anatolia news agency projected the party would take 340 of the 550 seats in Parliament.

Sunday's election was called early to defuse a political crisis over the ruling party's choice of presidential candidate that caused tensions with the military-led, secular elite, and supporters flouted Erdogan's win by a wide margin as a rebuttal of their intervention in presidential election process.

Soon after the party's victory, Erdogan, a devout Muslim, pledged to safeguard the country's secular traditions and do whatever the government deemed necessary to fight separatist Kurdish rebels. He also promised to press ahead with economic reforms and efforts to make the Muslim country of 73 million a member of the European Union.

"We will never make concessions over the values of people, the basic principles of our republic. This is our promise. We will embrace Turkey as a whole without discriminating," he said at a rally in the capital, Ankara.

European Commission President Jose Manuel Barroso welcomed Erdogan's victory.

"This comes at an important moment for the people of Turkey as the country moves forward with political and economic reforms," Barroso said in a statement.

The EU chief said that Erdogan "has given his personal commitment to the sustained movement towards" the EU.

The 27-nation bloc, while divided over whether Turkey should one day join the EU, continues to spur Ankara to continue reforms to keep its membership bid on track.

The stock market rose in morning trading Monday over expectation of continuity in economic reforms and in Turkey's troubled efforts to join the European Union. The benchmark IMKB-100 stock market index closed at 54,424.55. Under Erdogan, inflation has dropped, foreign investment has increased, and the economy has grown at an annual average of 7 percent.

The military-backed, secular establishment, was concerned that Erdogan and his allies were plotting to scrap Turkey's secular traditions despite their openness to the West.

Erdogan attributed his party's win to public reaction to military interference in his choice of presidential candidate. Foreign Minister Abdullah Gul was forced to abandon his presidential bid after opponents said Gul's election would remove the last obstacle to an Islamic takeover of government and the military — instigator of past coups — threatened to intervene to safeguard secularism.

"It was a public reflex against what was done to Gul," Erdogan was quoted as telling Milliyet newspaper.

One of Parliament's first jobs will be to elect a president. The post is largely ceremonial, but the incumbent has the power to veto legislative bills and government appointments. It was not clear if Erdogan, emboldened by the election victory, would again push for Gul's candidacy or nominate a compromise candidate so as not to raise tensions.

"Foreign Minister Abdullah Gul could easily take the magnitude of this win as a mandate to stand again," said Tolga Ediz, an analyst with Lehman Brothers. But "it will not be in (the party's) interest to increase tension so soon after the election."

The government will have to decide how to deal with violence by Kurdish rebels seeking autonomy. NATO member Turkey is considering whether to stage an offensive into northern Iraq against separatist Kurdish rebels who are based there.

Though the ruling party emerged from the vote with a smaller majority than in 2002 elections, its officials expressed surprise with how well they did given the current atmosphere of tension with the secularists.

Two secular parties, the Republican People's Party and the Nationalist Action Party, won 112 seats and 71 seats, respectively, Anatolia said.

Politicians backed by a Kurdish party that seeks more rights for the ethnic minority returned to Turkey's Parliament for the first time in more than a decade. The Democratic Society Party, or DTP, won 23 seats in the Parliament, according to a media report.

The party's candidates ran as independents to circumvent a 10 percent vote threshold required to win representation in Parliament. The Kurdish politicians were expected to regroup under the party banner when the new Parliament convenes.

According to projected results, 50 female lawmakers are expected to enter the Parliament, bringing the share of them in the Parliament to an all-time high of almost 10 percent, the Milliyet newspaper said.

Fourteen parties and 700 independent candidates competed for a total of 42.5 million eligible voters. Voting is compulsory in Turkey, though fines for failing to vote are rarely imposed, and 2002 election turnout was 79 percent.

Turnout was more than 80 percent, and voting was largely peaceful, election officials said.