Update Dec. 23, at 5:30 a.m.:

Egypt's constitution appears to have passed with 64 percent of Egyptians voting "yes," according to preliminary results issued by state-run media. But the document passed under a cloud of controversy as the opposition to the Islamist-backed document cried fraud.

Once official results are announced, President Mohammed Morsi is expected to give up his all-inclusive powers. A set of controversial decrees he issued last month, that effectively put him above the law, will be void when the constitution is adopted. He is also expected to hand over legislative powers to the upper house of parliament until a new lower house is elected and assumes its role as the legislature.

He appointed 90 members to the upper house of parliament, including 12 Christians and eight women, in an apparent bid to calm the opposition who have accused Morsi and the Muslim Brotherhood of dominating all political institutions.

The passage of the constitution is a victory for the embattled president after four weeks of political turmoil and intermittent violence centered on his rule. He comes out of this battle scarred, however, and observers say he has lost all support of revolutionary forces and building national consensus in the future will be difficult. The country is more polarized than ever and the vote on the constitution was marred by low turnout and claims of fraud.

Our original post continues below:

Egyptians voted late into the night Saturday on an Islamist-backed constitution that has polarized the nation. There seemed to be no question that the document would pass, bolstering embattled President Mohammed Morsi, who hails from the historic Muslim Brotherhood.

Opponents of the constitution say Egypt will remain unstable if the charter becomes law. They say they will continue to protest the Muslim Brotherhood, Egypt's new powerhouse.

The battle lines on the referendum have hardened, and in many ways the vote has morphed from a choice on a document to a referendum on the Brotherhood itself.

In the poor district of Imbaba, a neighborhood in the Giza district of greater Cairo, the nation's divisions were literally written on the wall. Scrawling black graffiti tags urged people to vote no to the constitution. Well-designed posters from the Muslim Brotherhood's campaign were hastily pasted up nearby.

Teacher Nadi Fouad, 42, patiently waited in a block-long line to vote. Dressed in a dapper suit, he said he planned to vote yes for the constitution and yes to stability. In the end, he said, the opposition will accept the results, the same way Egyptians accepted a divisive result during the presidential elections.

"They will opt for democracy, even if they appear to be harsh and revolutionary now," he said. A man nearby jeered, "Where is Morsi now?"

Fellow revolutionaries no longer feel sympathy for the once-oppressed group now that it has become Egypt's ruling party.

Now they are mobilizing against the group, criticizing it for forgetting about human rights and reform. But the organization and efficiency that the Brotherhood has consistently shown in Egypt's nearly two-year transition has so far eluded all other political and revolutionary forces.

"I will vote no and we will see the results," Nour Osama, a 19-year-old law student, said at a polling station in Giza.

But she said she knows that this constitution will pass. Many who agree with her have given up already and aren't voting.

"The Brotherhood are a majority of Egypt. All of them are going to vote and on our side some of us are going to vote and others are staying home," she said. "They will win. But the revolution will carry on, we will protest again and again and again."

Early results of the first phase of the two-part vote last weekend showed a majority voting for the constitution. Revolutionary groups reported some violations during the voting process, although there were no substantiated claims of systemic fraud.

The turmoil of the last four weeks, since Morsi issued a decree that effectively put him above the law until a new constitution is in place, sparked many critics to call the president a new dictator.

The constitution being voted on was adopted by a largely Islamist body. Most others involved in drafting the document withdrew in protest over what they say is a constitution that fails to abolish military trials for civilians, effectively limit the powers of the president and protect minority rights — all while slightly expanding the role of Islam in Egypt.

Morsi's decisions were a catalyst for mass protests and some of those turned violent, leaving Brotherhood members and opponents dead in clashes. Critics of the Brotherhood accuse the organization of using Mubarak-era tactics, sending thugs to attack critics.

In a twist late Saturday, Egypt's vice president resigned. Mahmoud Mekki, a judge who long fought for the independence of the judiciary, said he'd planned to resign earlier but couldn't due to the political climate. In the past month he has defended Morsi's policies and called for national dialogue. He steps down just as it appears that the position of vice president will be eliminated in a new constitution.

On Saturday, most people interviewed said they are tired — tired of political jockeying, the battles over politics and the protests. They just want a little stability.

Walid Mahmoud Ashri, a mechanic in the neighborhood of Dokki in greater Cairo, said he just wants it over. He voted yes to the constitution and hopes that means that soon Egyptians' real problems will be addressed — security, unemployment and poverty.

"During the days of Mubarak, yes, he stole from us, but there was stability, safety, there was no terrorism," he said. "There are many people who haven't received their rights — workers, those who are not employed, these people don't have rights, and these are the majority of the people."

Copyright 2016 NPR. To see more, visit http://www.npr.org/.