The head of Egypt's armed forces has suspended the constitution and appointed the head of the constitutional court as interim head of state.

In a televised broadcast, flanked by military leaders, religious authorities and political figures, General Abdel Fattah al-Sisi effectively declared the removal of elected President Mohammed Mursi.

General al-Sisi called for presidential and parliamentary elections, a panel to review the constitution and a national reconciliation committee that would include youth movements.

He said the roadmap had been agreed by a range of political groups.

The army said President Mursi had failed to meet demands of the Egyptian people and a technocratic government committee will review the constitution.

US President Barack Obama said he was deeply concerned by the decision of the Egyptian military and called for a swift return to civilian government.

President Obama urged all sides to avoid violence, and said he expected the military to protect the right to peaceful assembly.

At least five people were killed when opponents and supporters of Egypt's deposed president, Mohamed Mursi, clashed following the announcement.

Gunfire broke out as rocks and bricks flew in the Mediterranean city of Alexandria, witnesses said.

At least one person was killed and 50 were wounded, state news agency MENA reported.

"We are dealing with the situation ... We have called for security reinforcements in the area," said senior police officer Sherif Abdelhamid.

Four people were also killed in clashes in the northern city of Marsa Matrouh, the state governor said.

View a picture gallery of the developments in Egypt here

Egypt’s State-run paper, Al-Ahram said the army told president Mursi at 5pm GMT that he was no longer president.

The Facebook page of Mohamed Mursi quoted him as saying he rejected measures announced by the army as a "military coup."

Earlier a statement from Mr Mursi's national security advisor said a military coup was under way.

Reports suggest a travel ban has been issued against the president, and the Muslim Brotherhood chief and deputy chief.

Mr Mursi spent the day working as normal at a regular presidential office in a compound of the Republican Guard in suburban Cairo however it is unclear if the president will be free to leave the compound.

Soon after the army-imposed deadline passed, a military helicopter circled over the anti-Mursi crowds in Tahrir Square, which was transformed into a sea of furiously waving Egyptian flags.

Millions were in the main squares of major cities nationwide, demanding Mr Mursi's removal, in the fourth day of the biggest anti-government rallies the country has seen.

Troops including commandos and in full combat gear, deployed just as darkness fell across much of the Egyptian capital at key facilities, on bridges over the Nile River and at major intersections.

Earlier, the Egyptian presidency said a coalition government should be part of a solution but appeared to offer no new compromises.

A statement reiterated that President Mursi held opposition parties responsible for obstructing a political initiative that would also set up a panel to prepare amendments to the constitution passed into law last December.

Security sources reported that Egyptian troops with armoured vehicles had secured the central Cairo studios of state television.

Sources said staff not involved in working on live broadcasts had left the building.

The army said it had set no times for issuing statements or speeches as the deadline approached.

They said they were willing to shed blood against "terrorists and fools" after Mr Mursi refused to give up his elected office.

In an emotional, rambling television address last night, Mr Mursi said he was democratically elected and would stay in office to uphold the constitutional order, declaring: "The price of preserving legitimacy is my life."

State news agency MENA said civil servants were occupying the cabinet office and would not let Prime Minister Hisham Kandil enter the building.

The official spokesman of Mr Mursi's Muslim Brotherhood movement said supporters were willing to become martyrs to defend him.

At least 16 people, mostly supporters of the president, were killed and about 200 wounded when gunmen opened fire overnight on pro-Mursi demonstrators at Cairo University campus.

The Muslim Brotherhood accused uniformed police of the shooting. The Interior Ministry said it was investigating.

For the first time in many months, uniformed police were back patrolling the streets, and the Interior Ministry said in a statement it would "confront all forms of violence".

Fireworks and cheering erupted in Cairo's Tahrir Square after the army's commander told the people of Egypt that a political roadmap had been agreed with opposition and religious leaders.

The United States has urged compromise and defended the legitimacy of Mr Mursi's election to lead the biggest Arab nation.

President Barack Obama told Mr Mursi by telephone that talks with opponents were needed.

Mr Mursi said on Twitter that he would not be "dictated to internally or internationally".

A senior European diplomat said world powers would have no choice but to condemn the military removal of an elected head of state, even if the generals have support on the streets.

Irish citizens advised against non-essential travel to Egypt

The Department of Foreign Affairs is advising against non-essential travel to Egypt, with the exception of the Red Sea resorts.

The department is advising any citizens caught up in demonstrations not to take photographs and to leave the area immediately.

It is strongly advising against all travel to Northern Sinai where the security situation is particularly unstable.