CAIRO - An Islamist-led assembly finalized a new constitution early on Friday aimed at transforming Egypt and paving the way for an end to a crisis that erupted when President Mohamed Morsi gave himself sweeping new powers last week.
Morsi said his decree halting court challenges to his decisions, which provoked protests and violence from Egyptians fearing a new dictator was emerging less than two years after they ousted Hosni Mubarak, was "for an exceptional stage."
"It will end as soon as the people vote on a constitution," he told state television on Thursday night. "There is no place for dictatorship."
The assembly concluded the vote after a session that lasted 19 hours, approving all articles including presidential powers, the status of Islam, the military's role and the extent to which human rights will be respected in the post-Hosni Mubarak era.
The final draft contains historic changes to Egypt's system of government. It limits to eight years the amount of time a president can serve, for example. Mubarak was in power for three decades. It also introduces a degree of oversight over the military establishment - though not enough for critics.
President Morsi is expected to ratify the document by Saturday, allowing a referendum to be held as soon as mid-December on a text the Islamists say reflects Egypt's new freedoms.
"We have finished working on Egypt's constitution. We will call the president today (Friday) at a reasonable hour to inform him that the assembly has finished its task and the project of the constitution is completed," said Hossam el-Gheriyani, head of the assembly in a live broadcast of the session.
The vote was often interrupted by bickering between the mostly Islamist members and Gheriyani over the document's articles. Several articles were amended on the spot before they were voted on.
"This is a revolutionary constitution," Gheriyani said, asking members of the assembly to launch a cross-country campaign to "explain to our nation its constitution," added Gheriyani, after which Egypt's national anthem was played.
Gheriyani said the assembly would continue its work in an administrative capacity to prepare for the popular referendum that Morsi is to call for after reading the finalized draft.
Morsi's critics argue it is an attempt to rush through a draft they say has been hijacked by the Muslim Brotherhood, which backed Morsi for president in June elections, and its allies.
Two people have been killed and hundreds injured in the protests since last Thursday's decree, which deepened the divide between the newly empowered Islamists and their opponents.
Setting the stage for more tension, the Muslim Brotherhood and its Islamist allies have called for pro-Morsi rallies on Saturday. But officials from the Brotherhood's party changed the venue and said they would avoid Tahrir Square, where a sit-in by the president's opponents entered an eighth day on Friday.
Seeking to calm protesters, Morsi said he welcomed opposition but it should not divide Egyptians and there was no place for violence. "I am very happy that Egypt has real political opposition," he said.
He stressed the need to attract investors and tourists to Egypt, where the crisis threatens to derail some early signs of an economic recovery after two years of turmoil. Egypt's benchmark stock index fell on Thursday to a four-month low.
An alliance of Egyptian opposition groups pledged to keep up protests and said broader civil disobedience was possible to fight what it described as an attempt to "kidnap Egypt from its people."
Eleven Egyptian newspapers plan not to publish on Tuesday to protest Morsi's decree, one reported. Al-Masry Al-Youm, one of Egypt's most widely read daily newspapers, also said three privately owned satellite channels would not broadcast on Wednesday in protest.
The plebiscite is a gamble based on the Islamists' belief that they can mobilise voters again after winning all elections held since Mubarak was overthrown in February 2011.
"May God bless us on this day," Gheriyani, the speaker of the constituent assembly, told members at the start of the session to vote on each of the 234 articles in the draft, which will go to Mursi for approval and then to the plebiscite.
The legitimacy of the constitutional assembly has been called into question by a series of court cases demanding its dissolution. Its standing has also suffered from the withdrawal of members including church representatives of the Christian minority and liberals.
The Brotherhood argues that approval of the constitution in a referendum would bury all arguments about both the legality of the assembly and the text it has written in the last six months.
Morsi is expected to approve the adopted draft at the weekend. He must then call the referendum within 15 days. If Egyptians approve the constitution, legislative powers will pass straight from Morsi to the upper house of parliament, in line with an article in the new constitution, assembly members said.
The draft injects new Islamic references into Egypt's system of government but keeps in place an article defining "the principles of sharia" as the main source of legislation - the same phrase found in the previous constitution.
Among other historic changes to Egypt's system of government, it caps the amount of time a president can serve at two terms, or eight years. Mubarak ruled for three decades. It also introduces a measure of civilian oversight - not nearly enough for the critics - over the military establishment.
The president can declare war with parliament's approval, but only after consulting a national defense council with a heavy military and security membership, effectively giving the army a say. That element was not in the old constitution, used when Egypt was ruled by ex-military men.
Activists highlighted other flaws such as worrying articles pertaining to the rights of women and freedom of speech.
"There are some good pro-freedoms articles, but there are also catastrophic articles like one that prevents insults. This could be used against journalists criticizing the president or state officials," said human rights activist Gamal Eid.
"We wanted Egyptians to get more freedoms and less presidential powers and were unhappy with the end result in those areas," said Edward Ghaleb, who had been sitting on the assembly as a representative of the Coptic Orthodox church.
New parliamentary elections cannot happen until the constitution is passed. Egypt has been without an elected legislature since the Islamist-dominated lower house was dissolved in June.
"The secular forces and the church and the judges are not happy with the constitution; the journalists are not happy, so I think this will increase tensions in the country," said Mustapha Kamal Al-Sayyid, a professor of political science at Cairo University. "I don't know how the referendum can be organized if the judges are upset," he added.
Egyptian elections are overseen by the judiciary.
The decree issued by Morsi worsened already tetchy relations with judges, many of whom saw it as a threat to their independence. Two courts declared a strike on Wednesday.