An Istanbul mayor has been sentenced to more than two years in Turkey for insulting election commission members, jeopardizing any potential election campaign against President Recep Tayyip Erdogan, Bloomberg writes.

A court in Istanbul sentenced Ekrem Imamoglu to two years and seven months in prison. If the verdict is upheld by higher appeals courts, it will result in a ban on political activities by Imamoglu, the most popular political figure to challenge Erdogan in elections scheduled for June.

Imamoglu remains mayor until sentenced by higher courts.

Investors sold off Turkish assets after the court ruling, with the benchmark Borsa Istanbul 100 index closing 3.6 percent lower for the day. The lira was down as much as 0.2% against the dollar. Five-year credit default swaps, which measure the cost of insuring against a possible default on Turkish debt, rose to 508 basis points, the biggest jump in more than a week.

The spat between Turkey's mayor and president dates back to the 2019 election, when Imamoglu won Turkey's largest city in a stunning victory for the main opposition party, the AKP. Erdogan's own political ascent began in the same city 25 years ago, and he took the election defeat in Istanbul personally.

Turkey's Supreme Electoral Council overturned Imamoglu's first electoral victory because of the strong influence of Erdogan's aides. The mayor won the second vote by a wide margin.

Thousands of people gathered in front of a municipal building in Istanbul's Saracane neighborhood shortly after Imamoglu called on his constituents to show their opposition to this great act of lawlessness. He greeted the crowd from the roof of a bus and addressed his supporters along with Meral Aksener, chairman of the opposition Iyi party.

The mayor's supporters chanted slogans calling for the government's resignation and waved Turkish flags. 

The mayor is accused of insulting election board members for comments he made in November 2019, months after he won the vote. He denies wrongdoing and accused the Turkish president of using "the law as a weapon" against his political opponents.

Trials involving appeals courts usually take years, which means Imamoglu can hold office and run in elections, said Cem Kaya, deputy chairman of the Istanbul-based think tank the Turkish Justice Research Center.

If Imamoglu's conviction is upheld on appeal, he will lose his seat and the city council of Istanbul's municipality, which is dominated by Erdogan's ruling party, will elect a new mayor.

Erdogan himself lost his position as mayor of Istanbul more than two decades ago after he was imprisoned for reading a poem that the courts found inciting religious hatred. The Turkish president's political career received a boost after his imprisonment.

According to Aksener, Imamoglu's conviction will give the same boost to the opposition. The opposition alliance has not yet announced a single candidate for the elections, which are due in six months. The heads of all six parties in the opposition bloc will meet Thursday in Istanbul to show their opposition to the court ruling.

Aksener pointed to the continued support of Imamoglu, who, according to credible pollsters, has a realistic chance of defeating Erdogan if he runs for president. The mayor refrained from explicitly expressing such ambitions.

Meanwhile, the president is increasing pressure on the opposition ahead of the vote.

Earlier this year, the highest appeals court upheld a prison sentence of nearly five years for another key figure in the PPR, Canan Kaftancioğlu, on charges of insulting Erdoğan. Kaftancioğlu was considered the architect of Imamoglu's victory in Istanbul.