Hassan Hosny cheered when the Arab Spring roared into Egypt in 2011, toppling its iron-fisted ruler. A year later, the cafe manager cast his vote for the country’s first Islamist president, Mohamed Morsi. But now, like much of Egypt, Hosny appears to have done an about-face, supporting a military coup.

“We said, ‘When Morsi takes control, everything will be fixed,’ ” recalled Hosny, 32, sitting at an outdoor table surrounded by men smoking water pipes. “People like me, with a law degree, would be able to find jobs. But after he arrived, we could barely breathe.”

Hosny offers one clue to a question that has baffled many non-Egyptians: How can a country that revolted against an autocratic regime less than three years ago now embrace strong-armed military rule?

A broad swath of Egyptians has supported the July 3 ouster of Morsi and the military crackdown on his allied Muslim Brotherhood movement, which sparked clashes that have killed about 1,000 civilians in 10 days. Much of the public staunchly defends the military’s actions, including a brutal dispersal of two pro-Morsi sit-ins and the sweeping arrests of Brotherhood leaders, including four more Thursday. Cairo was bracing for even more violence, with the Anti-Coup Alliance calling for a “Friday of Martyrs” protest.

The dramatic shift in public opinion was underscored Thursday when former president Hosni Mubarak, who had ruled Egypt for three decades with the backing of the military, was freed from prison with little public protest. He was flown by helicopter to a military hospital in Cairo a day after a court ordered his release.

Like many Egyptians, Hosny blames the Brotherhood for the violence that has convulsed his country since the coup. “Most of the people believe the police and military are standing by the people’s side,” he said.

The military has portrayed its takeover as a bold stroke to save the country from terrorism. But the public’s rejection of Morsi is rooted in the wildly high hopes that ordinary Egyptians had for the Arab Spring — and their bitterness at how democracy failed to deliver jobs or social justice.

When Egyptians revolted in 2011 against Mubarak, it reflected their disgust with his government’s corruption, police abuses and inability to provide jobs for the swelling population.

In the lead-up last year to the country’s first free presidential elections, candidates offered not so much policy proposals as visions of a new country.

“Islam is the solution” was the Muslim Brotherhood’s pledge. Working-class Egyptians such as Mohammed Abdul Qadir, 43, took that to heart.

“I only wanted one thing: to be ruled under sharia,” or Islamic law, the cabdriver said. “But this didn’t happen. There was only more injustice.” By “sharia,” Abdul Qadir didn’t mean a ban on alcohol or a requirement that women wear veils. He meant the creation of a broadly just society, the kind promoted in Islamic teachings.

But his life only got worse as the already weak economy sputtered. Tourism and foreign investment dried up amid political uncertainty. There were gasoline shortages. Food prices climbed.

When Abdul Qadir became ill, he found that he couldn’t afford the cost of hospital treatment. “I used to take the bus for one [Egyptian] pound; now it’s three pounds” – or about 42 cents, he said.

“What we have seen in the past year has made me long for Mubarak’s rule,” Abdul Qadir said.

The military crackdown will undoubtedly harm the economy further. But several people working in Cairo’s downtown shops said they supported the dusk-to-dawn curfew imposed by the military-backed interim government.

“Of course we are OK with it,” said Hosny, whose cafe has lost half its business. “We want the country to be fixed.”

The economy was not the only reason that Egyptians felt betrayed by Morsi. Crime rose as Mubarak’s police force melted away. And the longtime autocrat’s removal cleared the way for constant, sometimes bloody, protests by workers, political groups and others, snarling traffic and harming businesses.

The coup against Morsi sparked even more chaos and violence, with security forces raiding protest camps and Islamists attacking churches, police and military targets. Many accuse the Islamists of provoking the violence, citing inflammatory television reports alleging that they have been stockpiling weapons and planning terrorist attacks.

“There’s nobody in Egypt not in danger,” said Mohammed al-Laban, 43, a chauffeur for a private company, who was sitting at Hosny’s cafe.

For upper-class Egyptians and many secular middle-class families, the Islamists threatened the lifestyles that they had come to enjoy under Mubarak.

Morsi’s government failed to put in place any strict Islamic legislation. But men who let their daughters drive cars or walk around without head scarves felt as if they were being judged, said Hamdeen Sabahi, a secularist politician who ran against Morsi and others in the presidential election.

“Maybe it wasn’t a noticeable factor, but it was very harmful for many Egyptians,” he said.

For opponents of the Brotherhood, it has been easy to demonize the group. They have tapped into decades of government propaganda alleging that the organization has shadowy terrorist ties.

Egyptian television and newspapers, parroting the new government’s narrative, have propagated elaborate conspiracy theories connecting the group to foreign agents, massacres and evil plots. One widely circulating theory holds that the United States had backed Morsi to divide Egypt and weaken its military.

When the military did step in, it meant “that our army stood with our people against such a conspiracy,” Sabahi said.

“It doesn’t matter whether this was fact or illusion,” he said. “But it is a fact that most Egyptians believed it.”

Morsi’s supporters seem stunned by the dramatic plunge in his popularity just one year into his four-year term.

“They waited 30 years for Mubarak, but they couldn’t wait another three for Morsi,” said Hoda Mokhtar, 43, a homemaker in a brown veil and robe who stood outside the Supreme Constitutional Court building on a recent day, waiting to join a demonstration by Morsi supporters. As she spoke to a reporter, she was quickly surrounded by several Morsi opponents, who shouted “Liar!”

One of the scores of police officers guarding the building approached and snarled at her to leave.

“You see the democracy?” she said.

To Morsi’s supporters, it’s far from it. But to much of the nation, the approach is a popular one. Democracy has come to mean getting rid of unpopular leaders, with or without elections.

“I really think this will happen again,” said Mustafa Fawzi, a quality-control worker from Alexandria who said he wished that Morsi had got to serve his full term. “We will have a president for one year, people will get fed up again, and we’ll have a coup.”

Sharaf al-Hourani and Lara El Gibaly contributed to this report.