Egyptian president Mohamed Mursi told Egyptians that he would defend the legitimacy of his elected office with his life and urged them to reject challenges to the legal order.

In a television address Mr Mursi appealed for calm and said the elections which brought him to power were free and representative of the popular will.

The president conceded his first year in office had been difficult and he faced challenges from corrupt remnants of the old regime.

In a response to a military ultimatum to share power with his opponents, he said he had tried such dialogue before and had been unsuccessful. But he insisted he would continue fulfilling the duties to which he had been democratically elected.

His address to the nation comes as tens of thousands of supporters and opponents of his presidency hold separate mass rallies.

There are unconfirmed reports that seven people have been killed in clashes between rival groups.

The military has threatened to intervene if the president fails to meet the demands of anti government protesters.

Sources suggest Egypt's army will suspend the constitution and dissolve parliament under a draft political roadmap to be pursued if Mohammed Mursi and the liberal opposition fail to agree.

Chief-of-staff General Abdel Fattah El-Sisi called for Mr Mursi to agree within 48 hours on power-sharing with other political forces, saying the military would otherwise set out its own roadmap for the country's future.

Mr Mursi has rejected an army ultimatum to force a resolution to Egypt's political crisis, saying that he had not been consulted and would pursue his own plans for national reconciliation.

Members of Mr Mursi's Muslim Brotherhood have used the word "coup" to describe the military manoeuvre, which carries the threat of the generals imposing their own plans for the nation.

General Abdel Fattah al-Sisi delighted Mr Mursi's opponents by effectively ordering the president to heed the demands of demonstrators.

Official video was released showing Mr Mursi meeting General Sisi. It is unclear when it was shot.

A statement from Mr Mursi's office continued: "The presidency confirms that it is going forward on its previously plotted path to promote comprehensive national reconciliation ... regardless of any statements that deepen divisions between citizens."

Describing civilian rule as a great gain from the revolution of 2011, Egypt's first freely elected leader, in office for just a year, said he would not let the clock be turned back.

That means it is improbable that such compromises would be agreed before General Sisi's deadline.

Mr Mursi also spoke to US President Barack Obama by phone the presidency said in a separate statement.

He stressed that Egypt was moving forward with a peaceful democratic transition based on the law and constitution.

A sense of disintegration in the administration since the protests on Sunday has been heightened by the resignations tendered by several ministers who are not members of Mr Mursi's Muslim Brotherhood.

Some Brotherhood leaders, who swept a series of votes last year, said they would look to put their own supporters on the streets.

After the destruction of the Brotherhood's headquarters in a battle overnight on Monday in which eight people were killed, the possibility of wider violence seems real.

No question of negotiating

The coalition that backed Sunday's protests said there was no question of it negotiating now with Mr Mursi on the general's timetable and it was already formulating its positions for discussion directly with the army once the 48 hours are up.

General Sisi, in his broadcast statement, insisted that he had the interests of democracy at heart - a still very flawed democracy that Egyptians have been able to practise as a result of the army pushing aside Hosni Mubarak in the face of a popular uprising.

That enhanced the already high standing of the army among Egyptians.

Military helicopters dropped national flags over Cairo's Tahrir Square at sunset on Sunday, further boosting the army’s popularity with protesters.

But on the other side of Egypt's polarised politics, a Brotherhood spokesman said it might consider forming "self-defence" committees after a series of attacks on its premises.

Another leading figure in the movement, Mohamed El-Beltagy, said: "The coming period will witness an alignment between all the Islamist forces. Their sons will be called on to demonstrate in all streets and squares of the country."

Among Mr Mursi's allies are groups with more militant pasts, including al-Gamaa al-Islamiya, a sometime associate of al-Qaeda, whose men fought Mr Mubarak's security forces for years and who have warned they would not tolerate renewed military rule.

An alliance of Islamist groups, including the Brotherhood, issued a cautious joint statement that avoided criticising the army but spoke of it being manipulated by rival parties.