Mohamed Morsi, champion of the long-banned Muslim Brotherhood, was poised to take the oath on Saturday as Egypt's first civilian president, launching a tricky cohabitation with the military.
In a display of the popular mandate he claims after his run-off win in a divisive presidential election, Morsi addressed a huge crowd on Friday in Cairo's Tahrir Square, epicentre of the Arab Spring uprising that ousted veteran strongman Hosni Mubarak early last year.
In his speech to tens of thousands of jubilant supporters, the Islamist, who resigned from the Brotherhood after his election win, was careful to reach out to Egypt's Christian minority of some 10 percent.
He promised a "civilian state" and praised "the square of the revolution, the square of freedom," in what he called an address to "the free world, Arabs, Muslims... the Muslims of Egypt, Christians of Egypt."
Morsi symbolically swore himself in before the crowd, saying: "I swear to preserve the republican system... and to preserve the independence" of Egypt.
"I am one of you. I fear only God," he told supporters, some of whom had waited from early in the day for his appearance.
Before his triumphant arrival, chants against the ruling military -- which took over on Mubarak's overthrow -- rang out as people gathered under a searing sun.
In his speech, Morsi served Washington advance warning that his policies will be markedly different from those of his ousted predecessor, a staunch US ally before the 18-day uprising in January and February last year forced him out.
The president-elect said he would work to secure freedom for Omar Abdul Rahman, a blind Egyptian cleric jailed for life over the 1993 World Trade Centre bombing.
"I will do everything in my power to secure freedom for... detainees, including Sheikh Omar Abdul Rahman," Morsi said.
Abdul Rahman was convicted in 1995 for his role in the World Trade Centre attack, plotting to bomb other New York targets including the United Nations, and a plan to assassinate Mubarak.
After taking the oath, Morsi will have to square up against the Supreme Council of the Armed Forces (SCAF), led by Mubarak's longtime defence minister Field Marshal Hussein Tantawi, which took over on the strongman's overthrow and will retain broad powers.
The liberal Wafd newspaper reported that Tantawi will remain defence minister.
But a defiant Morsi, whose predecessors as president have all been generals, threw down the gauntlet to the SCAF, while addressing the people directly.
-- People power --
"You are the source of power and legitimacy... there is no place for anyone or any institution... above this will," he told them. "I renounce none of the prerogatives of president."
Morsi was to take the oath of office before the Constitutional Court, not parliament as convention provides, after the top court ordered the disbanding of the Islamist-dominated legislature elected in Egypt's first post-Mubarak polls.
The military subsequently assumed legislative powers and also formed a powerful national security council headed by the president but dominated by generals.
By agreeing to be sworn in by the Constitutional Court, Morsi is effectively recognising the court's decision to dissolve parliament.
The SCAF also reserves the right to appoint a new constituent assembly should the one elected by parliament be disbanded by a court decision expected on September 1.
The Muslim Brotherhood insists that only parliament can appoint the assembly.
Media reports said Morsi was consulting a cross-section of Egyptian society before appointing a premier and a cabinet mostly made up of technocrats.
In a meeting with Egyptian newspaper editors reported by most dailies on Friday, Morsi pledged there would be "no Islamisation of state institutions" during his presidency.
Morsi has already met Tantawi, as well as a delegation from the Sunni body Al-Azhar, and another representing Egypt's Coptic church.
International Monetary Fund chief Christine Lagarde has told Morsi that the lender stands ready to help Egypt, whose tourism-dependent economy has taken a battering during the upheaval that accompanied Mubarak's overthrow, a spokeswoman said on Friday.
As his successor prepared to take the oath, the ousted strongman was in a Cairo military hospital, in low morale and slipping in and out of a coma, according to hospital officials.
"The former president has been greatly affected by the news of Morsi's presidential victory," said one official at the hospital where Mubarak was transferred last week from the prison where he had been serving a life sentence over his involvement in the deaths of protesters in the uprising.