Turkey's main opposition party, the Republican People's Party (CHP), has expressed outrage over the detaining of Istanbul mayor and CHP member Ekrem Imamoglu, who is President Recep Tayyip Erdogan's main rival.

The aforesaid political force has called Imamoglu's detention "a coup against our next president," Reuters reports.

CHP leader Ozgur Ozel urged opposition unity and said his party will go ahead and select Imamoglu as presidential candidate on Sunday irrespective.

"Turkey is going through a coup against the next President. We are facing a coup attempt here," Ozel said.

Though authorities temporarily banned protests and police shut down some city streets, about 100 people gathered at the police station to which Imamoglu was taken and chanted: "The day will come when the [ruling] AKP [party] is called to account".

Imamoglu was detained on charges of corruption and aiding a terrorist group. It came a day after another blow to him: Istanbul University annulled his degree, which if upheld would block him from running in presidential elections

Ekrem Imamoglu had long been considered President Erdogan's main rival in Turkey's upcoming presidential elections, which the country’s constitution requires must be held by 2028. But Erdogan has reached his two-term limit as president after having earlier served as prime minister. If he wishes to run again, he must call an early election before his term ends, or change the constitution.