CAIRO (Reuters) - Egypt’s top appeals court found former president Hosni Mubarak innocent on Thursday of involvement in the killing of protesters during the 2011 uprising that ended his 30-year rule, the final ruling in a landmark case.

Former Egyptian President Hosni Mubarak lies on a stretcher while being transported ahead of his trial in Cairo, Egypt, March 2, 2017. REUTERS/Mohamed Abd El Ghany

The trial of Mubarak, who was toppled in one of the tumultuous uprisings which shook the Arab world, captivated viewers as he appeared in a courtroom cage on charges ranging from corruption to complicity in the murder of protesters.

Mubarak was originally sentenced to life in prison in 2012 for conspiring to murder 239 demonstrators during the 18-day revolt - an uprising that sowed chaos and created a security vacuum but also inspired hope for democracy and social justice.

But an appeals court ordered a retrial that culminated in 2014 in the case against the ageing former president and his senior officials being dropped. An appeal by the public prosecution led to Thursday’s final retrial by the Court of Cassation.

After a hearing that took most of the day, Judge Ahmed Abdel Qawi announced to cheers of approval from Mubarak supporters who filled the court room: “The court has found the defendant innocent.”

The court also rejected demands by lawyers of the victims to reopen civil suits. That left no remaining option for appeal or retrial, according to a judicial source.

The families of those killed, who had attended the trial early on, were not present on Thursday.

Taha Hussein Mahmoud, whose 19-year-old son was killed during the protests in Alexandria, told Reuters by phone that the decision came as no surprise.

“In the January revolution those who won, won, and those who lost, lost. Unfortunately the blood of our family was lost in vain...they’re in a better place than we are now,” said Mahmoud.

Slideshow ( 5 images )

Lawyers of the families condemned the verdict as politically motivated. “This ruling is not fair and not just. The judiciary is politicized,” said lawyer Osman al-Hefnawy.

The courtroom was filled with Mubarak supporters who cheered “long live justice” as the verdict was read out and unfurled posters of their former leader.

TO REMAIN IN HOSPITAL?

Many Egyptians who lived through Mubarak’s rule view it as a period of autocracy and crony capitalism. His overthrow led to Egypt’s first free election, which brought in Islamist President Mohamed Mursi.

Mursi only lasted a year in office, however, after mass protests against his rule in 2013 prompted an overthrow by then army chief General Abdel Fattah al-Sisi, who went on to win a presidential election in 2014.

Sisi has since launched a crackdown on Mursi and his Muslim Brotherhood, which has been banned as a terrorist organization.

Hundreds of Mursi supporters were killed in a single day and thousands were jailed, with the dragnet quickly widening to include secular activists who were at the forefront of the 2011 uprising but opposed Muslim Brotherhood rule.

By contrast, Mubarak-era figures are gradually being cleared of charges and a series of laws limiting political freedoms has raised fears among activists that the old regime is back.

Mubarak has long maintained his innocence in the case and has said history would judge him a patriot who served his country selflessly. He waved at supporters among the journalists and others in the courtroom, who included his son Alaa.

Sitting in a wheelchair in the defendant’s cage earlier in the day, without his trademark dark sunglasses, Mubarak denied involvement in the killing of protesters.

“It did not happen,” he answered when the presiding judge read out charges of providing vehicles and weapons used to assault protesters and failing to take action to prevent deaths.

Mubarak, 88, got into a helicopter after the verdict to return to the hospital in the leafy Cairo suburb of Maadi where he has already completed a three year sentence in a separate corruption case -- the only one in which he was convicted.

A source with knowledge of the matter said that although Mubarak was free to go home, he preferred to remain at the military hospital, under constant medical supervision.