Egypt's top appeals court on Thursday acquitted Hosni Mubarak of involvement in the killing of protesters during a 2011 revolt, ending the final trial for the strongman who ruled for 30 years.
Mubarak had been sentenced to life in 2012 but an appeals court ordered a retrial, which dismissed the charges two years later.
Thursday's ruling by the Court of Cassation is final.
The trial was Mubarak's last, after prosecutors leveled various charges against him following his February 2011 resignation.
He was accused of inciting the deaths of protesters during the 18-day revolt, in which about 850 people were killed as police clashed with demonstrators.
Mubarak, 88, has spent most of his time in a military hospital since his arrest in 2011.
In January 2016, the appeals court upheld a three-year prison sentence for Mubarak and his two sons on corruption charges.
But the sentence took into account time served. Both his sons, Alaa and Gamal, were freed.
Six years after his overthrow, most of the charges brought against his regime members have been dismissed while the country still recovers from the aftermath of the uprising.
The revolt had ushered in years of instability that drove away tourists and investors, decimating the economy.
Mubarak's successor, Mohamed Morsi, served for only a year before the military ousted and detained him in 2013, launching a deadly crackdown on his supporters.
Morsi and hundreds of supporters have been sentenced in mass trials, although many of them are appealing the verdicts.