BANGKOK (Reuters) - Thailand goes to the polls on Sunday under a new system that critics say the military government has devised to prevent the most popular political party, which has won every election since 2001, from returning to power.

Thailand's Prime Minister Prayut Chan-o-cha talks with a man as he visits Lumphini Park ahead of the general election, in Bangkok, Thailand, March 20, 2019. REUTERS/Soe Zeya Tun

The military government says the new rules will usher in stability after more than a decade of fractious, at times violent, politics.

After a government loyal to former Prime Minister Thaksin Shinawatra was ousted in a 2014 coup, the military for years banned political activity, suppressed debate, restricted the media and detained dissidents.

Sunday’s general election will officially restore civilian rule but the military will retain a decisive role in politics under a new constitution, and the former army chief who led the 2014 coup, Prime Minister Prayuth Chan-ocha, is hoping to stay on as head of an elected government.

Following are some details about the new system that supporters of the self-exiled Thaksin say is aimed at blocking them from winning.

THE SENATE

The 250-seat upper house Senate is entirely appointed by the ruling junta. Under the previous constitution, the Senate was only partially appointed.

The Senate will for the first time since 1978 vote along with the lower house, the 500-seat House of Representatives, to choose the new prime minister and government.

Previously, only members of the lower house voted for prime minister.

The magic number of seats parties or alliances need to secure to form a government is 376 - 50 percent plus one of the total number in the two houses of parliament.

With the military choosing all Senate members, including seats reserved for six heads of different armed forces branches, pro-military parties would likely need to win only 126 seats in the House of Representatives to win a majority in a combined vote.

Anti-junta parties, on the other hand, which can’t count on any Senate votes, would need to win 376 seats lower house seats to gain a majority.

THE HOUSE OF REPRESENTATIVES

The makeup of the 500-seat House of Representatives is what will be decided on Sunday, but not all seats are directly elected.

Under the new constitution, the House of Representatives has 350 “constituency seats”, to which voters on Sunday will directly elect a candidate and, by default, their preferred party.

It also has 150 “party seats”, up from 125 previously.

THE FORMULA FOR PARTY SEATS

Party seats are allocated under a complicated system that big parties, like Pheu Thai, the main pro-Thaksin party, say is disadvantageous for them.

Party seats are distributed by a system that “caps” the total number of seats any one party can gain, based on their percentage of total votes cast nationwide.

The “value” one seat in the House of Representatives is assigned is based on a formula that takes the total number of votes cast and divides it by the 500 seats. So, if 40 million people were to vote on Sunday, the value of one House seat would be 80,000 votes.

A party cannot win more seats than it has “earned” in total votes nationwide. And if a party has already reached or is close to its cap in constituency seats, then it cannot get any more party seats than that cap allows.

If a party wins more constituency seats than its cap, then it keeps those seats but cannot be awarded any party seats even if it was the top vote getter.

The system leaves a bigger pie of party seats for smaller parties to divide up. This will likely result in numerous smaller parties that normally would not have won any seats, awarded one or more party seats.

To illustrate the impact of the new rules, Pheu Thai won the last election, in 2011, with 204 constituency seats and then 61 party seats - awarded under a directly proportional system - as it won 48 percent of the total vote. That gave it a majority of 265 seats in the House of Representatives.

If it were to win the same number of votes this time, the new rules would mean it would end up with 42 fewer seats, which would leave it short of a majority.

CHOOSING PRIME MINISTER

A party must have at least 25 seats in the House of Representatives to nominate a candidate for prime minister.

After that, it will take the support of 376 out of 750 members of the combined houses to become prime minister.

Because the junta will have already chosen all 250 seats of the Senate, the main Palang Pracharat party allied to the military needs to gain only 126 more votes in the lower house.

That’s a huge advantage, though not a guarantee.

If no coalition can agree on prime minister, the new constitution also allows for an “outside” prime minister who is not a member of parliament.