BANGKOK -- In the span of a day, the outlook for Thailand's election next month has been thrown into disarray by two moves from the royal family, continuing a pattern of unpredictable politics that confronts multinationals investing in the country.

First a princess of the royal family made a stunning entry into politics, only to be rebuked by her brother the king.

The brief statement from King Vajiralongkorn Bodindradebayavarangkun on Friday night took the country by surprise, just as Princess Ubolratana had hours earlier when she was named as the prime minister candidate for a party opposed to the ruling military junta.

The twin developments come as the country stands poised to return to democracy from nearly five years of military rule.

If the princess's attempt to enter electoral politics marks a clear break from tradition, then her brother's rebuke hours later appears to be an attempt to reassert the long-standing rule that the Thai monarchy must remain above politics.

"This morning's announcement upended the political arena, but the slapdown tonight has sent everyone spinning," a Western diplomat told the Nikkei Asian Review, summing up the day's developments ahead of elections set for March 24.

Princess Ubolratana is new to politics but is a longtime friend of former Prime Minister Thaksin Shinawatra. © Reuters

The future of the anti-junta Thai Raksa Chart party, which nominated Princess Ubolratana as its candidate for premier, is now in doubt. Its leaders have declined requests for comment about the king's statement.

This has left observers scratching their heads. "It is simply crazy," said one following the king's late-night announcement, which came as patrons in Bangkok's bars and restaurants were still digesting the morning's news that the princess was making a move that could reshape the relationship between the palace and the political world.

Observers of Thai politics called Princess Ubolratana's run a game-changer that threatens to neutralize the junta's advantage heading into the election.

By naming the princess as its candidate, Thai Raksa Chart appears to want to deny the junta the palace as a source of legitimacy. The move was seen as a sign of the enduring power of exiled former Prime Minister Thaksin Shinawatra, to whom Thai Raksa Chart is loyal.

"It certainly rattled the junta because her candidacy was being perceived as dissatisfaction by the king with junta rule," said Paul Chambers, an expert on Thai national security at Naresuan University in the north of the country. Chambers said the Wongthewan, or the King's Guard, an influential military faction, is "very supportive of her."

The Bangkok-based King's Guard has a rich military pedigree, and King Vajiralongkorn himself served in this elite unit when he was the crown prince.

Many forecasters had given the edge in the election to the newly formed pro-junta Palang Pracharat Party, which on Friday named incumbent Prime Minister Prayuth Chan-ocha as its candidate.

Five times the National Council for Peace and Order -- the junta's official name -- delayed the election in what critics saw as an attempt to improve the military government's odds of securing a favorable outcome. Based on the regime's record to date, the PPP was expected to benefit from the military's influence.

By one estimate, the junta's Internal Security Operations Command has close to 500,000 operatives, including tens of thousands of informers pervading the general public. They are expected to monitor and sideline resistance, while pushing rural voters -- the country's largest constituency -- to support Prayuth.

But with Princess Ubolratana's arrival on the political scene, one diplomatic source expected that "this advantage has gone and the military will have to be neutral during the elections."

Thai Prime Minister Prayuth Chan-Ocha, who led the 2014 coup, had been counting on the military to pave a path to election victory. © Reuters

Many observers read the political earthquake as stemming from the king's recent push to assert more control over the armed forces, including having a greater say over annual promotions and troop reassignments.

Other analysts say the princess's presence in the vanguard of the pro-democracy camp is telling. They see the generals as out of touch with a palace that has increasingly tried to keep them at arm's length.

"It appeared that the king has tried to distance himself from the NCPO, because the political landscape is changing," said Kan Yuenyong, executive director of the Siam Intelligence Unit, a Bangkok-based think tank.

That view is shared by other observers, given the setbacks for Prayuth and his generals, who have been caught off guard by the palace before. Examples include the new monarch's decision to delay his formal succession to the throne after the death of his father in 2016; changes he requested to the country's 20th constitution in early 2017; and his announcement last month of the dates of his coronation, which shredded the junta's elections schedule.

The junta, nevertheless, had soldiered on with its more pressing agenda of eradicating the influence of Thaksin, patriarch of Thailand's most popular political clan. The regime's intentions were obvious in the constitution drafted by its allies and the new election laws, which were all engineered to reduce the likelihood of the pro-Thaksin Pheu Thai Party winning.

But Thaksin, whose supporters have won every election the military has permitted since 2001, had a trick up his sleeve. The party that nominated the princess, a newcomer to politics, is one of several allied with him in this year's race.

Thaksin demonstrated his knack for surprise in 2011, when he named his youngest sister, Yingluck Shinawatra, as the prime ministerial candidate for Pheu Thai. Like Princess Ubolratana, Yingluck was new to politics, but she became the country's first female premier. Her elected government was deposed in the 2014 coup led by Prayuth, then the army chief.

Thaksin had his own elected government overthrown by the military in 2006. He lives in exile as a fugitive after courts found him guilty for corruption. Yingluck has followed in his footsteps, fleeing the country to avoid a verdict in another corruption case.

Little wonder that Thaksin's political stock looked set to rise again after his gambit with the princess, a longtime friend. "It was pure genius by Thaksin to upend the junta's plans," a political insider remarked.

But the king's intervention suggests that Thaksin had overreached. "The royalists are overjoyed," said a diplomat.