CAIRO — Former President Hosni Mubarak sat up, waved and even smirked as he appeared at a hearing yesterday to open his retrial on charges related to the killing of protesters at the end of his rule.

The appearance in court was the first time that Mubarak, 84, had been seen in public in nearly a year, and it was brief. The presiding judge, Mustafa Hassan Abdullah, ended the session almost as soon as it began by removing himself, citing a conflict of interest, presumably because he had ruled in related cases. The postponement was not unexpected; procedural delays for one reason or another are common in Egyptian trials.

Left to puzzle over Mubarak’s improved demeanor, many Egyptians said that he appeared to be displaying a new confidence in his case or perhaps a certain
schadenfreude about the state of the country since his ouster.

“His smiling, confident expression is a very good symbol of how much has changed in the last two years since the case began,” said Magda Boutros, the criminal justice reform director at the Egyptian Initiative for Personal Rights. His supporters, she said, say that “he was right from the start to threaten that it was either him or chaos, which is more or less what we are seeing now.”When Mubarak appeared in court a few months after he was forced from power in February 2011, viewers were transfixed by the televised image of the former autocrat lying on a hospital stretcher in the metal cage used in Egyptian courts as a dock. His two sons, on trial with him for corruption, stood together in front of him to try to shield him from humiliation.

Over the two years since, his lawyers have leaked recurring reports about his failing health in an apparent effort to win him sympathy or better treatment. He remains in a military hospital on the Nile in Cairo rather than in prison because of concerns about his health.

Mubarak is expected to remain in custody while the courts seek a new judge, which could take months. And when the retrial begins, it is expected to last for months. But even if he and his sons are acquitted, they might not walk free. A new public prosecutor appointed by President Mohammed Morsi has filed additional corruption charges that might keep the Mubaraks in custody.