Egyptians appear to have approved a controversial new constitution in a referendum, unofficial and preliminary results indicate.
Results reported by state media suggest that some 63% of voters backed the charter over two rounds of polling.
Critics say the document, which has triggered mass protests, betrays the revolution that toppled Hosni Mubarak.
President Mohammed Morsi's mainly Islamist supporters say it will secure democracy and encourage stability.
Official results are not expected until Monday, after appeals are heard. If the constitution passes, parliamentary elections must take place within three months.
Turnout was estimated at 30%. The opposition said voting in both rounds had been marred by abuses.
Violations in the second round on Saturday included polling stations opening late and Islamists seeking to influence voters, the opposition said.
The second round was held in the 17 provinces that did not vote in the first round on 15 December. Some 25 million people were eligible to vote in the second round, about 51 million across the two rounds.
The Islamist Muslim Brotherhood movement, which supports Mr Morsi and the new constitution, said early on Sunday that, with most second round votes counted, more than 70% were in favour.
The opposition National Salvation Front also said the "Yes" vote appeared to have won, though spokesman Khaled Daoud said the Front felt "empowered".
"We proved that at least we are half of society [that] doesn't approve of all this. We will build on it," he said.
In the first round, on 15 December, turnout was reported to be just above 30% with unofficial counts suggesting some 56% of those who cast ballots voted in favour of the draft.
Opponents have said the draft constitution fails to protect the freedoms and human rights that they sought in the uprising that ended Mr Mubarak's rule last year.
They accuse the president of pushing through a text that favours Islamists and does not sufficiently protect the rights of women or Christians, who make up about 10% of the population.
One Egyptian, 19-year-old law student Ahmed Mohammed, said he voted "Yes" because Egypt "needs a constitution to be stable".
But at the same polling station in Giza, south-west of the capital, 50-year-old housewife, Zarifa Abdul Aziz, said: "I will vote 'No' a thousand times. I am not comfortable with the Brotherhood and all that it is doing."
Egypt's official state news agency Mena said that at least two judges had been removed for encouraging voters to cast "Yes" ballots.
Just hours before voting ended on Saturday, Vice-President Mahmoud Mekki announced his resignation.
Mr Mekki, a former judge who was appointed vice-president in August, said the "nature of politics" did not suit his professional background.
Over the past month, seven of President Mohammed Morsi's 17 top advisers have resigned.
Mr Mekki said he had tried to resign on 7 November, but his decision had been delayed by the Israeli conflict in Gaza and President Morsi's controversial decree on 22 November granting himself sweeping new powers.
Mr Mekki's resignation statement indicated he had no prior knowledge of the decree, which stripped the judiciary of powers to question the president's decisions.
After an outcry, the president revoked much of the 22 November decree, but he refused to back down on the draft constitution.
The text was rushed through by a constituent assembly dominated by Islamists and boycotted by liberal and left-wing members, and facing a threat of dissolution by the country's top court.
Egypt has seen large demonstrations by both sides, which have occasionally turned violent, ever since.