* Kaftancioglu was prominent in Istanbul election campaign
* European parliament rapporteur calls verdict 'outrageous'
* Lira weakened after verdict announced (Adds reaction from European Parliament, Istanbul mayor)
By Ali Kucukgocmen and Tuvan Gumrukcu
ISTANBUL, Sept 6 (Reuters) - A prominent Turkish opposition official was sentenced by a court on Friday to nine years and eight months in prison for insulting the president and spreading terrorist propaganda, a lawmaker from the main opposition party said.
The Republican People's Party (CHP) said Canan Kaftancioglu, head of its Istanbul branch and one of the strongest opposition voices within the party, will not immediately go to jail pending appeals.
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.
Kaftancioglu played a significant role in municipal elections in Istanbul that saw the CHP take over the mayoralty, which had been held by President Tayyip Erdogan's AK Party and its Islamist predecessors for the last 25 years.
Speaking outside Istanbul's main courthouse following the verdict, Kaftancioglu said 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 first session of Kaftancioglu's trial took place five days after the CHP's Ekrem Imamoglu won a re-run election for mayor of Istanbul in June.
Imamoglu said he was saddened by the verdict but believed it would be overturned by the appeals court.
Kati Piri, the European Parliament's Turkey rapporteur, tweeted that the verdict was "surreal and outrageous", adding, "Erdogan takes revenge for opposition's election victory. Unacceptable!"
Turkey's lira weakened to 5.7250 against the dollar from 5.70 when the court decision was announced.
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 criticised by members of Erdogan's AK Party.
Turkey's judicial independence has been in the spotlight in recent years, especially since a crackdown on the judiciary and other state bodies after an abortive 2016 coup and the country's switch to an executive presidency last year.
Critics say the courts are under pressure from Erdogan and his Islamist-rooted AK Party. The government has repeatedly said the judiciary is independent and makes its own decisions.
Speaking to reporters in the Aegean coastal city of Izmir, Istanbul mayor Imamoglu said he thought the verdict would be overturned at appeal.
"Despite everything, our Turkey has judges who will make the right decision on this issue," he said.
"They are there despite everything and I believe they will make the right call. Personally, I will support Canan until the end, as my provincial chairwoman and as my comrade." (Reporting by Ali Kucukgocmen and Tuvan Gumrukcu Additional reporting by Ece Toksabay Editing by Jonathan Spicer and Frances Kerry)