The head of Egypt's armed forces has given politicians 48 hours to resolve a political crisis and answer demands made by the Egyptian people.

In a statement on state television, General Abdel Fattah al-Sisi said that if the government of President Mohammed Mursi and his opponents failed to resolve the row, the military would offer its own "road map for the future".

The army rejected accusations that it has mounted a military coup and said it aimed to push politicians to reach consensus.

The armed forces said it was responding to the “pulse of the Egyptian street.”

The move comes a day after millions of Egyptians took to the streets to demand that President Mursi quit.

The army statement was cheered by anti-Mursi demonstrators outside the presidential palace and also welcomed by the main opposition National Salvation Front, which has demanded a national unity government for months.

However, Egypt's second biggest Islamist party said it feared the army's return to public life "in a big way".

A senior member of the Muslim Brotherhood's Freedom and Justice Party (FJP) said "everyone" rejected the statement issued by the armed forces.

It is the second time in just over a week that the armed forces issued a formal warning to the politicians, piling pressure on Mr Mursi to concede power-sharing with the liberal, secular and left-wing opposition.

A US Pentagon spokesperson said it was reviewing the Egyptian army’s statement and would not speculate on what will happen.

At a news conference in Tanzania, US President Barack Obama called on Mr Mursi's government to do more to enact democratic reforms.

He also urged all sides to work towards a peaceful solution.

Ministers resign 'in sympathy'

Four Egyptian ministers earlier resigned from government.

An official gave no reason for the move, but the state news agency earlier said the ministers were considering resigning in sympathy with the protesters.

Earlier, the Cairo headquarters of Egypt's ruling Muslim Brotherhood was overrun by men who ransacked the building after those inside had been evacuated following a night of violence.

Security sources said that eight people were killed in hours of fighting around the besieged building.

Medical sources said over 100 were wounded.

The Muslim Brotherhood movement said its headquarters, on a hill overlooking the capital, was surrounded by dozens of men firing shotguns and throwing rocks and petrol bombs.

Brotherhood leaders complained that police failed to appear to protect their headquarters.

Staff at a nearby hospital said two people had been killed and 45 treated for gunshot wounds from the incident overnight.

The demonstrations, which brought half a million people to Tahrir Square and a similar crowd in the second city, Alexandria, were easily the largest since the Arab Spring uprising that ousted Hosni Mubarak two-and-a-half years ago.

Mr Mursi stayed out of sight throughout the protests but acknowledged through a spokesman that he had made mistakes, adding that he was working to fix them and was open to dialogue.

He showed no sign of quitting.

An aide to Mr Mursi outlined three ways forward: parliamentary elections, which he called "the most obvious"; national dialogue, which he said opponents had repeatedly rejected; and third, early presidential elections, as demanded by protesters.

But that, he said, "simply destroys our democracy".