CAIRO Egypt's President-elect Mohamed Mursi takes his oath on Saturday, a day after the Islamist leader pre-empted the formal ceremony by swearing himself in before ecstatic crowds in Tahrir Square and warning off generals trying to curb his powers.
They have already clipped the prerogatives of the bearded leader now in the palace once occupied by Hosni Mubarak, who is serving a life sentence 16 months after Egyptians toppled him.
"I swear by God that I will sincerely protect the republican system and that I respect the constitution and the rule of law," Mursi said on Friday to wild cheers from the crowd, many of whom were followers of his once-banned Muslim Brotherhood.
Addressing the "Muslims and Christians of Egypt", he promised a "civil, nationalist, constitutional state", making no mention of the Brotherhood's dream of creating an Islamic order.
Mursi is to be sworn in officially at 11 a.m. (0900 GMT) by the constitutional court, rather than by parliament as is usual.
The court dissolved the Islamist-dominated lower house this month in one of several measures intended to entrench military influence over Egypt long after Mursi assumes the presidency.
"There is no power above people power," Mursi said in Tahrir Square, crucible of the revolt that ended Mubarak's 30 years in power. "Today you are the source of this power."
His defiant speech was a clear challenge to the army, which also says it embodies the will of the people and which sees itself as the guarantor of national interests and the state.
An army council headed by Field Marshal Mohamed Hussein Tantawi took over from Mubarak when he quit on February 11, 2011 and has long pledged to make way for an elected president by July 1.
Tantawi, Mubarak's defence minister for 20 years, would hand over to Mursi in a televised ceremony on Saturday after the president was sworn in, army sources said.
Under the military council's rule, Egypt has experienced a bumpy and sometimes violent transition in which parliamentary and presidential elections have been held, without setting the country on a clear path to democracy or constitutional rule.
LIVING IN LIMBO
Egypt remains in political limbo, without a constitution, a lower house of parliament or any clarity about the role of a military establishment anxious to stay in the driving seat.
An assembly that is supposed to write a new constitution has begun work after its predecessor fell apart amid disputes over whether Islamists were over-represented in a country with a 10 percent Christian minority and many secular-minded liberals.
Egypt is also more polarised than ever.
Mursi narrowly won a run-off vote this month against Ahmed Shafik, a former air force chief and Mubarak's last prime minister, but many voters were dismayed at having to choose between an Islamist and a man seen as a remnant of Mubarak's era.
Egypt will find it hard to attract the investment, loans and foreign aid it needs to revive an economy blighted by months of turmoil and uncertainty until political stability returns.
International Monetary Fund Managing Director Christine Lagarde called Mursi to discuss the economic challenges facing Egypt and how the international lender can best help, an IMF spokesperson said on Friday.
"The MD reiterated that the IMF stands ready to support Egypt and looks forward to working closely with the authorities," the spokesperson said.
Lagarde also congratulated Mursi on his election as president, "which represents an important step forward in Egypt's transition," the spokesperson said.
However, no timetable has been set for an IMF staff visit to Egypt to discuss a $3.2 billion IMF loan. That "will depend on the formation of the government," the spokesperson said.
Complicating the process, the generals seized new powers this month, giving themselves veto rights over the drafting of a new constitution, naming a National Defence Council to run defence and foreign policies and decreeing their control of all military affairs.
The military's insistence that Mursi take his oath before the constitutional court and his defiant riposte in Tahrir sets the stage for a protracted struggle for power in Egypt.
The military, the source of every previous president in the Arab republic's 60-year history, also runs business enterprises accounting for an estimated one-third of the economy.
It does not intend to jeopardise the $1.3 billion a year it receives in military aid from the United States to back Egypt's 1979 peace treaty with Israel, widely criticised by Islamists.
Mursi has said he will respect Egypt's international obligations and does not want to take the country back to war.
His speech in Tahrir, greeted with cheers from tens of thousands of supporters, signalled a determination to use popular legitimacy to defeat entrenched military power.
"Say it loud, Egyptians, Mursi is the president of the republic," the crowd chanted. "A full revolution or nothing. Down with military rule. We, the people, are the red line."
(Additional reporting by Marwa Awad, Shaimaa Fayed and Omar Fahmy; Editing by Ralph Gowling and Eric Walsh)