WASHINGTON — President Barack Obama declared Friday the peaceful departure of Hosni Mubarak as Egypt's president marked "a beginning" holding the promise of greater democracy for the world's most populous Arab nation. But he added soberly, "There will be difficult days ahead."
Indeed, while Obama and other U.S. officials voiced optimism, they were also concerned over who will end up in control of the Egypt and whether the United States will emerge with the kind of stable partner it badly needs in the volatile Middle East.
Also at issue: whether the unrest that brought down Mubarak will spread to other nations in the Middle East, including oil-rich autocratic neighbors, and whether the Egyptian military will make good on its pledge of promoting free and fair elections.
At the White House, Obama's words were alternately celebratory and cautious after Mubarak ended three decades of iron rule and turned over his authority to the military.
"Today belongs to the people of Egypt," Obama declared at the White House. In Cairo, Egyptians celebrated into the night.
Obama's only mention of Mubarak, a longtime strong U.S. ally, was at the beginning of his remarks: "By stepping down, President Mubarak responded to the Egyptian people's hunger for change," he said.
Obama singled out the Egyptian military for praise, saying it acted helpfully as a "caretaker" in defusing the situation and securing the country.
"We saw a military who would not fire bullets at the people they were sworn to protect," he said. But, he cautioned, it "will now have to ensure a tradition that is credible in the eyes of the Egyptian people."
He said that means lifting Egypt's hated 30-year-old "emergency" police powers laws, revising the constitution to permit greater political diversity, enacting other safeguards to "make the changes irreversible and laying out a clear path to elections that are fair and free."
Others were cautious as well.
"I think it's hard to celebrate the imposition of martial law," said Jon Alterman, director of the Middle East program at the Center for Strategic and International Studies. "Martial law may be the beginning of a better future for Egyptians — but not necessarily."
Asked about the uncertainty ahead, especially with respect to the role of the military, presidential spokesman Robert Gibbs said, "I don't think we have to fear democracy."
Gibbs said the White House was surprised, along with most observers, by Mubarak's refusal to resign on Thursday night.It was not clear what role Islamic militant groups such as the now-banned Muslim Brotherhood might play in the new government that emerges. Also of critical importance: whether the evolving new government will continue to honor the landmark 1979 peace treaty with Israel.
The top U.S. military officer, Chairman of the Joint Chiefs of Staff Adm. Mike Mullen, will be in Israel on Sunday and Monday, with developments in Egypt expected to be at the top of the agenda. The meeting was previously scheduled.
For now, weighty unresolved questions were drowned out by euphoric reaction in the region to the dramatic turnaround in Egypt — just a day after Mubarak appeared to be digging in his heels.
Anger that his defiance caused was quickly converted to joy on Friday. In a nod to the hundreds of thousands of Egyptians who celebrated the change, Obama said: "The people of Egypt have spoken, their voices have been heard, and Egypt will never be the same."
Speaking in the Grand Foyer of the White House, the president said it was "not the end of Egypt's transition, it's a beginning."
Egypt is a key U.S. ally in the Middle East. It receives about $1.5 billion in U.S. military and economic assistance a year — aid that officials said Friday was not expected to be affected by Mubarak's departure.
The resilience of the protest movement caught both the Obama administration and Arab countries in the Mideast off guard. It caused a lot of scrambling in Washington on the part of the administration to regain its footing.
Obama said he was confident that a democratic Egypt could assert its role as an influential player in the Mideast and beyond. He learned of Mubarak's resignation during an Oval Office meeting Friday morning and watched developments on television.
Vice President Joe Biden was the first top administration official to react publicly to the development, calling it "a historic day for the people of Egypt."
U.S. lawmakers welcomed Mubarak's resignation.
"It is crucial that Mubarak's departure be an orderly one and that it leads to true democracy for Egypt, including free, fair and open elections," said Senate Majority Leader Harry Reid of Nevada.
The top Senate Republican, Minority Leader Mitch McConnell of Kentucky, said, "Egypt by any objective standards is the most important Arab country because it controls the Suez Canal, because it has a peace treaty with Israel that's lasted 30 years. We have a big stake in the outcome, but limited ability to affect it."
Nancy Pelosi, the House Democratic leader, told her Twitter followers that the young people of Egypt were leading the country to democracy. "Their actions are an inspiration to the world," she wrote.
"I like to be optimistic at this time," said Rep. Nita Lowey of New York, the top Democrat on the House Appropriations subcommittee that oversees foreign aid. She called the events in Egypt "momentous for the region and the world."
Egypt has enormous social problems, with vast differences between the haves and the have-nots. It is a country where over 50 percent of the adult population is illiterate and some 40 percent live below or close to the poverty line. Rising costs of food were among the leading factors underpinning the protests. Some of the impoverished Egyptians are beneficiaries of U.S. food aid.
"The question becomes, how does this country cope with all of these changes? This is not 55 guys in an un-airconditioned room in Philadelphia in the summer of 1787. This is a far more complicated proposition," said Aaron David Miller, a former Mideast adviser to six U.S. secretaries of state.
Miller, now with the Woodrow Wilson Center think tank, said it will take weeks or months to sort things out. And in the end, he said, "I think Egypt will be a far less forgiving place for American interests as democracy takes root — if in fact it does."
Associated Press writers Robert Burns, Donna Cassata, Ben Feller, Mathew Lee and Erica Werner contributed to this report.