CAIRO — An Egyptian court on Saturday sentenced former President Hosni Mubarak to life in prison as an accomplice in the killing of unarmed demonstrators during the protests that ended his nearly 30-year rule.

But a conviction that once promised to deliver a triumph for the rule of law in Egypt and the Arab world — the first Arab strongman jailed by his own citizens — instead brought tens of thousands of Egyptians back into the streets. They denounced the verdict as a sham because the court also acquitted many officials more directly responsible for the police who killed the demonstrators, and a broad range of lawyers and political leaders said Mr. Mubarak’s conviction was doomed to reversal on appeal.

Presiding over a three-judge panel, Judge Ahmed Rafaat said that prosecutors had presented no evidence that either Mr. Mubarak or his top aides had directly ordered the killing of protesters. Instead, the judge found that Mr. Mubarak, 84, was an “accessory to murder” because he failed to stop the killing, a rationale that lawyers said would not meet the usual requirements for a murder conviction under Egyptian or international law.