The Istanbul chief of opposition party Republican People's Party (CHP) Canan Kaftancıoglu has been sentenced on Friday for over nine years in jail over social media posts.

A Turkish court has sentenced her to jail for nine years and eight months reportedly over the crimes that include insulting the president and spreading terrorist propaganda.

The indictment also accused Kaftancioglu of insulting the government and public servants, inciting hatred and enmity, mostly on the basis of tweets posted between 2012 and 2017.

The prosecutors originally sought up to 17 years of imprisonment for Kaftancıoglu.

The Republican People's Party (CHP) said Canan Kaftancioglu, the head of its leadership in Istanbul, would not immediately go to jail pending the appeals process.

Many are seeing the judgment as an act of revenge as Canan is believed to be the driving force behind the victory of her party's candidate in the election for Istanbul mayor. Th seat otherwise had been held by President Tayyip Erdogan's Justice and Development Party (AK) Party and its Islamist predecessors for the last 25 years.

Speaking outside Istanbul's main courthouse following the verdict, Kaftancioglu said that it would not silence her. "Neither you all nor I deserved this. If the court ruling is not in line with the law and is shaped by the wishes of the political power, it means there is no law in this country," she told reporters.

"The cases opened are concluded not in the courtrooms but in the rooms of the (presidential) palace," she added. A crowd of supporters chanted: "Shoulder to shoulder against fascism." The appeals court will deliver a verdict within six months and then the decision can be appealed with the Court of Cassation, Turkey's highest appeals court, the CHP said.

Since her appointment last year as the CHP's provincial head, Kaftancioglu has been heavily criticized by members of Erdogan's AK Party.

(With inputs from agencies)