ADDIS ABABA (Reuters) - An Ethiopian court sentenced an opposition politician to six and a half years in prison on Thursday over a series of anti-government comments on Facebook that it said encouraged terrorist acts, his lawyer said.

Yonatan Tesfaye, a former spokesperson for the opposition Semayawi Party, was arrested in 2015 and charged in May last year over remarks he made about anti-government protests on the social media site.

Hundreds of people died in anti-government demonstrations in 20015 and 2016 in the Horn of Africa nation.

Since then, more than 26,000 people have been detained, including many opposition activists, according to an April parliamentary report. A state of emergency has been partially lifted, but many restrictions are still in place.

Yonatan’s charges were brought under a 2009 law that prescribes jail terms of 10 to 20 years for anyone convicted of publishing information that could induce readers to commit acts of terrorism.

His lawyer Shibiru Belete said Thursday’s sentence handed down by a high court in the capital Addis Ababa took into account the 17 months Yonatan has already spent behind bars.

“That is unless it is reversed by appeal (by prosecutors),” he told Reuters.

Thursday’s sentencing comes a day after Ethiopia convicted a journalist of inciting violence against the state. Reporter Getachew Shiferaw will be sentenced on Friday.

Critics say Ethiopia, sandwiched between volatile Somalia and Sudan, regularly uses security concerns as an excuse to stifle dissent and clamp down on media freedoms.

Ethiopia’s 547-seat parliament does not have a single opposition politician in it.

Opposition groups accuse the government of constant harassment and intimidation.