Thailand's new Parliament voted yesterday to give a fresh term to Prime Minister Prayut Chan-o-cha, three months after landmark elections.
In the joint sitting of the elected 500-seat House of Representatives and appointed 250-seat Senate, Mr Prayut trumped rival prime ministerial nominee Thanathorn Juangroongruangkit by 500 votes to 244.
Prior to the decision, rival politicians sparred in a marathon debate not seen in the past five years under military rule. The 11-hour session, as well as the open vote after that, was broadcast live on television.
Mr Prayut, 65, a former army chief who has helmed the ruling junta since staging a coup in 2014, was nominated by Palang Pracharath Party.
Prior to the vote, the party had spent weeks cobbling together a 19-party coalition with a slim Lower House majority of 254 seats. The party managed to cross the threshold only because of the last-minute addition of the 53-seat Democrat Party on Tuesday.
Democrat veteran Chuan Leekpai oversaw proceedings yesterday as Lower House Speaker.
The losing prime minister nominee, Mr Thanathorn, heads the youthful Future Forward Party which bagged the third-largest share of seats during the election.
He was nominated by a seven-party anti-junta front despite being suspended from parliamentary proceedings by the Constitutional Court, which is scrutinising him for an alleged election infringement.
Politicians from the former ruling Pheu Thai Party, which won 136 Lower House seats in the election - the highest number - threw their weight behind Mr Thanathorn.
Mr Prayut was also absent in Parliament by virtue of not being a legislator.
Earlier yesterday, members of the anti-junta coalition argued unsuccessfully for the two prime ministerial candidates to be present to lay out their visions for the kingdom.
Mr Thanathorn told reporters outside Parliament: "Coups just push the country to a dead end. We need a Parliament that represents the people, not support those who want to cling on to power."
Mr Prayut's supporters rose to his defence.
Palang Pracharath MP Korranit Ngamsukonratana said: "He came to the rescue when we were facing difficulties… and he did well where other leaders failed."
The deck was stacked in Mr Prayut's favour.
The new Constitution drafted under military watch allows someone who did not run in an election to be the prime minister. The junta-appointed Senate, packed with military or police officers, also assured Mr Prayut of backing from at least one-third of Parliament.
Supporters of the royalist military faction argue that Mr Prayut's premiership will give the riven kingdom much-needed stability. His opponents say that it merely prolongs military rule under the guise of democracy.