Ekrem Imamoglu was questioned on Saturday in a court in Istanbul and, according to a statement, spent five hours answering questions about "helping a terrorist organization".
Outside the court in the Caglayan district, over a thousand supporters gathered to show their support. The demonstration began calmly, but when more and more demonstrators joined, the police used pepper spray against them.
Images from the scene show the police also using water cannons and tear gas against the demonstrators, who responded by firing fireworks.
In his statement, released via Istanbul's city hall, Imamoglu says that "those behind this legal process will be held accountable before both the divine and worldly courts".
Erdogan warns
Saturday's protests follow three days of massive demonstrations with hundreds of thousands of participants that have shaken Turkey after Imamoglu's arrest on Wednesday – despite the authorities issuing a demonstration ban that was extended on Saturday.
It was also announced that the police would arrest anyone suspected of traveling to Istanbul, Ankara, or the port city of Izmir to participate in the protests.
In connection with Friday's regime-critical demonstrations, Turkish police arrested 343 people, according to Interior Minister Ali Yerlikaya.
President Recep Tayyip Erdogan warned Imamoglu and his supporters on Saturday that the government would no longer tolerate "street terror".
For four days, they have done everything to disrupt public order and divide the country, Erdogan said in a speech.
Primary election on Sunday
Shortly after midnight on Saturday, the demonstrations in Istanbul were dispersed after the police, with the help of tear gas, forced the crowd to leave. Many were arrested, according to AFP journalists on the scene, but no official figures are available yet.
Imamoglu belongs to the old ruling party, the opposition party CHP, and has been pointed out as Erdogan's worst rival in the next presidential election.
On Sunday, CHP will hold a primary election to select a presidential candidate, and Imamoglu is expected to win. The party has opened the election to all Turkish citizens, not just party members, in the hope of gaining even greater support for the arrested mayor.
The Republic of Turkey was proclaimed in 1923 with national father Kemal Atatürk as president. It was supposed to be a modern nation-state with universal suffrage to a parliament, but until the 1950 election, only one party, the Republican People's Party (CHP), was allowed.
The military has intervened in politics several times, both deposing and appointing leaders. Throughout the 1990s, the country was ruled by short-lived coalition governments.
In 2001, the current president and former Istanbul mayor Recep Tayyip Erdogan founded the conservative Islamist Justice and Development Party (AKP). It has ruled the country since 2002. Erdogan was prime minister between 2003 and 2014, when he took over the presidency from Abdullah Gül.
Democracy has gradually been dismantled as the president has taken control of, or shut down, regime-critical media. With a constitutional amendment in 2017 and further legislative changes and decrees after the re-election in 2018, Erdogan has reshaped the state apparatus in a way that essentially means that parliamentarism has been replaced by a presidential system. At the same time, Erdogan has given Islam an increasingly prominent place in politics.
Sources: UI and others