BANGKOK, Thailand -- Thailand's army chief has warned a state of emergency will be declared if post-election violence degenerates into "civil war".


The military-led government is meanwhile trying to imprison a new, wildly popular, anti-army politician for "sedition" while the junta enjoys legal immunity for their 2014 coup and subsequent acts.


Officials are also deciding how to count the votes from last month's election amid allegations of manipulated ballots, "ghost voters," and a baffling, complex system invented by the regime. Critics say it is biased against pro-democracy candidates. 


The junta filed the sedition charge -- punishable by nine years in jail -- plus other cases against Future Forward party leader Thanathorn Juangroongruangkit, 40, on April 6. 


The case dates back to 2015 when Mr. Thanathorn allegedly "provided assistance" to an anti-coup protest leader. Mr. Thanathorn reportedly gave a walking protester a ride in his car.


Mr. Thanathorn's party came in third place in the election. His sudden rise is portrayed partly as a young vs. old generation gap. 


The junta despises Mr. Thanathorn, a billionaire auto parts tycoon, because he demands future coup leaders be punished, cuts to military spending, and ending army conscription. 


He would shrink the U.S.-trained army from 330,000 troops to 170,000 and the number of generals from 1,600 to 400.


He also promised to rewrite coup leader Prayuth Chan-ocha's 2017 constitution and decrees. 


When Prime Minister Prayuth was army chief in 2014, he toppled an elected civilian government to bring "peace and happiness." 


After ruling with near-absolute power, Mr. Prayuth permitted an election for the House of Representatives on March 24, expecting to be endorsed for four more years.


Those 500 House seats will be confirmed May 9 when the junta-appointed 250-seat Senate is unveiled.


The delay allows Thailand's new king to be coronated during the first week of May without political disturbance.


But Thailand is already suffering a dangerous spiral of confrontation, hatred and threats of violence after the polarizing polls.


"Democracy versus dictatorship rhetoric is meant to divide the people who voted. Does this mean we want a civil war like in the past?" Army Chief Gen. Apirat Kongsompong warned on April 2.


"I can't allow Thai people to fight in the streets and cause any unrest.  If this [fighting] goes so big, that they burn and they fight each other, we can declare a state of emergency."


Earlier he compared anti-army voters to "scum of the earth."


Gen. Apirat participated in Mr. Prayuth's coup and is the son of a former army supreme commander who led a 1991 putsch, adding to the army's dozen coups since 1932.


Critics say Mr. Prayuth has an unfair advantage when parliament chooses the next prime minister in May because the Senate is expected to support him.


Adding to those 250 votes, Mr. Prayuth needs only 126 House seats to achieve a 376 victory.


The opposition needs its 376 votes entirely from the House because they consider the Senate pro-Prayuth.


Dozens of candidates including Mr. Thanathorn may be disqualified during April for various reasons, making the final tallies unpredictable. 


Mr. Prayuth warned of bloodshed if voters did not choose his newly created party.


"Maintaining peace and order is the most important priority for Thailand now. If you do not want to see turmoil in our country again, vote for the Palang Pracharath party," he told a rally in March.


Mr. Prayuth's party scored a surprising 8.4 million votes in the election though he needs a coalition with smaller parties to stay in power.


Two main opposition parties split the anti-Prayuth vote. 


The Pheu Thai party nabbed 7.9 million and the Future Forward party scarfed up 6.2 million -- many of them young, first-time voters -- for a total topping 14 million.


Both parties then joined a coalition with smaller anti- Prayuth parties to challenge him.


Mr. Prayuth's government, seemingly wary of a popular vote, invented a complex, confusing "proportional representation system" of dual ballots for parties and individuals.


Critics suspect the junta will manipulate the awarding of House seats while combining votes from the two ballots -- allegations the regime denies.


The junta-appointed Election Commission's explanation of "ballots on one leg," "ballots standing on tiptoes," or "limping ballots," are concepts "which do not seem to make sense," said columnist Atiya Achakulwisut.


Counting the dual ballots for "constituency" and "party-list" candidates is byzantine.


"In this election, the votes cast for losing constituency candidates are used to calculate the number of party-lists seats for a party, rather than being thrown away under the old first-past-the-post [simple majority] system," the Bangkok Post explained.


"Under the new system, while candidates who win the most votes in each constituency automatically become members of parliament, parties who backed unsuccessful candidates under the constituency system still have the chance of seats in parliament under the party-list system."