CAIRO - Hosni Mubarak kept Egypt under total control for nearly three decades, not through charisma or inspiration, but by building a system of patronage and brutality that was beyond challenge. In the past two weeks, those methods have failed him.

The popular uprising in the Arab world's biggest country has tested the limits of Mubarak's reliance on the system he inherited and reshaped, and his frequent threat that, without him in charge, the country would face chaos - a tradeoff that the country's middle and upper classes have not been willing to make.

Change here has been pushed by a new generation that refuses to accept the rationalizations of its parents. When the economy began to sour two years ago, young people discovered that a system built on nepotism and bribery was shutting them out of university slots and jobs. Their grievances mounted, and then spilled out on the streets, with demands for an end to Mubarak's authoritarian rule.

Mubarak - aloof and, up to now, savvy about keeping himself in power - attracts great loyalty, still, of course.

His followers call him their father and protector. But interwoven with the passion and faith of those on his side are new feelings - of sympathy. After he addressed the nation Tuesday night, in his pleasant baritone, supporters on the streets of Cairo argued that he's an old man, at 82, and should be allowed his dignity.

Aladdin Elaasar, author of the book "The Last Pharaoh,'' calls Mubarak's government "a neo-sultanistic regime." It's a system, he writes, based not on ideology or even leadership qualities, but on "a mixture of fear and rewards to his collaborators."

Or, as Elaasar put it: "The ruler exercises his power without restraint, at his own discretion."

The blinded 'hero'

Mubarak sits atop the pyramid of Egyptian society. Orders flow down, and money - almost certainly - flows up. Egyptian corruption grew to enormous proportions under him.

"But it was very comfortable for him," said Amaney Jamal, an expert on Arab politics at Princeton University. "He felt the status quo was sustainable."

Under this structure, what doesn't flow back up to the top is reliable information. Mubarak's Egypt is a nation with a huge and pervading police structure, but critics say its spies and torturers were incapable of presenting a reliable picture of the country to the people at the apex, because they rejected anything that didn't fit their own view. "We live in a triangle society," said Abd Al Rahman, an English teacher. The subordinate's duty is to obey, not to discuss and never to question.

This is a weakness of any hierarchical structure, but in Egypt's case it became nearly absolute.

"He has merged his own ego with the state," said Dina Guirguis, of a Washington-based group called Voices for a Democratic Egypt. "He views himself as Egypt's hero."

But more and more, the hero, blinded perhaps by his own certainty, began to make missteps. Parliamentary elections in November and December were rigged so blatantly that even Mubarak's allies wince and acknowledge that the parliament has to go, if not immediately then soon.

A nimble authoritarian government would have flexed as grievances over corruption and the closing of opportunity grew. But Mubarak's has been neither nimble nor subtle.

Nor has he devoted attention to making his case to the Egyptian people. "He did not value the importance of politics," said a member of his own party, Abdel Monem Ali Sayed, president of the al-Ahram Center for Political and Strategic Studies.

Careful conservative

Mubarak was in the air force before he was in politics, and spent the better part of seven years on assignments in the Soviet Union. Protesters like Amr Birmawi, a journalist who spent three years in prison on terrorism charges, today say that Egypt's president absorbed a Russian military mentality - attack from the front, and keep attacking.

Considered a hero for his role in the 1973 war against Israel, Mubarak was chosen by Anwar Sadat to be vice president, and rose to the top position in 1981 when Sadat was assassinated.

Unlike Sadat, and especially unlike Gamel Abdel Nasser before him, Mubarak has no outstanding personality traits, Jamal said. "But everyone [in his inner circle] was invested in keeping him in power," she said, and Mubarak reaped the considerable benefits.

He was careful to keep the military on his side, even as he steered Egypt away from Nasser's Arab socialism, which the officer corps felt comfortable with, toward a more capitalist economy.

While there is widespread poverty, in the early 2000s a well-connected and astonishingly wealthy sliver of society emerged.

"He has done a lot of good things," said Mohamed Al Masry, former chairman of the Egyptian Chamber of Commerce. Industry, trade and tourism all prospered under Mubarak, he said.

The standard of living has gone up as well as life expectancy, said Sayed, who belongs to Egypt's ruling National Democratic Party. "But he did not match economic progress with political progress, and therefore he did not allow enough real political reform," Sayed said.

Instead, the system has been marked by spasms of brutal repression interspersed with periods of lighter authoritarianism and modest freedoms. Mubarak's police are a deeply feared force here; they beat and torture suspects, and have packed away thousands to long prison terms. Those who have amassed enormous wealth in Egypt, on the other hand, have done so through access to state-sanctioned monopolies.

Mubarak has attempted to portray himself as Washington's indispensable man in the Middle East, willing to deal with the Israelis, to act as a constraint on the Palestinians, to be a bulwark against Islamic extremism. But one result has been that the grievances that have piled up under him among Egyptians have a distinctly anti-American shading.

"You know all these tanks?" said protester Abdelfattah Zeden one day on Tahrir Square. "They're American-made."

At the same time, Mubarak up to now has had little patience for American prodding on democratic reform. "Certainly the public 'name and shame' approach in recent years strengthened his determination not to accommodate our views," wrote an American diplomat in 2009, in a diplomatic cable released by WikiLeaks. "He is a tried-and-true realist, innately cautious and conservative, and has little time for idealistic goals."

But if he's a realist, he's stuck in the 20th century. Nearly half of Egypt's population is between ages 15 and 32. They're spending their formative years on Facebook. He spent his at an air base in what was then Soviet Kyrgyzia.

Sockol is a special correspondent.