U.S. President Barack Obama said his country is prepared to offer whatever assistance is needed to help Egypt's peaceful transition to democracy after the resignation of Hosni Mubarak.

"Egyptians have made it clear that nothing less than genuine democracy will carry the day," Obama said in a Friday afternoon speech. "The people of Egypt have spoken, their voices have been heard and Egypt will never be the same.

"The United States will continue to be a friend and partner to Egypt and we stand ready to provide whatever assistance is necessary, and asked for, to pursue a credible transition to democracy."

Obama's speech marks the end of two weeks of tight-rope walking for the U.S. president, who had to balance support for democracy, while maintaining good relations with the Egyptian government, a key ally in the region.

Obama praised the Egyptian military, who have taken over and will oversee the transition to democracy.

"The military has served patriotically and responsibly as a caretaker to the state and will now have to ensure a transition that is credible in the eyes of the Egyptian people," Obama said. "That means protecting the rights of the Egyptian citizen, lifting the emergency law, revising the constitution and other laws to make this change irreversible and laying out a clear path to elections that are fair and free."

Patrick Basham, director of the Washington-based Democracy Institute, told CTV News Channel that the Egyptian military finally pushed the president out, in part because of American influence.

"Whatever the motivations for the Egyptian military's move against Mubarak – clearly they told him he had to go – U.S. influence played no small part," he said.

"The U.S. taxpayer basically funds the Egyptian military and has done so for many years. The Egyptian military certainly has good relations with the United States, but is very much aware that it is the United States that is paying the bill that affords them the prestige and the influence in Egyptian politics that they enjoy."

Obama spoke of Egypt's youth, and said their ingenuity and energy can be harnessed to create new economic opportunities for the country.

"We saw a new generation emerge, a generation that uses their own creativity and talent and technology to call for government that represented their hopes, but not their fears."

Obama compared Egypt's peaceful uprising to other major events in history, such as the Berlin Wall.

"There are very few moments where we get to watch history take place, and this is one of those moments," he said.

The White House also took the opportunity to speak out against Iran's government, saying they are scared of the will of their people after cracking down on international media and opposition leaders following the Egyptian uprising.

Press Secretary Robert Gibbs said the Iranian government should let their people assemble and demonstrate freely.

Gibbs said Iranian President Mahmoud Ahmadinejad's crackdown "speaks volumes to the grip they have or lack thereof on the popular beliefs of their own people."

A balancing act

Obama took a firmer stance on Thursday, after Mubarak shocked many by saying he would stay on until September. It is believed the U.S. had expected Mubarak to step down.

That night speaking to a group of American students, Obama referred to "a new generation -- your generation -- who want their voices to be heard" in Egypt -- his strongest comments so far in favour of the protesters.

CTV Washington Bureau Chief Paul Workman said the White House had little choice but to handle the issue with delicacy and diplomacy. Mubarak has long been a staunch and important ally to Washington -- and Obama was hesitant to appear as an advocate for regime change.

Michael Shank, a senior policy advisor to U.S. Congressman Michael Honda, said the U.S. needs to walk a fine line in its involvement with Egypt -- offering support while also keeping its distance.

"The U.S. has to support any kind of democracy narrative going forward and has to support the caretaker government but I think it would be a misstep for the U.S. to throw its weight behind the military at this time," Shank told CTV News Channel.

"While the population trusts the military for security, they don't want to see the military running the country."

Shank also said it would be an error for the U.S. to offer public support to any single candidate to lead the country, noting that the future leaders of Egypt must be elected by the Egyptian people, without outside influence.

However, there are many questions about how or when that will happen and CTV Chief Political Correspondent Craig Oliver said many challenges lie ahead.

"We don't have any idea really as to how this is going to proceed towards democracy," Oliver said. "Will there still be elections in September as Mubarak promised the Egyptians there would be? We just don't know anymore. The other problem of course is there is no clear leader."

Even when a political favourite emerges and elections do take place, it could be difficult for the army to hand over power to a civilian who would effectively have the right to issue commands to the military, Oliver said. Egypt, he noted, is a country with no democratic tradition.

"This is a very difficult, tricky situation we're in here in the most important country in the Arab world," Oliver said.

Canada has also responded cautiously to the developments in Egypt. Prime Minister Stephen Harper has refused to openly call for regime change during the protests.

In comments made on Friday after news that Mubarak had stepped down, Harper called on Egypt to respect its existing peace treaties and to be a leader in the Middle East.

He urged Egypt's leaders to take ownership of the change that the nation is hungry for, and suggested it is a rare opportunity.

"Get in front of it," Harper said. "Be part of it, and make a bright future happen for the people of Egypt."