CAIRO — Planning your day around a coup d’état can be tricky, but Cairenes are flexible. Shops and businesses in my central neighborhood opened for business as usual Wednesday morning, while protesters camping out in Tahrir Square and near the presidential palace finally got some sleep.

Between frequent power cuts, chronic fuel and food shortages, high unemployment and surges of unrest, Egyptians had been on edge for months, asking themselves with rising urgency whether Mohamed Morsi, their first elected president, was the right man for the job. That question was about to be answered.

Latitude Diary of a

Revolution Redux Chronicling another

power change in Egypt.

On Sunday, following a campaign by Tamarrod (Rebellion), a group of young Egyptians that circulated a marathon petition against Morsi, millions of people marched nationwide to call for his resignation. On Monday, the army issued an ultimatum to the president to heed their demand. On Tuesday, the Interior Ministry, in charge of the police and security forces, announced its backing for the generals. Morsi stood his ground — despite previous pledges that he would step down if he ever failed the people — until Wednesday at 5 p.m., when the army stepped in, forcing him to exit.

Prior to Sunday, which was the first anniversary of Morsi’s inauguration, Egypt was in the doldrums, politically paralyzed by the president’s disputes with the judiciary, economically sapped by the pall that Islamists cast on tourism and culturally beset by state attacks on the media and the puerile hate-mongering of TV sheikhs. The ruling Freedom and Justice Party seemed as hell-bent as the regime of Hosni Mubarak on dominating political life and keen also to control people’s private lives. Sectarian violence was mounting between Muslims and Christians, and even among Muslims. I’d never felt Egypt so at odds with itself in the many years I’ve lived here.

Still, on Sunday morning, with the army and the police on high alert, I began to doubt that people would protest in large numbers. And yet by 4 p.m. thousands had gathered on my street, beating drums and chanting “Egypt!” and “Leave!” Their shouts were so loud my fifth-floor windows rattled.

On television, demonstrations seem like just a mass of heads and flags sending up one giant roar. But inching along Tahrir Square, with no room to walk, you could feel the blazing sun and a breeze from the Nile. The scents of incense and roasted corn mingled. Rapt children rode on their parents’ shoulders; three generations of the same family marched together.

Some boys had painted their torsos with the red, black and white of the Egyptian flag. Girls wielded laser pointers, the latest protest accessory. People radiated pride in their vast numbers and in their refusal to be pushed around, especially in the name of religion.

Here were “the glorious Egyptian people,” the generals say, whose demands are the army’s “national and historical duty” to respect. They insist Morsi’s removal is not a coup. The opposition groups, for their part, call it a coup by “popular demand” and so far seem congenial to the army. The Islamic-inspired Constitution has been suspended. An interim government is being formed. The head of the constitutional court, Adli Mansour, was sworn in Thursday as acting head of state. He extended a special invitation to the Muslim Brotherhood, which backed Morsi, “to participate in building the nation, as nobody will be excluded.”

So is Egypt back to square one, as in early 2011? Not from where I sit, a block from Tahrir Square. Here, barrages of fireworks are exploding, air-horns are blaring, people are hollering themselves hoarse, ululating and blowing whistles, while army helicopters clatter overhead.

Never mind that the police were the villains of the 2011 revolution, or that the army mangled the transition after Mubarak’s fall. As tanks deploy nationwide to forestall a backlash, most Egyptians feel that the freedoms they’ve hoped for since 2011 are again in their grasp. Call this a coup if you like; to them, it’s a second revolution, another chance.