BANGKOK — Thais began voting Sunday in a referendum on a new constitution that critics say was tailor-made for the military government to stay in control for several years and entrench a new, quasi-democratic system that gives vast powers to appointed officials.

The junta, which came to power in a May 2014 coup and ordered the constitution rewritten, says the new version will usher in a new era of clean politics and stable democracy in a country chronically short of both in recent years, sometimes sliding into violent internal political conflict.

Still, the government of Prime Minister Prayuth Chan-ocha, a retired army general, used its sweeping powers to ban political rallies, independent campaigns against the draft constitution and virtually no debates on it. Opponents say this was done to ensure that people would have little knowledge about the constitution's provisions, even though 1 million copies are claimed to have been distributed to the public in a nation of 64 million people.

More than 100 people who tried to campaign against the referendum on social media have been thrown in jail, and open criticism has been made punishable by up to 10 years in prison.

"The lack of open campaigning is effectively a one-sided campaign," said Thitinan Pongsudhirak, a political analyst at Bangkok's Chulalongkorn University. "The intention is to have campaigns for the constitution, not against the constitution, because a lot of credibility is on the line for the junta."

People are being asked to check "yes" or "no" for the constitution and related provisions on the ballot paper. Final results are expected late Sunday.

Election Commission volunteers check voting materials and ballot boxes a day before the referendum on a new constitution, at Ratchathewi district office in Bangkok, Thailand, August 6, 2016. CHAIWAT SUBPRASOM / Reuters

The main criticism of the draft constitution includes at least five years of a transitional period and a 250-member appointed Senate that includes the commanders of the army and other security services. A deadlock in the 500-member elected lower house could trigger a selection of a prime minister who is not an elected member of parliament.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Also, emergency decrees enacted by the junta without any parliamentary consent remain valid. So-called independent bodies, stacked with conservative appointees, would hold "disproportionately broad and unchecked powers" over elected politicians, said the international human rights consortium FIDH and the Union for Civil Liberty in Thailand.

"The draft charter creates undemocratic institutions, weakens the power of future elected governments, and is likely to fuel political instability," they said in a report.

Even if Thais vote "no," the military will remain in control for the foreseeable future. Prayuth has promised to hold elections next year, without elaborating on how that would happen if voters reject the draft constitution.

"I have no intention of holding on to power. I always said that we will have an election in 2017. ... We want the country to move forward and figure out ways to have stability for at least five years," Prayuth said Friday. "If I was a real dictator, I would have not allowed the referendum or promised to hold elections."

Thailand has endured 13 successful military coups and 11 attempted takeovers since it replaced absolute with a constitutional monarchy in 1932. If passed, this would be Thailand's 20th constitution.

Leaders of the latest coup say sometimes violent political conflict made the country ungovernable and that military rule was necessary to bring stability. It set up hand-picked committees to draft a charter that would enshrine its declared goal of reforming politics by eliminating corruption.

Norachit Sinhaseni, a member of the Constitution Drafting Commission, said Thai people "feel there is a lot corruption going on, money is being wasted and a lot of it is going into the pockets of politicians. So what they want and what we are trying to do is have a cleaner government, have better politicians who view the interests of the people at heart."

But others believe the draft constitution has a different aim: to weaken allies of former Prime Minister Thaksin Shinawatra, the central figure who has roiled Thai politics since 2006.

Thaksin's political machine has easily won every national election since 2001, relying on the support of working-class and rural voters who benefited from his populist policies. Leading the other side is Thailand's traditional ruling class and royalists unnerved by Thaksin's political support, especially as it contemplates its future. King Bhumibol Adulyadej, whose righteous rule has anchored the kingdom since 1946, is 88 and ailing.

The army ousted Thaksin in a 2006 coup, after his "yellow shirt" critics took to the streets and accused him of abuse of power, corruption and disrespecting the king. He has lived abroad since 2008 to avoid prison for a corruption conviction that he says was politically motivated. The 2014 coup ousted his sister Yingluck Shinawatra, who was elected prime minister in 2011, but buffeted by protests sparked by legislation that would have pardoned Thaksin.

Thaksin, a telecoms billionaire, came to power by taking advantage of provisions in Thailand's 1997 constitution, generally acknowledged as the most democratic in the country's history.

Those who brought Thaksin down now seek to weaken major political parties, which would ensure that real power stays in the hands of what is dubbed the permanent bureaucracy: the military, the courts and other unelected guardians of the conservative bloc.

The draft constitution would make it "very easy to disband parties, keep politicians in line, impeach politicians, and it will enforce a coalition government of weaker, smaller parties," said Thitinan, the political scientist. "As a result, we will see power and authority shifted away from elected representatives to appointed agencies and individuals."

Chaturon Chaisang, who served in the Cabinets of both Thaksin and Yingluck, told The Associated Press that his biggest objection is that "the draft charter will not allow Thai people to determine the future of this country."