Turkish President Tayyip Erdogan has nurtured an image of a robust and invincible leader over his two decades in power, yet he appears vulnerable as the political landscape may be shifting in favor of his opponent in Sunday's presidential vote.
Erdogan emerged from humble roots to rule for 20 years and redraw Türkiye’s domestic, economic, security and foreign policy, rivalling historic leader Mustafa Kemal Ataturk who founded modern Türkiye a century ago.
The son of a sea captain, Erdogan has faced stiff political headwinds ahead of Sunday's election: he was already facing blame over an economic crisis when a devastating earthquake hit in February. Critics accused his government of a slow response and lax enforcement of building rules, failures they said could have cost lives.
As opinion polls show a tight race, critics have drawn parallels with the circumstances that brought his Islamist-rooted AK Party to power in 2002, in an election also shaped by high inflation and economic turmoil.
Two days before the vote, Erdogan said he came to office through the ballot boxes and if he had to, would leave the same way.
"We will accept as legitimate every result that comes out of the ballots. We expect the same pledge from those opposing us," he said in a televised interview on Friday.
For his enemies the day of retribution has come.
Under his autocratic rule, he amassed power around an executive presidency, muzzled dissent, jailed critics and opponents and seized control of the media, judiciary and the economy. He crammed most public institutions with loyalists and hollowed critical state organs.
His opponents have vowed to unpick many of the changes he has made to Türkiye, which he has sought to shape to his vision of a pious, conservative society and assertive regional player.
The high stakes in Sunday's presidential and parliamentary election are nothing new for a leader who once served a prison sentence - for reciting a religious poem - and survived an attempted military coup in 2016 when rogue soldiers attacked parliament and killed 250 people.
A veteran of more than a dozen election victories, the 69-year-old Erdogan has taken aim at his critics in typically combative fashion.
He has peppered the run-up with celebrations of industrial milestones, including the launch of Türkiye’s first electric car and the inauguration of its first amphibious assault ship, built in Istanbul to carry Turkish-made drones.
Erdogan also flicked the switch on Türkiye’s first delivery of natural gas from a Black Sea reserve, promising households free supplies, and inaugurated its first nuclear power station in a ceremony attended virtually by Russian President Vladimir Putin.
His attacks against his main challenger, Kemal Kilicdaroglu, have included accusations without evidence of support from the outlawed Kurdistan Workers Party (PKK), which has been waging an insurgency since the 1980s in which more than 40,000 people have been killed. Kilicdaroglu has denied the accusations.
'Building Türkiye together'
Polls suggest voting could go to a second round later this month - if neither Erdogan nor Kilicdaroglu win more than 50% of the vote - and some show Erdogan trailing. This hints at the depth of a cost-of-living crisis sparked by his unorthodox economic policies.
A drive by authorities to slash interest rates in the face of soaring inflation aimed to boost economic growth, but it crashed the currency in late 2021 and worsened inflation.
The economy was one of Erdogan's main strengths in the first decade of his rule, when Türkiye enjoyed a protracted boom with new roads, hospitals and schools and rising living standards for its 85 million people.
Halime Duman said high prices had put many groceries out of her reach, but she remained convinced Erdogan could still fix her problems. "I swear, Erdogan can solve it with a flick of his wrist," she said at a market in central Istanbul.
The president grew up in a poor district of Istanbul and attended Islamic vocational school, entering politics as a local party youth branch leader. After serving as Istanbul mayor, he stepped onto the national stage as head of the AK Party (AKP), becoming prime minister in 2003.
His AKP tamed Türkiye’s military, which had toppled four governments since 1960, and in 2005 began talks to secure a decades-long ambition to join the European Union - a process that later came to a grinding halt.
Greater control
Western allies initially saw Erdogan's Türkiye as a vibrant democracy. But his drive to wield greater control polarized alarmed international partners. Fervent supporters saw it as just reward for a leader who put Islamic teachings back at the core of public life in a country with a strong secularist tradition, and championed the pious working classes.
Opponents portrayed it as a lurch into authoritarianism by a leader addicted to power.
After the 2016 coup attempt authorities launched a massive crackdown, jailing more than 77,000 people pending trial and dismissing or suspending 150,000 from state jobs. Rights groups say Türkiye became the world's biggest jailer of journalists for a time.
Erdogan's government said the purge was justified by threats from coup supporters, as well as ISIS and the PKK.
At home, a sprawling new presidential palace complex on the edge of Ankara became a striking sign of his new powers, while abroad Türkiye became increasingly assertive, intervening in Syria, Iraq and Libya and often deploying Turkish-made military drones with decisive force.