Word had circulated in the afternoon that President Hosni Mubarak and his family had left the capital. The news sent a frisson through the protests until it was clarified that he had simply flown to Sharm el-Sheikh, the Egyptian resort town in the southern Sinai where he spends much of the year. People shrugged, and thousands of angry protesters continued marching toward the presidential palace following Friday's midday prayer. And then, just a couple of hours later, came the momentous news: Hosni Mubarak had finally resigned as President, giving in to the No. 1 demand of demonstrators who had waged a largely peaceful street campaign against him for 18 days. "Egypt is free! Egypt is free!" came the shouts from Tahrir, replacing the fervent calls for Mubarak's departure.

Rage and determination gave way to unbridled joy as Vice President Omar Suleiman appeared on state TV with a curt announcement that Mubarak had "waived" his presidency and handed power to the Supreme Council of the Armed Forces. The announcement was a shock, coming less than a day after Mubarak had appeared on state TV issuing a defiant vow to remain in office until a successor could be elected. But the even greater shock, in the wider picture, is the fact that a nonviolent people-power revolution has swept aside the strongest and most entrenched of the Arab world's U.S.-backed autocrats  perhaps forever changing the architecture of power and geopolitics in the Middle East.

Mubarak flew to the Red Sea resort of Sharm el-Sheikh Friday, Feb. 11, having said the previous night that Suleiman had been put in charge of handling the government's response to the crisis, which began 19 days ago when protesters took to the streets to demand Mubarak's ouster. But the Supreme Council of the Armed Forces had already begun on Thursday to address the nation independently of the government to which it is ostensibly answerable, issuing a communiqué setting terms for resolving the crisis. The council expressed the military's "commitment to protect the people" and its support of their "legitimate demands" and vowed to "continue meeting on a continuous basis to examine measures to be taken to protect the nation and its gains and the ambitions of the great Egyptian people." But that left many guessing as to the army's ultimate intentions, and a second communiqué, on Friday, vowed to lift the country's 30-year state of emergency when the "current situation has ended" and promised to guarantee a free and fair presidential election. At the same time, however, the council stressed "the need to resume orderly work in the government installations and a return to normal life to preserve the interests and property of our great people."

The military will no doubt permit and even join in the popular celebration of Mubarak's ouster, which will doubtless continue through the night. But it will then expect the protesters to go home  and will likely get its wish. Beyond that, of course, things get tricky: a military-based regime that has ruled Egypt since 1952 has jettisoned Mubarak, its chieftain for the past 30 years. Yet the regime itself has survived the popular uprising and will now look to negotiate a new order, aimed at addressing the demands of the protest movement, while at the same time protecting its institutional interests. For weeks, the protesters in Tahrir Square have been chanting, "The people and the army are one." And the army has clearly played a major role in preventing the regime from massacring its opponents, and ultimately in pressing Mubarak into retirement. But the coming days and weeks will test the extent to which the military and the citizenry share the same ideas about how Egypt should be governed.

Just before the dramatic announcement, the air had been thick with tension, curdled by anger over Mubarak's address late Thursday night, which many had seen as a defiant slap-down of their demands. There was also great anxiety over potential clashes with proregime forces. "Everybody is really mad now," said activist Marwa Nasser as she prepared to go into the streets. Activists reported that plainclothes thugs  widely associated with Egypt's Interior Ministry and ruling party officials  had been sighted gathering near the presidential palace in northeast Cairo.

Mubarak's meandering, legalistic speech Thursday night appeared to be a gigantic head fake to the enormous crowds that had gathered in Tahrir: they  and, in fact, much of the world  had been led from reports from military and government sources to believe they would hear him step down. Everyone from Egyptian army officers to the White House appeared blindsided by the Egyptian President's remarks.

But on Friday, even before Suleiman's terse statement, there had already been a general sense among the millions protesting in Cairo, Alexandria and other towns and cities across the country that a power struggle at the highest levels was under way  and that the confusingly vague army communiqué laid out the day before supported the theory that the army wasn't fully on board with the regime. Meanwhile, popular opinion had tipped further in favor of the demonstrations in recent days, as more and more celebrity personalities, ranging from singers and sports stars to popular religious sheiks, had jumped on the revolution bandwagon with heady expectations preceding Mubarak's speech Thursday night. Even state TV offered sympathetic coverage of the protests on Thursday before airing the late-night presidential speech that shocked the nation. Friday's religious sermon to the thousands in Tahrir Square praised the growing struggle and condemned the regime. In Alexandria, CNN reported, a sheik who had previously been banned by the government from preaching led the address. As protesters knelt on the asphalt in Tahrir Square and in front of Cairo's state television to pray beneath the midday sun, soldiers joined them in prayer from the other side of the wire, atop their tanks. Some reported handshakes between soldiers and protesters. One journalist and blogger said via Twitter that he saw an army general cry as he greeted the protesters. In Alexandria, al-Jazeera reported, the presidential guard, supposedly Mubarak's final line of defense, handed out food and water to protesters outside the palace.

The Egyptian military was considered to be the only decisive power broker in this struggle, and activists were sensitive to any cracks in its support for the regime. For weeks, protesters had spoken of a sympathetic army, one that kept up a consistently peaceful relationship with demonstrators and, many insist, sided with the revolution. (Read "Mubarak's Malingering Leaves Egypt at a Dangerous Crossroads.")

Nadia Abdel Nasser, a 59-year-old grandmother, was among those protesting loudly in Tahrir Square Thursday night; she says two of her sons are currently serving in the army. Both men, she says, have been "with the revolution" since the start. "They're celebrating," she says excitedly just before Mubarak's speech. "They told me, 'Mom, even if we are outside the square, we are with you in Tahrir.' " Shortly after dawn prayer on Friday, an army officer told Reuters that he and 15 other midranking officers had joined the protesters.

With Mubarak seeming to be digging in, the crowd in Tahrir had called for an immediate coup, chanting, "One, two, where is the people's army?" In the end, they did not need it; Mubarak gave in.

Until then, Egyptians had cited Tunisia as an example to bolster their resolve, with diehards in Tahrir Square arguing that their numbers were larger than those in Tunisia and that they would stay as long as it took  even six months  to get Mubarak to leave. "People won't give up," says Marwa Nasser. "We don't care what he says, we just want him to go." It took Tunisian people power a month to get rid of a dictator. Egypt took 18 days. Now Egypt is its own example  and a thunderous one to the rest of the Arab world.