Lt Muhammad al-Assar from the Supreme Council of Armed Forces (Scaf) told a news conference that a ceremony would be held in late June to hand over power to the new president, state media report.

However, the constitutional declaration issued by the Scaf late on Sunday effectively gives it legislative powers, control over the budget and over who writes the permanent constitution following mass street protests that toppled Mr Mubarak in February 2011.

It also strips the president of any authority over the army.

Analysis

By Yolande KnellBBC News, Cairo

In Tahrir Square, a veiled woman ululated and young men danced while holding up a large plastic banner of the retiring, bearded engineer Mohammed Mursi, whom they were confident would be Egypt's new president.

The candidate's Muslim Brotherhood has claimed that he won 52% of the vote compared with 48% for his rival, former PM Ahmed Shafiq.

The Shafiq campaign criticised the Islamist group for its victory announcement, saying it represented "bizarre behaviour" ahead of any official confirmation of the final result.

Some participants in the Tahrir Square rally felt their celebrations were overshadowed by the interim constitutional declaration made by the Supreme Council of the Armed Forces.

It defined the prerogatives of both the next president and the ruling military after Egypt's supreme court dissolved the elected parliament - dominated by Islamists - last week.

Analysts speculate that if official results confirm Mr Mursi has won the presidential election, a power struggle between the Brotherhood and the military - two of Egypt's strongest forces - looks likely, possibly bringing more of the turmoil that has characterised the process of democratic transition.

The Scaf have even guaranteed themselves jobs for life, the BBC's Jon Leyne in Cairo reports.

'Grave setback'

There have been no big protests so far - the military must be hoping that Egyptians are simply too tired of politics to protest, and are willing to go for stability whatever the cost, our correspondent says.

But the army's declaration was widely condemned in opposition circles.

Prominent political figure Mohamed ElBaradei has described the document as a "grave setback for democracy and revolution".

Former presidential candidate Hamdeen Sabahi, who came third in the first round of voting and was the favoured candidate of many in the protest movement, said the declaration was a "seizure of the future of Egypt".

"We will not accept domination by any party," Mr Sabahi said.

Parliament speaker Saad al-Katatni, of the Muslim Brotherhood, said the declaration was "null and void".

The Brotherhood had earlier urged Egyptians to "protect their revolution" after the Scaf dissolved parliament - dominated by the Brotherhood - on Saturday.

Two days earlier, the Supreme Constitutional Court ruled that last year's legislative polls were unconstitutional because party members were allowed to contest seats in the lower house reserved for independents.

Election candidates

Ahmed Shafiq (l)

Aged 70

Veteran fighter pilot and former air force commander

Appointed Egypt's first aviation minister, earning reputation for competence and efficiency

Promoted to PM during February 2011 protests

Associated with former regime, though denies being backed by ruling military council

Campaigned on a promise to restore security

Mohammed Mursi

Aged 60

US-educated engineering professor

Head of Muslim Brotherhood's Freedom and Justice Party (FJP)

Served as independent MP 2000-05

Quietly spoken, viewed by some as lacking charisma

Has promised "stability, security, justice and prosperity" under an Islamic banner