Supporters stand in front of Anadolu justice palace in Istanbul on September 21, 2022 during the trial of Istanbul Mayor Ekrem Imamoglu, on charges of insulting election officials in the Kartal district. AFP
Ekrem Imamoglu's fate is being watched closely for signs of judicial independence nine months before a general election in which Erdogan will struggle to extend his two-decade rule.
The 52-year-old mayor is the most internationally recognised of the opposition leaders who might run against Erdogan.
But a court could keep him from seeking higher office -- and possibly force him to give up his post -- as punishment for an offhand remark he made about Erdogan's ruling party in the aftermath of the heated mayoral race.
Imamoglu's office accuses the ruling party of trying to "eliminate him from the upcoming elections".
Imamoglu's office said the trial was adjourned until November 11 moments after it started on Wednesday.
The hearing itself was closed to reporters -- an unusual step in Turkey.
The police also sealed off the roads leading to the courthouse with metal fences to keep away protesters in the highly anticipated trial.
Imamoglu was stripped of his narrow March 2019 win over the ruling party's candidate after Erdogan -- who launched his own career as Istanbul mayor and views the city as his second home -- refused to recognise the result.
Election officials reported discovering hundreds of thousands of "suspicious votes" after Imamoglu had already been sworn into office.
Their decision to call a re-run election for that June sparked global condemnation and mobilised a groundswell of support for Imamoglu that included former ruling party voters.
Imamoglu won the second election by more than 800,000 votes.
But the usually soft-spoken mayor let his lingering bitterness at the ruling party spill over in November 2019.
"Those who cancelled the March 31 election are idiots," he told reporters at the time.
Erdogan's ruling party seized on the remark and sued the mayor for "insulting" public officials.
Prosecutors have asked for Imamoglu to be banned from politics and jailed for 15 months -- a relatively light sentence that almost never sees people put behind bars.
Defence lawyer Kemal Polat told AFP the mayor would immediately appeal against any ban and keep his job while the case wound its way through the courts.
"Imamoglu can remain in his current position as mayor until the end of the appeals process. He would not have to resign," Polat said.
Turkey's Western allies accuse Erdogan of stacking the courts with allies and using them to jail his rivals in the aftermath of a failed military putsch in 2016.
Erdogan responded to the coup attempt with sweeping purges that saw thousands jailed on "terrorism" and other charges.
Everyone from human rights leaders and civil servants to opposition politicians -- many of them from the main pro-Kurdish party -- were jailed in mass trials that instilled fear across swathes of Turkish society.
Turkey's status as a strategic member of NATO and a Muslim-majority democracy in a volatile part of the world has helped to preserve Erdogan's ties with the West.
But the saga over the 2019 vote turned Imamoglu into a global figure whose sentencing could raise the diplomatic stakes ahead of next year's vote.
The court case comes with Turkey's fractured opposition parties still arguing over which candidate to field against Erdogan next June.
Imamoglu and Mansur Yavas -- elected mayor of Ankara in 2019 -- have emerged as two of the more popular opposition options because of their success at the ballot box.
The mayor himself appeared to the bracing for legal battles in the months ahead that ruled him out of next year's elections.
He threw his support on Tuesday behind the candidacy of the main opposition CHP party's leader Kemal Kilicdaroglu.
"Today you are the main opposition leader, tomorrow you will be in charge of the country," he told Kilicdaroglu.