Turkey's President Tayyip Erdogan has retained the presidency in a run-off election with 52.14% of the votes, the High Election Board head Ahmet Yener said, making the results official.

With 99.43% of ballot boxes opened, Mr Erdogan's rival Kemal Kilicdaroglu received 47.86% of the votes, Mr Yener said.

With a gap of more than 2 million votes between candidates, the rest of the uncounted votes will not change the result, he added.

Earlier, addressing supporters from on top of a bus in Istanbul, Mr Erdogan thanked people for voting and said Turks had given him the responsibility of governing for the next five years.

"The only winner is Turkey," he said.

Final official results have yet to be released.

Mr Kilicdaroglu, who had the backing of a six-party opposition alliance, expressed "real sadness" about the country's future, following Mr Erdogan's declaration of victory.

"My real sadness is about the difficulties awaiting the country," he said.

We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences

Russian President Vladimir Putin offered congratulations to Erdogan. The presidents of Iran and Algeria and the Emir of Qatar were among leaders to congratulate him in the Middle East, where he has asserted Turkish influence, at times with military power.

US President Joe Biden also congratulated President Erdogan on his re-election, as did the leaders of France, Germany and Britain.

The election had been seen as one of the most consequential yet for Turkey, with the opposition believing it had a strong chance of unseating Erdogan after his popularity was hit by a cost-of-living crisis.

Instead, victory will reinforce his image of invincibility, after having already redrawn domestic, economic, security and foreign policy in the NATO member country of 85 million people and positioned Turkey as a regional power.

Turkish President Recep Tayyip Erdogan speaks to supporters as he claims victory

Mr Erdogan, head of the Islamist-rooted AK Party, appealed to voters with nationalist and conservative rhetoric during a divisive campaign that deflected attention from deep economic troubles.

The defeat of Mr Kilicdaroglu, who promised to set the country on a more democratic and collaborative path, would likely be mourned in Western capitals which have been alarmed by his ties to Russia.

Across the Middle East, the prospect of five more years of Mr Erdogan does not appear to be prompting the alarm it might once have after he reached accommodations with several of the governments with which he had been at odds.

Kemal Kilicdaroglu being photographed by the media after casting his vote

Erdogan supporters who gathered outside his Istanbul residence chanted Allahu Akbar, or God is Greatest.

"I expect everything to become better," said Nisa, 28, a woman wearing a headband with Mr Erdogan's name.

Another Erdogan supporter said Turkey would get stronger with him in office for five more years.

"There are issues, problems in every country around the world, in European countries as well ... With strong leadership we will overcome Turkey's problems as well," said the supporter who gave his name as Mert, 39, as he celebrated with his son.

Bugra Oztug, 24, who voted for Mr Kilicdaroglu, blamed the opposition for failing to change. "I feel sad and disappointed but I am not hopeless. I still think there are people who can see the realities and truth," Oztug said.

Mr Erdogan's performance has wrong-footed opponents who thought voters would punish him over the state's initially slow response to devastating earthquakes in February, in which more than 50,000 people died.

But in the first round of voting on 14 May, which included parliamentary elections, his AK Party emerged top in 10 of the 11 provinces hit by the earthquakes, helping it to secure a parliamentary majority along with its allies.

Economic policy in focus

Emre Erdogan, a political science professor at Istanbul's Bilgi University, attributed Mr Erdogan's success to his supporters' belief "in his ability to solve problems, even though he created many of them".

Mr Erdogan had also maintained the support of conservative voters who long felt marginalised by the secular elites that used to dominate Turkey. "This era will be characterised by a decline in political and civil liberties, polarisation, and cultural fights between two political tribes," he said.

Mr Erdogan appeared to have prevailed despite several years of economic turmoil which critics blame on unorthodox economic policies which the opposition had pledged to reverse.

Uncertainty about what an Erdogan win will mean for economic policy pushed the lira to record lows last week.

Reuters reported last week that there is disagreement and uncertainty within Mr Erdogan's government over whether to stick with what some call an unsustainable economic programmed or to abandon it.

Critics had declared the vote a test of whether such an autocratic leader could be peacefully removed.

But ahead of the first-round presidential election, Mr Erdogan - a veteran of a dozen election victories – said he respected democracy and denied being a dictator.

Mr Kilicdaroglu, who ran a mostly inclusive campaign in the face of attacks from Mr Erdogan, had promised to reset governance, restore human rights, and return independence to the courts and central bank after they were sidelined over the last decade.

After his ruling alliance won a comfortable majority in parliament in the 14 May vote, Mr Erdogan had warned that a diverse opposition alliance of six parties would struggle to govern and he would continue his strong leadership in a new five-year term as president.