Turkey's President Recep Tayyip Erdogan on Sunday declared victory in the presidential election, capping off a close race and extending his increasingly authoritarian rule into a third decade. 

Erdogan’s victory comes on the heels of high inflation and the aftermath of an earthquake that leveled entire cities. 

Speaking from on top of a bus in Istanbul after the polls closed, Erdogan addressed his supporters, thanking them for entrusting him with the presidency for five more years.

"The only winner today is Turkey," Erdogan said. "No one can look down on our nation."

DOCTORS WITHOUT BORDERS CONDEMNS GREECE'S TREATMENT, DEPORTATIONS OF MIGRANTS

Turkish President Tayyip Erdogan

Turkish President Tayyip Erdogan greets his supporters following early exit poll results for the second round of the presidential election in Istanbul, Turkey May 28, 2023. (Murat Cetinmuhurdar/Presidential Press Office/Handout via REUTERS )

He ridiculed his challenger, Kemal Kilicdaroglu, for his loss, saying "bye bye bye, Kemal," as supporters booed.

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

Kilicdaroglu said the election was "the most unjust ever," with all state resources mobilized for Erdogan.

"We will continue to be at the forefront of this struggle until real democracy comes to our country," he said in Ankara. He thanked the more than 25 million people who voted for him and asked them to "remain upright." 

Kemal Kilicdaroglu clapping his hands together

Kemal Kilicdaroglu, presidential candidate of Turkey's main opposition alliance, gestures after speaking following early exit poll results for the second round of the presidential election in Ankara, Turkey May 28, 2023. (REUTERS/Yves Herman TPX IMAGES OF THE DAY)

A third term gives Erdogan an even stronger hand domestically and internationally, and the election results will have implications beyond Turkey, which stands at the crossroads of Europe and Asia, and plays a key role in NATO.

On the international stage, Erdogan's government vetoed Sweden's bid to join NATO and purchased Russian missile-defense systems, which prompted the United States to oust Turkey from a U.S.-led fighter-jet project. But it also helped broker a crucial deal that allowed Ukrainian grain shipments and averted a global food crisis.

Erdogan, who has been at Turkey's helm for 20 years, came just short of victory in the first round of elections on May 14. It was the first time he failed to win an election outright, but he made up for it Sunday.

Erdogan seeking re-election

A man walks past billboards displaying Turkish President and People's Alliance's presidential candidate Recep Tayyip Erdogan, in Istanbul, Turkey, Wednesday, April 19, 2023. (AP Photo/Francisco Seco)

CLICK HERE TO GET THE FOX NEWS APP

A devout Muslim, he heads the conservative and religious Justice and Development Party, or AKP. Erdogan transformed the presidency from a largely ceremonial role to a powerful office through a narrowly won 2017 referendum that scrapped Turkey's parliamentary system of governance. He was the first directly elected president in 2014, and won the 2018 election that ushered in the executive presidency.

Erdogan, 69, is set to remain in power until 2028.

The Associated Press contributed to this report.