CAIRO, June 2 (Reuters) - Hosni Mubarak, toppled by anuprising last year after 30 years ruling Egypt, was sentenced tolife imprisonment on Saturday for his role in killing protestersafter a trial that sets a precedent for holding Middle Eastautocrats to account.

But it was not enough for thousands of Egyptians who pouredonto the streets afterwards in a nation already on edge before adeciding presidential vote in two weeks. Some wanted Mubarakexecuted, others feared the judge's ruling exposed weaknesses inthe case that could let the ex-military strongman off on appeal.

Wearing dark glasses, the 84-year-old Mubarak was wheeledinto a courtroom cage on a hospital stretcher to joinco-defendants including his two sons Alaa and Gamal, formerInterior Minister Habib al-Adli and six security officials.

Addressing the hushed courtroom, Judge Ahmed Refaat said:"The court has ordered a punishment for Hosni Mubarak of life inprison based on charges of participating in crimes of killingand attempted killing."

Propped up on the stretcher and stony-faced during theverdict, the only words the former air force commander utteredwere to acknowledge to the judge over a microphone that he waspresent before the ruling was read out. Afterwards, he waswhisked off by helicopter to a prison hospital.

His two sons, businessman Alaa, and Gamal, a former bankerwas once seen as being groomed for president before his fatherwas toppled on Feb. 11, 2011, had corruption charges quashed,but stay in jail over another case referred to court last week.

Refaat sentenced Adli, whose police force was hated for thebrutal tactics used against the revolt, to life in prison. About850 people were killed in the 18-day uprising against Mubarak.

But the judge acquitted the senior security officials forlack of evidence, a decision that worried lawyers for victims'families who said that could help Mubarak win any appeal.

Businessman and Mubarak ally Hussein Salem, being tried inabsentia, was also acquitted of corruption charges.

It was the first time an ousted Arab leader had faced anordinary court in person since a wave of uprisings shook theArab world last year, sweeping away four entrenched rulers.

State television said Mubarak suffered a "health crisis"when he was flown to Cairo's Tora prison, where he was admittedto a hospital facility. Mubarak had been held at a luxuriousmilitary-run hospital during the 10-month trial.

ONCE FETED, NOW FALLEN

A medical source said Mubarak argued with those around himwhen he landed at Tora, refusing to leave the aircraft. Mubarakalways appeared in court sessions on a stretcher but his ailmenthas not been defined.

Long feted by Arab leaders and his U.S. and other Westernallies as a lynchpin politician who offered stability in aturbulent region, Mubarak's ousting has helped redraw the MiddleEast's political map and let Islamists he once repressed sweepup parliamentary seats in the Arab world's most populous state.

The Muslim Brotherhood, Egypt's biggest Islamist group, isnow fielding one of the two challengers in a fraught run-offvote for the presidency against Mubarak's last prime minister,Ahmed Shafiq, who like his former boss once led the air force.

Unlike elections in Mubarak's time, that were routinelyrigged and the outcome guaranteed, no one can be sure who willemerge victor in the June 16 and 17 run-off that has polarisedthe nation, leaving many worrying both about Islamist rule andthe alternative of handing power back to a former military man.

Refaat opened proceedings by hailing Egyptians for removingthe only leader many of them had known. Mubarak came to power in1981 after his predecessor, Anwar Sadat, was assassinated byIslamists angry at Egypt's 1979 peace deal with Israel.

"The people of Egypt woke on Tuesday, Jan. 25, 2011, to anew dawn, hoping that they would be able to breathe fresh air... after 30 years of deep, deep, deep darkness," he said,referring to the day the uprising erupted.

Yet many Egyptians are still waiting for the light - thechaos that erupted in court after the ruling typifying a messypolitical transition that has been led by the military. Generalssay they will hand over power to a new president by July 1.

After a silence during sentencing, scuffles broke out insidethe court between security officers and people chanting "Void,void" and "The people want the cleansing of the judiciary".

Rather than a healing experience that many Egyptians wanted,many saw the trial that acquitted top security officials asshowing how much of Mubarak's old order was still in place.

Protesters gathered in Cairo's Tahrir Square, focus for theuprising that drove Mubarak out. In Alexandria, demonstratorschanted: "We are done with talk, we want an execution!"

Al Jazeera reported that Mubarak would lodge an appeal. Hislawyers could not be reached immediately for comment.

BROTHERHOOD WANTS RE-TRIAL

Yet some Egyptians said Mubarak's sentencing was enough,even if they were unhappy security officials were off the hook.

"I think the verdict on Mubarak is fair, he is over 80 yearsold and a life in prison verdict is a hard one, as it means hewill certainly spend all his remaining years in jail," saidAhmed Raouf, 30, who works at a private Cairo computer firm.

Brotherhood presidential candidate Mohamed Mursi promised ina news conference he would deliver "retribution for the martyrs"and would dig up evidence to try those responsible for killings.

"The blood of the martyrs will keep boiling in my veins," hesaid, painting himself as the choice for revolutionaries andthose seeking change in the presidential race.

Ahmed Shafiq, appointed premier in the last days ofMubarak's rule and who calls the ex-president a role model, saidon his Facebook page the trial showed no one was above the law.

"This verdict brings Egypt back to its leading regional roleas the country witnesses the first condemnation of an Arabpharaoh who ruled for 30 years," said Nabil Abdel Fattah fromthe Al-Ahram Centre for Political and Strategic Studies.

But he said the verdict would be a political football in theelection. He said Mursi wanted to show he was the only one whocould reform the system and Shafiq would seek to prove that thisshowed the judiciary could deliver a tough sentence, despitecriticism of the ruling by protesters.

Lawyers acting for the families of victims said theacquittal of the six security officials showed the weakness ofthe prosecution case. They said the sentence was designed toappease public anger, but could be overturned at appeal.

"Regarding accusations against the police leadership, thecourt is of the opinion that none of the actors who committedthe crimes of murder were caught during or after the events, sothere is no direct evidence for the charges," the judge said.

Charges against the six included complicity in killingprotesters and failing to prevent damage to public property.

New York-based Human Rights Watch said the ruling "sends apowerful message to Egypt's future leaders that they are notabove the law". But it said the acquittals suggested aprosecution failure to fully investigate killings of protesters.

Few Egyptians had expected Mubarak to be put to death,although protesters have often hung his effigy from lamp posts.

Hanafi el-Sayed, whose 27-year-old son was killed early inthe uprising, travelled from Alexandria for the trial.

"I want nothing less than the death penalty for Mubarak.Anything less and we will not be silent and the revolution willbreak out again," he said shortly before the verdict.