The opposition party CHP's leader Özgür Özel said in his speech to the demonstrators in the capital that they had gathered to "stand up against (the judicial) coup".
This government does not want democracy. They know that they cannot win the election under democratic conditions, he continued.
On Monday, court proceedings will be held that aim to annul the result of CHP's latest vote, where Özel was elected party leader. The process is motivated by allegations of electoral fraud.
Critics believe that the trial is politically motivated and aims to undermine CHP, which is increasing in opinion and won big in the 2024 local elections over President Recep Tayyip Erdogan's party AKP.
During the year, a two-digit number of mayors belonging to CHP have been arrested, accused of corruption. Including Istanbul's mayor Ekrem Imamoglu, who is considered Erdogan's main political rival. CHP sees the arrests as a way to weaken the opposition, something the government denies.