ISTANBUL — Prime Minister Recep Tayyip Erdogan of Turkey on Sunday hailed what appeared to be a clear victory for his party in local elections, providing a boost that could help him emerge from a spate of recent troubles.
Erdogan was not on the ballot in the countrywide polls, but with about half of the votes counted, his party was significantly outstripping its results in the last local elections in 2009 and roundly beating the main opposition party, Turkish news agencies suggested. Erdogan’s party had set its 2009 results of about 39 percent as a benchmark.
‘‘I thank my Lord for granting such a victory, such a meaningful result,’’ Erdogan said at a victory rally in Ankara, speaking to a crowd of supporters who had been chanting ‘‘Turkey is proud of you!’’
Incumbent candidates from Erdogan’s Justice and Development Party, better known by its Turkish acronym AKP, were also leading in high profile races in Istanbul and Ankara, according to the early results. Voter turnout appeared to be heavy, with people forming long lines at polling stations.
The strong results would appear to strengthen the prime minister following a tumultuous corruption scandal. In recent days, Erdogan has also provoked outrage at home and abroad by blocking access to Twitter and YouTube.
The results also could embolden Erdogan to run for president in an election scheduled for August. Before Sunday’s showing, he had appeared to be leaning against that route, which has risks. In a direct vote, he would have to win 50 percent in a country that is deeply polarized over his rule.
Erdogan and his party have dominated Turkish politics over the past decade in a period of great prosperity. His party came to power backed by a pious Muslim base looking for greater standing in a country that had for decades favored a secular elite. But AKP has also cultivated an identity of pragmatism and competency.
That image has been rocked by the corruption scandal, with a series of leaked tapes bringing down four ministers with revelations of bribe-taking and coverups. One tape allegedly involves Erdogan and family members, but he and his allies have rejected the allegations as a plot orchestrated by followers of US-based Muslim cleric Fethullah Gulen, a former Erdogan ally who has split with him.
Erdogan has shuffled thousands of police officers and tightened control of the judiciary, which had launched investigations. The moves prompted concern that Erdogan was moving toward more authoritarian rule. But in his victory speech, Erdogan said that democracy in Turkey is strong. ‘‘We have the democracy which the West is longing for,’’ he said.