Photo/Illutration United Thai Nation Party spokesperson Akaradej Wongpitakroj talks to reporters during a press conference at the United Thai Nation Party Headquarters in Bangkok on Aug. 17. (AP Photo)

BANGKOK--A pro-military party affiliated with outgoing Prime Minister Prayuth Chan-ocha said Thursday it has agreed to join a coalition led by the populist Pheu Thai party in an attempt to form Thailand’s next government after a three-month stalemate.

Founded in 2021, Ruam Thai Sang Chart, or the United Thai Nation Party, was seen as a vehicle for Prayuth’s pursuit of another term in office after an apparent fallout between him and Deputy Prime Minister Prawit Wongsuwan, the leader of the Palang Pracharath Party which helped Prayuth take office after a 2019 general election.

Prayuth first seized power as army chief in a 2014 military coup and then became prime minister in a military government. He did not run in the 2019 election but was the prime ministerial candidate of Palang Pracharath. The party was able to put together a post-election coalition that named him prime minister.

Prayuth officially joined United Thai Nation just months before May’s election. After the party’s disappointing performance in the polls, finishing fifth with only 36 seats, Prayuth announced that he had resigned from the party and would leave politics. He remains caretaker prime minister as Thailand has struggled for more than three months to install a new government.

The progressive Move Forward Party was the surprise winner of the May election, but its leader, Pita Limjaroenrat, failed to secure a majority of votes from the elected House and the conservative appointed Senate, chosen by the Prayuth-led military government, needed to become prime minister. Many senators voted against Pita because of his party’s call for reform of a law that makes it illegal to defame Thailand’s royal family. Critics say the law, which carries a penalty of up to 15 years in prison, has been abused as a political weapon. Members of the Senate, like the army, see themselves as guardians of traditional conservative royalist values.

The runner-up party, Pheu Thai, then took over the lead in forming a government and excluded Move Forward, saying its call for a reform of the royal defamation law made it impossible to gather enough support from other parties and the Senate to approve a new prime minister. Both houses of Parliament vote together for the prime minister under the military-implemented constitution.

United Thai Nation spokesperson Akaradej Wongpitakroj said Thursday that it has agreed to join the Pheu Thai-led coalition to break the impasse and “move the country forward.” He said the party’s condition of joining the coalition is that there must not be a party with a policy to amend the royal defamation law in the government.

He added that his party will support Pheu Thai’s prime ministerial candidate. Pheu Thai plans to nominate real estate tycoon Srettha Thavisin in a parliamentary vote expected on Tuesday.

Before United Thai Nation’s announcement, Pheu Thai had cobbled together a coalition of 11 parties with 240 seats in the 500-member House of Representatives. The 36 additional seats from the military-backed party would give it the House majority it needs. However, it still needs some support from the unelected Senate. Move Forward has said it will not support a candidate from a Pheu Thai-led coalition that includes parties from the outgoing military-backed government.

Palang Pracharath, another military-backed party, has said it is willing to support a Pheu Thai candidate even though it has not been invited to the coalition. The party finished fourth in the polls and holds 40 seats in the House.

Pheu Thai is the latest in a string of parties affiliated with ex-Prime Minister Thaksin Shinawatra, a billionaire populist who was ousted in a 2006 military coup. While Thaksin-backed parties thrived at the polls, none of his successors was able to stay in office for long due to legal challenges in the courts, which are firmly aligned with the conservative establishment that has long held a sharp animosity toward Thaksin, and destabilizing street protests engineered by his foes. A Pheu Thai government led by Thaksin’s sister, Yingluck Shinawatra, was toppled by Prayuth in the 2014 coup.

Thaksin has said he plans to return to Thailand soon following years of self-imposed exile to escape a prison term in several criminal cases which he has decried as politically motivated.

There was no immediate statement from Pheu Thai regarding United Thai Nation’s decision to join its coalition, but its deputy leader, Phumtham Wechayachai, said earlier Thursday that the two parties have held talks about forming a government.