Istanbul mayor Ekrem Imamoglu defeated President Recep Tayyip Erdogan's ally in a controversial 2019 vote

Istanbul (AFP) - A Turkish court on Wednesday sentenced Istanbul’s popular opposition mayor to nearly three years jail in a politically charged trial that effectively bars him from standing in next year’s presidential election.

Ekrem Imamoglu’s team immediately vowed to appeal against his conviction in a case stemming from a remark he made after defeating President Recep Tayyip Erdogan’s ally in a hugely controversial 2019 mayoral vote.

People who are sentenced to less than four years are rarely put behind bars in Turkey.

But his conviction for defamation disqualifies Imamoglu – one of the brightest stars of Turkey’s main secular party – from politics for the duration of the sentence.

Imamoglu will continue serving as Istanbul’s mayor while his appeal winds its way through the courts.

“This is a pathetic approach to democracy and the rule of law,” Imamoglu’s lawyer Kemal Polat told AFP.

The trial focused on an offhand remark Imamoglu made to reporters a few months after defeating Erdogan’s ally in a re-run election held after his first victory was annulled.

Officials reported discovering hundreds of thousands of “suspicious votes” after Erdogan refused to acknowledge Imamoglu’s initial win in a city that he himself ran before entering national politics two decades ago.

The decision backfired badly on Erdogan’s Islamic-rooted party.

Waves of protests and a groundswell of support from all political corners delivered Imamoglu an overwhelming victory in a re-run vote held that June.

Imamoglu let his frustration at the entire episode spill over a few months later by calling the people who annulled the first vote “idiots”.

An Istanbul court sentenced Imamoglu to two years and seven-and-a-half months in prison on the charge of “insulting” public officials.

It also applied a separate clause of the penal code that bars the mayor from politics.

- Divided opposition -

Imamoglu’s pending disqualification from politics comes with Turkey’s opposition parties still arguing about who should stand against Erdogan in next June’s presidential vote.

The Istanbul mayor is among a handful of opposition leaders that polls show could beat Erdogan in a head-to-head race.

Erdogan’s domination of Turkish politics has been shaken by an economic crisis made worse by his unconventional approach to interest rates.

But more recent polls show Erdogan’s ratings beginning to recover thanks to his widely praised handling of Russia’s invasion of Ukraine.

This puts even more pressure on the opposition to put aside their personal rivalries in the election campaign.

Imamoglu’s CHP party is headed by Kemal Kilicdaroglu – a leftist former civil servant who generally performs poorly in opinion polls.

The CHP has been holding round-table talks with five smaller allies about a single candidate who would not split the anti-Erdogan vote.

Those talks have been mired in arguments over policy and general unease about fielding Kilicdaroglu instead of someone more likely to beat Erdogan.

Imamoglu appeared to sense a guilty verdict coming when he told reporters this week that Kilicdaroglu was the only candidate who could represent the CHP.

“But at the end of the day it is up to the round-table to make a decision about a single candidate,” Imamoglu said.