CAIRO — An ailing Hosni Mubarak, who had served longer than any other ruler of modern Egypt until a revolution toppled him in February, was rolled into a courtroom in a hospital bed on Wednesday to face charges of corruption and complicity in the killing of protesters, offering an indelible lesson for Egypt and the Arab world in the humbling of power.

The symbolism of the day’s events, watched live by tens of millions, made the episode one of the most visceral ever in a region where uprisings have shaken Mr. Mubarak’s contemporaries. On this day, the aura of their power was made mundane, and Mr. Mubarak, 83, dressed in prison whites and bearing a look that some read as disdainful, was chastened.

Even those who most ardently demanded his prosecution believed that his lingering prestige would keep him from a cage fashioned of bars and wire, a reflection of the unease that reigns in a country whose revolution remains unresolved. As a helicopter ferried Mr. Mubarak to the courtroom, housed in a police academy that once bore his name, cheers went up from a crowd gathered outside.

“The thief is here!” his opponents shouted. “The butcher is here!”

But the four-hour hearing perhaps spoke most eloquently to Egypt’s past, as the court brought someone to account for decades of stagnation and repression so rife it became casual, under whom Egypt lost its perch as the Arab world’s most powerful country. The future of the country remained unclear, though, still beholden as it is to a powerful military that gave up one of its own, in what some saw as a cynical gesture to appease an angry public bent on achieving a far greater transformation of Egypt than the military wants.