TEHRAN (Press Shia) – An Egyptian court on Saturday upheld life sentence in prison against the ousted president Mohamed Mursi over charges of spying for Qatar, State-run Nile TV reported.

Life sentence in Egypt is 25 years in prison.

The Court of Cassation, Egypt's highest appeal court, rejected Mursi's appeal and said the ruling against him is "final and unappealable," official news agency MENA said.

The same court confirmed death sentences against three prominent figures of Muslim Brotherhood over the same charges, Xinhua news agency reported.

The defendants were accused of sneaking classified documents about the armed forces that harm the national security to Qatar.

This is the second time that Mursi got confirmed sentence.

On Oct. 22, 2016, the same appeal court has confirmed a 20-year prison sentence against Mursi on charges of violence and murder in 2012, when clashes erupted outside a presidential palace between his supporters and opponents, which killed up to 10 people.

Mursi, Egypt's first democratically elected president, was ousted by the army in 2013. He is also convicted in other cases.

On May 17, 2015, Mursi and 106 supporters of his Muslim Brotherhood received death penalties over a mass jail break following the 2011 uprising that ousted the long time ruler Hosni Mubarak.

But the death sentence verdict was overturned and now Mursi is facing retrial.

The ousted president, along with the Brotherhood guide Mohamed Badei and other seven members of the group, was sentenced to life in prison in June 2015. Yet the case is appealable.