Egypt's Islamist President Mohamed Morsi assumed sweeping powers on Thursday, drawing criticism he was seeking to be a "new pharoah" and raising questions about the gains of last year's uprising to oust Hosni Mubarak.
The move is a blow to the pro-democracy movement that toppled the long-time president, himself derided by many as a pharoah, and raises concerns that Islamists will be further ensconced in power.
And while there were demonstrations in the capital in support of Morsi, other people turned out to denounce what one feared was the advent of another dictator.
"The president can issue any decision or measure to protect the revolution," according to a decree read out on television by presidential spokesman Yasser Ali.
"The constitutional declarations, decisions and laws issued by the president are final and not subject to appeal."
Nobel laureate and former UN atomic energy agency chief Mohamed ElBaradei lashed out at the declaration, which would effectively put the president above judicial oversight.
"Morsi today usurped all state powers and appointed himself Egypt's new pharaoh. A major blow to the revolution that could have dire consequences," ElBaradei wrote on his Twitter account.
Morsi also sacked prosecutor general Abdel Meguid Mahmud, whom he failed to oust last month amid strong misgivings among the president's supporters about the failure to secure convictions of more members of the old regime.
He appointed Talaat Ibrahim Abdallah to replace Mahmud and, within minutes of the announcement, the new prosecutor was shown on television being sworn in.
In his pronouncement, the president also ordered "new investigations and retrials" in the cases dealing with the deaths of protesters, a decision that could net senior military officials and see Mubarak reinvestigated.
He also said no judicial body can dissolve the upper house of parliament or the Islamist-dominated constituent assembly that is writing a new constitution and which has been criticised by the secular-minded opposition for failing to represent all segments of society.
And he gave the body - which was due to issue a draft constitution in December - two extra months to come up with a charter, that will then be put to a referendum.
The declaration is aimed at "cleansing state institutions" and "destroying the infrastructure of the old regime," the president's spokesman said.
Ali said Morsi had issued a new law, which is yet to be ratified by the new parliament, calling for the creation of a "revolutionary prosecution" to investigate crimes related to the killing of protesters and to hold accountable anyone who withheld evidence in previous trials.
A senior official with the Justice and Freedom Party, the Muslim Brotherhood's political arm, said the move was necessary to guarantee the revolution was on course.
"We could not find any legal avenue to pinpoint and prosecute those in the ministry of interior who were responsible for killings," Gehad Haddad told AFP.
He said there had been a string of acquittals of interior ministry officials, evidence was withheld in cases, investigations had been weak and many had not been brought to trial over the killings of hundreds of protesters during and since the uprising - a view that secular protesters would agree with.
"The avenues we are taking are born of necessity, not choice," he said.
Heba Morayef, Egypt Director at Human Rights Watch, welcomed the retrials but criticised aspects of the declaration.
"What's fundamentally problematic and threatens both the rule of law and overall democratic checks and balances is his decision to give his decrees immunity from the judiciary until the constitution is passed," Morayef told AFP.
And while the independence of the judiciary has been in question in the past, "these sledge-hammer tactics only alienate the legal community," she said.
"As a judge, I feel paralysed," one judge at Egypt's State Council told AFP.
Even before the announcement was read out, Islamists had gathered outside the High Court in central Cairo demanding the "cleansing of the judiciary."
They "will bring justice to the martyrs and will hold the corrupt accountable," said Mahmud Sultan.
But a few kilometres away, there were vocal denunciations of Morsi's declaration.
"We didn't have an uprising so that we put in place another dictator," said a furious Khaled Ali. "He's not just a pharaoh, he thinks he's God."
Morsi, who hails from the powerful Muslim Brotherhood, is the first president to be elected since Mubarak stepped down. He is also the country's first civilian head of state and the first Islamist to lead the Arab world's most populous country.
The Brotherhood has long been the best organised political force in Egypt, and secular activists had expressed fears that it would exploit the turmoil of Mubarak's overthrow to impose its will.