ISTANBUL, Turkey (CNN) -- Turkey's ruling Islamist-rooted party claimed a resounding victory Sunday, winning nearly 47 percent of the vote in the country's parliamentary elections, electoral officials said.
Supporters of Prime Minister Recep Tayyip Erdogan's party celebrate Sunday's victory.
With 99 percent of the votes counted, Prime Minister Recep Tayyip Erdogan's Justice and Development party, or AKP, was set to hold 342 seats in the country's 550-seat parliament.
Under Turkey's system for apportioning parliamentary seats, the party is losing 21 seats, even though its share of the vote was larger than it was in 2002, when it was voted into power.
The AKP's Islamic roots and its appeal to religious supporters have unnerved many voters in a nation that has followed a strict code of secularism since it was founded in 1923. Renewed fighting with Kurdish guerrillas along the mountainous southeastern border with Iraq has also brought in widespread criticism from opposition parties.
Sunday's victory is a boost for Erdogan, who called the early elections in May after opposition lawmakers blocked his choice of Foreign Minister Abdullah Gul to become the country's president.
The nomination sparked massive protests from Turks who feared the AKP would attempt to turn Turkey into an Islamic state. It also elicited a warning from Turkey's military -- which has seized power from civilian governments three times and pushed out a forerunner of the AKP in the 1990s -- that it would step in if necessary to protect the republic's secular tradition.
But the country has been prosperous since Erdogan took office in 2003, promising to pursue pro-business policies and to push for Turkey's entry into the European Union. He urged his followers to accept the election results "with maturity."
"The elections are over, but the test continues for us," he said. "We practice unity politics, and we will continue doing that." Watch Erdogan claim victory »
The secularist Republican People's Party (CHP), which dominated the Turkish republic from 1923 until 1950, won 20.9 percent of the vote and more than 100 seats in parliament. The conservative National Movement Party, which has urged tough action against Kurdish guerrillas blamed for recent bombings in Ankara and other cities, won 14.4 percent and at least 70 seats in parliament.
The nationalists currently hold no seats in parliament, and their campaign appears to have drawn more support from Erdogan's ruling party than from the secular CHP.
In addition, the new parliament is likely to include more than 20 independent members -- most of them Kurdish.
Though a NATO ally, Turkey refused to participate in the U.S.-led invasion of Iraq. It also has been increasingly critical of the U.S.-backed Iraqi government's failure to crack down on Kurdish separatists it says are using Iraq's Kurdish territories as a staging area for attacks on Turkish soil.
Turkey has massed troops along its southeastern border, and top military officials have hinted that it was ready to launch strikes into Iraqi territory to deal with the separatists.
About 80 percent of Turkey's 42 million-plus eligible voters turned out Sunday, the government's electoral commission said. The board is expected to certify the results within a week. E-mail to a friend
CNN's Talia Kayali contributed to this report.