Thai Princess Ubolratana's unprecedented attempt to become the country's next prime minister was abruptly nixed Saturday after her party agreed to comply with a command from the king opposing the plan.

The party's announcement effectively blocking Ubolratana's candidacy came after an extraordinary rebuke by her brother King Maha Vajiralongkorn, and removes a hurdle for the ruling junta to hold onto power after the March 24 vote -- the first since a 2014 coup.

The Thai Raksa Chart party, affiliated with the powerful Shinawatra political clan, had announced the princess as their candidate Friday morning.

The move rattled the status quo and threatened the ambitions of the generals who have controlled Thailand since they toppled the administration of Yingluck Shinawatra almost five years ago. Her brother Thaksin was ousted as premier in a 2006 coup.

But the Thai king torpedoed his sister's bid in a sharply worded statement the same day that said bringing senior royal family members into politics was against tradition and "highly inappropriate".

Thai Raksa Chart responded swiftly, cancelling a campaign event Saturday and issuing a statement saying it "complies with the royal command".

"Chin up and keep moving forward! We learn from past experiences but live for today and the future," Thaksin Shinawatra wrote on Twitter late Saturday.

Thailand has some of the most severe lese majeste laws in the world and the king's word is seldom challenged.

Royalist Thais and celebrities praised the intervention on social media after the order, writing "long live the king".

Others expressed unhappiness with Thai Raksa Chart.

An activist who called himself Champ 1984 said he was "disappointed" with the idea of a pro-democracy party enlisting a royal family member and would now vote for a different party.

- 'Very firm' -

Analysts say the events of the past day will help the military to consolidate power and tilt the odds in favour of junta chief Prayut Chan-O-Cha.

Prayut is standing as premier for the Phalang Pracharat party, a group aligned with the regime.

The military has "gained the upper hand", said professor Anusorn Unno from Thammasat University, adding that it is poised to perform well in the vote.

Even before Thai Raksa Chart's reversal, many warned the palace statement had ended the princess' chances.

"The palace disapproval invalidates her candidacy," said Puangthong Pawakapan, professor of political science at Chulalongkorn University.

An Election Commission official said it is reviewing all candidate applications and will finish the process this week, though few expect it to divert from the royal order.

Historian Chris Baker said that while he could not predict what would happen next, the language in the palace statement was strong and "very firm".

Thailand is a constitutional monarchy and has not had a royal run for frontline office since 1932.

The 67-year-old princess has yet to address the rebuke head on.

She thanked supporters Saturday on her widely followed Instagram account, saying vaguely that she wanted Thailand to "move forward".

The king did not criticise the princess directly and seemed to focus blame on the politicians who brought her on board.

Both Yingluck and Thaksin live in self-exile to avoid charges which they say are politically motivated.

Observers had said Thaksin and the party would not have teamed up with the princess without royal approval.

But the bold play appears to have backfired dramatically on Thaksin.

"After last night the king's intervention had an effect of discrediting Thaksin," Anusorn said.

Ubolratana is the first-born of former king Bhumibol Adulyadej.

She gave up her royal titles when she married an American in 1972, but they divorced and she moved back to Thailand.

Ubolratana is an unusually public figure for a royal, having starred in movies and maintaining an active social media footprint.

While she said she was exercising her rights as a commoner to stand for prime minister, the statement from the palace said she is she is "still a member of the House of Chakri", referring to the name of the dynasty.