CAIRO – An Egyptian court on Saturday sentenced ousted president Mohammed Morsi of the Muslim Brotherhood to 25 years in prison in a final ruling over a case accusing him of spying for Qatar.

Morsi’s sentence in the Qatar case has been reduced to 25 years in the court’s final ruling, from an original 40 years.

Morsi is also currently serving a 20-year sentence after being convicted for the killing of protesters during demonstrations in 2012.

In 2014, Egypt charged Morsi and nine others with endangering national security by leaking state secrets and sensitive documents to Qatar. Egypt’s relations with Doha were already troubled by Qatar’s backing of Morsi.

Egypt is one of four Arab nations in a Saudi-led bloc that cut relations with the Gulf state on 5 June, accusing it of backing militant groups and cooperating with their arch-foe Iran, allegations Doha denies.