Former President Hosni Mubarak got a life sentence Saturday for failing to stop the killing of 900 protesters during Egypt's uprising.
But he and his sons were cleared of corruption charges, setting off protests demanding greater accountability for 30 years of abuses.
By nightfall, up to 10,000 people were in Cairo's Tahrir Square, the birthplace of the uprising, to vent anger over the acquittals. Similar protests were held in the Mediterranean port city of Alexandria and Suez on the Red Sea.
"Justice was not served," said Ramadan Ahmed, whose son was killed Jan. 28, 2011, the bloodiest day of the uprising. "This is a sham," he said outside the courthouse.
After the sentencing, Mubarak suffered a "health crisis" on a helicopter flight to a Cairo prison hospital, according to security officials speaking on condition of anonymity. State media said it was a heart attack.
The officials said Mubarak resisted leaving the helicopter at the prison hospital. They said he insisted he be flown to a military hospital on the outskirts of Cairo where he had been held in a luxury suite during the trial. He finally left the chopper and moved to the prison hospital more than two hours later.
The case against Mubarak, his sons and top aides was limited in scope, focusing only on the uprising's first few days and two narrow corruption cases, not the wrongdoing under Mubarak's three decades of authoritarian rule enforced by a brutal police force and a group of businessmen linked to the regime who amassed wealth while nearly half of Egypt's 85 million people lived in poverty.
Mubarak, 84, and his ex-security chief Habib el-Adly were convicted of complicity in the killing of protesters and received life sentences. They could have been sentenced to death.
Six top police commanders were acquitted of the same charge, with chief Judge Ahmed Rifaat saying there was a lack of concrete evidence.
That absolved the only other representatives of Mubarak's hated security forces aside from el-Adly. It was a stark reminder that though the head has been removed, the body of the reviled security apparatus is largely untouched by genuine reform or purges since Mubarak was ousted 15 months ago.
In many ways, the old system remains in place. Ahmed Shafiq, Mubarak's longtime friend and last prime minister, is one of two candidates in the presidential runoff set for June 16-17.
Shafiq last week declared himself an admirer of the uprising, calling it a "religious revolution" and pledged there would be no turning back the clock when he is at the helm. Saturday, he said the verdict showed that no one was above the law in today's Egypt.
His opponent, Mohammed Morsi of the fundamentalist Muslim Brotherhood, tried to capitalize on the anger over the acquittals, vowing at a news conference that, if elected, he would retry Mubarak along with former regime officials suspected of involvement in killing protesters.
Mubarak and his two sons were acquitted of corruption charges, along with family friend Hussein Salem, who is on the run. The corruption charges were related to the Mubaraks' purchase of five villas built by Salem at a fraction of their price and Mubarak's decree to allow a Salem company to export natural gas to Israel. The judge cited a 10-year statute of limitations that had lapsed.
The sons -- one-time heir apparent Gamal and wealthy businessman Alaa -- will not be freed because they are awaiting trial on charges of insider trading. They have been held in custody in Torah prison.
A bedridden Mubarak sat stone-faced and frowning in the courtroom's defendants' cage while Rifaat read out the conviction and sentence, showing no emotion. His sons Gamal and Alaa looked nervous but did not react to either the conviction of their father or their own acquittals.
Rifaat opened the session with an indictment of Mubarak's regime that expressed deep sympathy for the uprising.
"The people released a collective sigh of relief after a nightmare that did not, as is customary, last for a night, but for almost 30 black, black, black years -- darkness that resembled a winter night," he said.
Rifaat criticized the prosecution's case, saying prosecutors had not proved that the protesters were killed by police. Because those who pulled the trigger have not been arrested, he added, he could not convict any of the top police officers of complicity in the killings.
The prosecution had complained during the trial that it did not receive any help from the Interior Ministry in its preparation for the case and, in some cases, prosecutors were met with obstruction.