WASHINGTON — Last Sunday at 2 p.m., a blue-and-white Air Force jet left Andrews Air Force **** bound for Cairo. On board was Frank G. Wisner, an adroit ex-diplomat whom President Obama had asked hours before to undertake a supremely delicate mission: nudging President Hosni Mubarak of Egypt out of power.

What exactly Mr. Wisner would say was still in flux as he flew to Egypt, administration officials said Tuesday; he talked with senior officials in Washington several times during the nearly 14-hour flight. By the time Mr. Wisner met with the Egyptian leader on Tuesday, the diplomat knew what message he would deliver. And Mr. Mubarak had already lost the backing of his other crucial pillar of support: the Egyptian military, which declared it would not open fire on the demonstrators who were demanding his ouster.
The story of how Mr. Mubarak, an Arab autocrat who only last month was the mainstay of America’s policy in a turbulent region, suddenly found himself pushed toward the exit is first and foremost a tale of the Arab street.
But it is also one of political calculations, in Cairo and Washington, which were upset repeatedly as the crowds swelled. And it is the story of a furious scramble by the Obama White House — right up until Mr. Obama’s call Tuesday night for change to begin “now” — to catch up with a democracy movement unfolding so rapidly that Washington came close to being left behind.
“Every time the administration uttered something, its words were immediately overtaken by events on the ground,” said Robert Malley, Middle East and North Africa program director for the International Crisis Group. “And in a matter of days, every assumption about the United States relationship with Egypt was upended.”
In Cairo, the protests prompted Mr. Mubarak to surround himself even more closely with current and former military leaders, including his new, hastily named vice president, prime minister and deputy prime minister.
But instead of protecting him, there is increasing evidence that over the last three days the military establishment — one of the most respected institutions in Egyptian society, and the crucial factor in deciding control of the streets — may have been moving toward pushing Mr. Mubarak out.
The first sign of the military’s deteriorating support came Saturday when rank-and-file troops ordered to buttress the retreating police instead began to cheer on the protesters. Then on Monday night, the military leadership appeared to break away, announcing that the military respected the people’s legitimate demands and that it would not use force against peaceful demonstrators.
A short time later, Mr. Mubarak’s closest aide, Omar Suleiman, the chief of Egyptian intelligence and the newly named vice president, invited opposition groups to negotiate over constitutional reforms.
Back in Washington, the administration was struggling to balance its ties to Mr. Mubarak, its most stalwart ally in the Arab world, with its fear of ending up on the wrong side of history.
But days of watching the protests mushroom on the streets of Egyptian cities convinced administration officials — some facing their first national security crisis in these roles — that Mr. Mubarak probably would not weather the political storm.
Former President George Bush, whose ties to Mr. Mubarak were cemented by the Egyptian leader’s commitment to supply Arab troops during the Persian Gulf war in 1991, called Mr. Mubarak, on his own initiative, to discuss the crisis, officials said. It was not clear what Mr. Bush told Mr. Mubarak.
At a two-hour meeting at the White House last Saturday, Thomas E. Donilon, the national security adviser; William M. Daley, the White House chief of staff, Secretary of State Hillary Rodham Clinton; the director of the Central Intelligence Agency, Leon E. Panetta; and other officials coalesced around a strategy to start trying to ease Mr. Mubarak out, an official said.
Mrs. Clinton, officials said, suggested that the administration send Mr. Wisner, a former ambassador to Egypt who knows Mr. Mubarak well, to deliver a message directly from Mr. Obama to the Egyptian leader. Officials said Mr. Wisner urged Mr. Mubarak to declare publicly that he would not run for re-election. But Mr. Wisner has extended his stay in Cairo, officials said, and may have a follow-up meeting with Mr. Mubarak if events seem to demand a quicker exit.
At the Saturday meeting, the officials also agreed that Mrs. Clinton would start calling for “an orderly transition” when she taped a round of interviews for the Sunday talk programs. Administration officials were already smarting from not coming out more fully in support of the protesters earlier. In particular, Vice President Joseph R. Biden Jr. had been criticized for an interview with “NewsHour” on PBS on Thursday, in which he answered “no” when the host, Jim Lehrer, asked if the time had come for Mr. Mubarak to go.
“They took a little while to catch up, but by Sunday morning they understood that it was over, and since then, they’ve understood how to make it happen,” said Martin S. Indyk, the director of foreign policy at the Brookings Institution.
Still, administration officials were grappling with their public message

versus their private message. Senior officials say that as Mr. Wisner

traveled to Egypt, Obama officials in Washington were working on his

message to Mr. Mubarak: to announce that he would not run for re-

election (he did that)
, and to promise that his son would not run for election (he did not do that).