Egyptian President Mohamed Morsi's decree exempting all his decisions from legal challenge until a new parliament was elected caused fury amongst his opponents on Friday who accused him of being the new Hosni Mubarak and hijacking the revolution.

Thousands of chanting protesters packed Tahrir Square, the heart of the 2011 anti-Mubarak uprising, demanding Morsi quit and accusing him of launching a "coup". There were violent protests in Alexandria, Port Said and Suez.

Morsi defended on Friday the decree granting him sweeping powers, saying that it was not designed to "settle scores" with the opposition, but to ensure national stability.

"The decisions I took (on Thursday) are aimed at achieving political and social stability," he told his supporters in Cairo.

Morsi vowed to firmly enforce the law against what he called "hooligans" allegedly hired by loyalists of the former regime to attack security forces and state institutions. 

Morsi's aides said the presidential decree was to speed up a protracted transition that has been hindered by legal obstacles but Morsi's rivals were quick to condemn him as a new autocratic pharaoh who wanted to impose his Islamist vision on Egypt. Buoyed by accolades from around the world for mediating a truce between Hamas and Israel, Morsi on Thursday ordered that an Islamist-dominated assembly writing the new constitution could not be dissolved by legal challenges.

"Morsi a 'temporary' dictator," was the headline in the independent daily Al-Masry Al-Youm.

Morsi, an Islamist whose roots are in the Muslim Brotherhood, also gave himself sweeping powers that allowed him to sack the unpopular general prosecutor and opened the door for a retrial for Mubarak and his aides.

The president's decree aimed to end the logjam and push Egypt, the Arab world's most populous nation, more quickly on its democratic path, the presidential spokesman said.

"President Morsi said we must go out of the bottleneck without breaking the bottle," Yasser Ali told Reuters.

Speaking at a Cairo mosque, Morsi told worshippers Egypt was moving forward. "I fulfill my duties to please God and the nation," he said, the official news agency reported.

The president's decree said any decrees he issued while no parliament sat could not be challenged, moves that consolidated his powers but look set to polarise Egypt further, threatening more turbulence in a nation at the heart of the Arab Spring.

The turmoil has weighed heavily on Egypt's faltering economy that was thrown a lifeline this week when a preliminary deal was reached with the International Monetary Fund for a 4.8 billion dollar loan. But it also means unpopular economic measures.

"The people want to bring down the regime," shouted protesters in Tahrir, echoing one of the chants that was used in the uprising that forced Mubarak to step down.

In Alexandria, north of Cairo, protesters ransacked an office of the Brotherhood's political party, burning books and chairs in the streets. Supporters of Morsi and opponents clashed elsewhere in the city, leaving 12 injured.

A party building was also attacked by stone-throwing protesters in Port Said, and demonstrators in Suez threw petrol bombs that burned banners outside the party building.

The decree is bound to worry Western allies, particularly the United States, a generous benefactor to Egypt's army, which effusively praised Egypt for its part in bringing Israelis and Palestinians to a ceasefire on Wednesday.

The West may become concerned about measures that, for example, undermine judicial independence. But one Western diplomat said it was too early to judge and his nation would watch how the decree was exercised in the coming days.

"We are very concerned about the possible huge ramifications of this declaration on human rights and the rule of law in Egypt," Rupert Colville, spokesman for the UN Human Rights Commissioner Navi Pillay, said at the United Nations in Geneva.

The United States has been concerned about the fate of what was once a close ally under Mubarak, who preserved Egypt's 1979 peace treaty with Israel. The Gaza deal has reassured Washington but the deepening polarization of the nation will be a worry.

"The decree is basically a coup on state institutions and the rule of law that is likely to undermine the revolution and the transition to democracy," Mervat Ahmed, an independent activist in Tahrir protesting against the decree, said. "I worry Morsi will be another dictator like the one before him."

Leading liberal politician Mohamed ElBaradei, who joined other politicians on Thursday night to demand the decree was withdrawn, wrote on his Twitter account that Morsi had "usurped all state powers and appointed himself Egypt's new pharaoh."

Almost two years after Mubarak was toppled and about five months since Morsi took office, propelled to the post by the Muslim Brotherhood, Egypt has no permanent constitution, which must be in place before new parliamentary elections are held.

The last parliament, that sat for the first time earlier this year, was dissolved after a court declared it void. It was dominated by the Brotherhood's political party.

An assembly drawing up the constitution has yet to complete its work. Many liberals, Christians and others have walked out accusing the Islamists who dominate it of ignoring their voices over the extent that Islam should be enshrined in the new state.

Opponents call for the assembly to be scrapped and remade. Morsi's decree protects the existing one and extends the deadline for drafting a document by two months, pushing it back to February, further delaying a new parliamentary poll.

Explaining the rationale behind the moves, the presidential spokesman said: "This means ending the period of constitutional instability to arrive at a state with a written constitution, an elected president and parliament."

Thousands of the president's supporters gathered near the presidential palace, some holding up Morsi posters or chanting for him. The Muslim Brotherhood had called for the rally.

Analyst Seif El Din Abdel Fatah said the decree targeted the judiciary which he said had reversed, for example, an earlier Morsi decision to remove the prosecutor. Morsi's new decree protects him from such judicial reversals.

Although many of Morsi's opponents also opposed the sacked prosecutor, who they blamed for shortcomings in prosecuting Mubarak and his aides, and also want judicial reform, they say a draconian presidential decree was not the way to do it.

"There was a disease but this is not the remedy," said Hassan Nafaa, a liberal-minded political science professor and activist at Cairo University.

"I can see from the reaction of the political forces that we are going towards more polarization between the Islamist front on one hand and all the others on the other. This is a dangerous situation," he said, adding it could spark more street trouble.

The streets have been relatively quiet since Morsi took office, although this week protesters have clashed with police during rallies to mark deadly demonstrations last year.

In June, the then ruling military council issued a decree as Morsi was being elected that sought to rein in his powers, but he struck back in August issuing a decree as president revoking that, giving himself those powers and sacking top generals.

The new army leaders are now appointees of Morsi and have stepped back from politics. The military still wields hefty influence through its huge business interests and security role. But one analyst said the generals had been "neutralized."