BANGKOK, Aug 17 (Reuters) - Thailand's Pheu Thai Party on Thursday (Aug 17) gained support from a rival military-backed party, potentially boosting it in its bid to form a government ahead of a prime ministerial vote in parliament next week.

The United Thai Nation Party or UTN, the party that fielded former coup leader Prayut Chan-o-cha as its prime ministerial candidate in the May election, said on Thursday that it will help Pheu Thai form a government.

Prayut, who is currently caretaker prime minister, first came to power in a coup against a Pheu Thai-led government in 2014.

"United Thai Party will join the government with Pheu Thai," UTN spokesman Akaradej Wongpitakroj told reporters on Thursday.

"We agree to join in order to move the country forward together," he said.

Thailand has spent more than five months under a caretaker government after the leader of the election-winning Move Forward party was blocked twice by conservative and pro-army opponents in his bid to become premier.

Move Forward's former ally, the second-placed Pheu Thai party, earlier this month took over efforts to form a government.

Previous Pheu Thai governments, backed by the billionaire Shinawatra family, were ousted by military coups in 2006 and 2014 when the party's interests clashed with the country's powerful old-money elites and royalist military.

Pheu Thai is set to nominate real estate tycoon Srettha Thavisin for premier in a vote scheduled for next Tuesday and needs the support of more than half the bicameral legislature - including the military-appointed Senate.

The party has managed to gather the support of 13 other political parties but it will need some support from the unelected Senate.