General Prayut Chan-o-cha was elected as prime minister in a Parliamentary vote late on Wednesday night after more than 12.5 hours of intense debate. Prayut returned as PM for a second term after a five-year term since the 2014 coup, beating his opponent Thanathorn Juangroongruangkit with 500 to 244 votes with three abstentions.

His victory came due to support from nearly 20 political parties and the 250-member Senate. Thanathorn did not vote because he has been suspended from his MP duties, and neither did former Democrat party leader Abhisit Vejjajiva, who gave up his party-list MP seat on Wednesday morning. The general is Thailand’s 29th prime minister.