The head of Turkey's main opposition party in Istanbul was sentenced to about 10 years in prison on Friday on a range of charges that include "terrorist propaganda" and insulting President Recep Tayyip Erdogan. The charges related mostly to tweets that Canan Kaftancioglu, of the secular Republican People's Party (CHP), posted between 2012 and 2017. "The decisions are not taken in the courts, but in the [presidential] palace," Ms Kaftancioglu told hundreds of supporters outside the court after the judgment. Ms Kaftancioglu, a doctor by profession, played a key role in the shock victory of the CHP's new Istanbul mayor Ekrem Imamoglu earlier this year — the first time Mr Erdogan's party lost power in Turkey's biggest city in 25 years. "This trial is aimed at punishing Istanbul and those who helped the victory of the people of Istanbul. I will never give up my ideas and my convictions. They think they can scare us but we will continue to speak," she said. The CHP said the sentences must be confirmed by an appeals court before Ms Kaftancioglu can be sent to prison. Among the tweets used by the prosecution against Ms Kaftancioglu was one in which she criticised the death of a 14-year-old boy hit by a tear gas grenade during the mass Gezi Park protests of 2013. Her tweets also criticised the response to the 2016 coup. She received sentences on five charges, including 20 months for "humiliating" the state, 18 months for "insulting a public official", 28 months for "insulting the president" and 32 months for "inciting the people to hatred". Her "terrorist propaganda" charge, for which she was given 18 months, was for quoting a member of the outlawed Kurdistan Workers' Party (PKK), which has fought a bloody insurgency against the state since 1983. In their ruling, the judges said they were not suspending the sentences because Ms Kaftancioglu had not shown remorse. They cited the fact she had read out a poem by Turkey's famed poet and playwright, Nazim Hikmet, after a previous hearing, which underlines her belief that the courts were not impartial. She repeated it on Friday. "It is not my habit / To swear at a postman / A yes-man / Or to beat up a servant when I'm mad at the master," she recited. Rights groups accuse Mr Erdogan of using the judiciary as a political tool, particularly after thousands of judges were purged following an attempted coup in 2016. Mr Erdogan railed against Ms Kaftancioglu after she was appointed to the Istanbul chair in 2016. "To insult our nation's values, history and culture is not politics. Its name can only be enmity of the nation," he said, highlighting her tweets against him, the <em>Hurriyet</em> newspaper reported. The sentencing came hours after Justice Minister Abdulhamit Gul held a press conference in Ankara on the subject of imminent judicial reforms. "Our first package of judicial reform includes regulations that further secure freedom of thought and expression, eliminate arbitrariness in arrest and differences in implementation," Mr Gul said, according to the Bianet news site.