Canan Kaftancioglu, who heads the secular Republican People's Party (CHP)'s Istanbul branch, is accused of "insulting" President Recep Tayyip Erdogan and the Turkish state in tweets posted between 2012 and 2017.
She played a key role in the victory of the newly elected Istanbul mayor Ekrem Imamoglu this week -- the first time the CHP has run the city in 25 years.
Imamoglu told reporters the case against Kaftancioglu was one of "political interference".
"It is an attempt to restrict rights and freedoms. I will always stand by her," he said.
Supporters outside the court chanted "Down with fascism" and held signs reading "We are thirsty for justice".
Kaftancioglu's tweets include an insult directed at Erdogan, and criticism of the death of a 14-year-old boy who was hit by a tear gas grenade during the mass "Gezi Park" protests of 2013.
She is also accused of "terrorist propaganda" for quoting a member of the outlawed Kurdistan Worker's Party (PKK), which has been fighting a bloody insurgency against the state since 1983.
Her supporters say another tweet, in which she appeared to deny the Armenian genocide, was fake and had been created to smear her.
"This trial, as everyone knows, is a political trial," said a lawyer for the CHP outside the court.
"We are once again before the court for a case that is unjust, outside of the law and without any foundation."
Imamoglu's landslide victory this week marked the first significant defeat for Erdogan since he took power in 2003.
There was little progress in the trial itself on Friday, with the case quickly adjourned until July 18.
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ