Election officials count the votes at a polling station in Istanbul, Turkey, Sunday, May 14, 2023.

ANKARA, Turkey — Turkey's incumbent President Recep Tayyip Erdogan declared victory Sunday in his country's second round of elections, extending his increasingly authoritarian rule into a third decade.

With nearly 99% of ballot boxes opened, unofficial results from competing news agencies showed Erdogan with 52% of the vote, compared to 48% for challenger Kemal Kilicdaroglu.

In his first comments since voting closed, Erdogan addressed supporters on a campaign bus outside his Istanbul home.

“I thank every member of our nation for entrusting me with the responsibility to govern this country once again for the next five years,” he said.

He taunted his challenger for his defeat, saying “bye bye bye, Kemal,” as the supporters booed.

“The only winner today is Türkiye,” Erdogan said.

In Istanbul, Erdogan's supporters began celebrating even before the final results arrived, waving Turkish or ruling party flags and honking car horns.

The results could have implications far beyond Ankara. Türkiye stands at the crossroads of Europe and Asia, and plays a key role in NATO.

Erdogan's government vetoed Sweden's bid to join NATO and buy a Russian missile defense system, prompting the United States to expel Turkey from the US-led fighter jet project. But it also helped broker a landmark deal that allowed Ukraine's grain shipments and averted a global food crisis.

Election representatives count votes at a polling station in Istanbul, Turkey during the first round of presidential voting on May 14.

Rival news agencies derive their data from full ballot box tallies collected by personnel on the ground, and are strong in different regions, explaining some of the variation in the preliminary data. Turkey's electoral council sends its own data to political parties during vote counting, but doesn't announce official results until days later.

Erdogan, who has ruled Turkey for 20 years, is hotbed to win a new five-year term in the second round, having failed to claim an outright victory in the first round on May 14.

The divisive populist finished four percentage points ahead of Kilicdaroglu, the candidate from the six-party alliance. Erdogan's performance comes despite crippling inflation and the impact of the devastating earthquake three months ago. This was the first time he did not win an election in which he ran as a candidate.

The two candidates offer very different visions of the country's future, and its recent past.

“This election took place under very difficult circumstances, there was all kinds of slander and defamation,” the 74-year-old Kilicdaroglu told reporters after casting his vote. “But I believe in people's common sense. Democracy will come, freedom will come, people will be able to roam the streets and freely criticize politicians.”

Addressing journalists after casting his ballot at a school in Istanbul, Erdogan noted that this was the first round of presidential elections in Turkey's history. He also praised the high turnout in the first round and said he expected turnout to be high again on Sunday. He was voting at the same time as Kilicdaroglu, as local television showed his rival voting on a split screen.

“I pray to God, may this (election) be beneficial for our country and nation,” he said.

Critics blame Erdogan's unconventional economic policies for skyrocketing inflation that has fueled a cost-of-living crisis. Many also blame the government for being slow to respond to an earthquake that killed more than 50,000 people in Turkey.

Turkey's president and leader of the People's Alliance party, presidential candidate Recep Tayyip Erdogan, leaves the polling station after casting his ballot at a polling station in Istanbul, Turkey, Sunday, May 28, 2023.

Turkey's president and leader of the People's Alliance party, presidential candidate Recep Tayyip Erdogan, leaves after casting his ballot at a polling station in Istanbul, Turkey on Sunday.

Emrah Gurel/Associated Press

In the predominantly Kurdish province of Diyarbakir – one of 11 areas hit by the February 6 quake – 60-year-old pensioner Mustafa Yesil said he was voting for “change”.

“I am not at all happy with the state of this country. Let me be clear, if the current government continues, I don't see good things going forward,” he said. “I see this is going to end badly – this government has to change.”

Mehmet Yurttas, an Erdogan supporter, disagrees.

“I believe our homeland is at its peak, in very good condition,” said the 57-year-old shop owner. “Our country's track is very good and will continue to be good.”

Erdogan has won the support of conservative voters who remain loyal to him to raise the profile of Islam in Turkey, which was founded on secular principles, and to increase the country's influence in world politics.

Erdogan, 69, could stay in power until 2028. A devout Muslim, he heads the religiously conservative Justice and Development Party, or AKP. Erdogan transformed the presidency from a largely ceremonial role into a power post in a narrowly won 2017 referendum that abolished Turkey's parliamentary system of government. He was the first president to be directly elected in 2014, and won the 2018 election ushering in executive presidency.

The first half of Erdogan's term included reforms that allowed the country to begin talks to join the European Union, and economic growth that lifted many people out of poverty. But he later moved to clamp down on freedoms and the media and concentrate more power in his own hands, especially after the failed coup attempt which Turkey says was masterminded by US-based Islamic cleric Fethullah Gulen. The cleric denied involvement.

Erdogan's rival is a mild-mannered former civil servant who has led the pro-secular Republican People's Party, or CHP, since 2010. Kilicdaroglu campaigned on promises to reverse Erdogan's democratic decline, to revive the economy by returning to more conventional policies, and to improve relations with West.

Turkey's CHP party leader and Nation Alliance presidential candidate Kemal Kilicdaroglu, and his wife Selvi Kilicdaroglu, vote at a polling station in Ankara, Turkey, Sunday, May 28, 2023.

Turkey's CHP party leader and Nation Alliance presidential candidate Kemal Kilicdaroglu, and his wife Selvi Kilicdaroglu, cast their ballots at a polling station in Ankara, Turkey on Sunday.

Ali Unal/Associated Press

In a frantic attempt to reach nationalist voters in a second round, Kilicdaroglu vowed to send refugees back and set aside peace negotiations with Kurdish militants if he is elected.

Kilicdaroglu's defeat would add to Erdogan's long list of electoral defeats and pressure him to step down as party chairman.

Erdogan's AKP party and its allies retain a majority of seats in parliament after the legislative elections which were also held on May 14.

Sunday also marked the 10th anniversary of the start of the mass anti-government protests that broke out over plans to uproot trees in Istanbul's Gezi Park, and became one of the most serious challenges to Erdogan's government.

Erdogan's response to the protests, in which eight people were convicted of alleged involvement, was a harbinger of a crackdown on civil society and freedom of expression.

Following the May 14 vote, international observers pointed to the criminalization of the spread of false information and online censorship as evidence that Erdogan had an “unjustified advantage.” They also say that the strong turnout shows the resilience of Türkiye's democracy.

Erdogan and pro-government media have described Kilicdaroglu, who enjoys the backing of the country's pro-Kurdish party, as colluding with “terrorists” and supporting what they describe as “deviating” LGBTQ rights.

Kilicdaroglu “takes his orders from Qandil,” Erdogan said repeatedly at the recent campaign, a reference to the mountains in Iraq where the leadership of the outlawed Kurdistan Workers' Party, or PKK, is based.

The election was held as the country marks the 100th anniversary of its founding as a republic, following the collapse of the Ottoman Empire.

Bilginsoy reporting from Istanbul. Mucahit Ceylan contributed from Diyarbakir, Turkey and Cinar Kiper contributed from Bodrum, Turkey.