YAOUNDE (Reuters) - A Cameroonian journalist jailed for over two years for contact with Islamist militant group Boko Haram is set to be freed after a court on Thursday shortened his sentence, his lawyer said.

Radio France Internationale reporter Ahmed Abba was arrested in July 2015 and sentenced in April this year to 10 years on terrorism charges that rights groups denounced as a sham.

Authorities said they found evidence on Abba’s computer of attacks planned by Boko Haram, whose Islamist insurgency in Nigeria, Cameroon and neighboring countries has cost the lives of at least 20,000 people since 2009.

Abba has denied knowledge of attacks and protested his innocence.

The sentence was reduced to two years on Thursday when an appeals court dropped the terrorism charges but upheld less serious charges of “non-denunciation” of terrorism.

“Technically, Mr. Ahmed can be outside today, tomorrow or the day after tomorrow,” given that he has already been in jail for over two years, his lawyer Charles Tchoungang told Reuters.

Abba’s forthcoming release comes amid a crackdown on dissent by President Paul Biya who is seeking to extend his 35-year rule in elections next year. The government is confronting a growing separatist insurgency in the country’s Anglophone regions as well as the threat from Boko Haram.

Patrice Nganang, a prize-winning Cameroonian author who lives in New York, was arrested during a visit to Cameroon this month for writing a Facebook post critical of Biya. Nganang is being held in jail until court proceedings next month.

Rights Groups and RFI welcomed Thursday’s ruling.

“This ruling is a victory for Ahmed Abba who has been detained for more than two years simply for doing his job as a journalist,” said Amnesty International researcher Ilaria Allegrozzi.