Speaking just hours after Mubarak relinquished the presidency, Obama said the longtime Egyptian leader responded to his people’s hunger for change. But he warned that there will still be difficult days ahead for Egypt as it works toward free and fair elections.

Mubarak’s three decades of authoritarian rule ended Friday when he handed power to the Egyptian military following 18 days of protests calling for his ouster.

Obama said the Egyptian military has served patriotically and responsibly and now must ensure a transition that is credible to the Egyptian people.

He said the military, in power in the wake of Mubarak’s resignation, must lay out a clear path toward fair elections.

Mubarak’s resignation was announced earlier Friday, the denouement to more than two weeks of massive protests across Egypt.

Obama said Mubarak’s resignation and the military’s decision to step into the void raises questions that he said Egyptians will be sure to answer.

He said the military must end the state of emergency that Mubarak imposed and protect the rights of citizens.