Thailand's King Vajiralongkorn has denounced as "inappropriate" his sister's unprecedented bid to run for prime minister in March's election.
In a palace statement, he said such an act would "defy the nation's culture".
Princess Ubolratana Mahidol, 67, has been nominated as a candidate for a party allied to divisive former PM Thaksin Shinawatra.
Such a move would break with the tradition of the Thai royal family publicly staying out of politics.
Analysts say the king's intervention is likely to lead to the election commission disqualifying her from the 24 March election.
The vote is being closely watched as the first chance for Thailand to return to democracy after five years under military rule.
In a palace statement broadcast on all Thai TV networks, the king said: "Even though she has relinquished her royal titles in writing, she maintained her status and carried herself as a member of the Chakri dynasty.
"Involvement of a high-ranking member of the royal family in politics, in whatever way, is considered an act that defies the nation's traditions, customs and culture, and therefore is considered extremely inappropriate."
The statement cited a passage of the constitution that says the monarchy should maintain political neutrality.
#Thailand #King in statement says "Having a high-ranking member of the royal family involve in politics, regardless in what way, is going against the royal tradition...and highly inappropriate" according unofficial translation from local #Thai media. Statement screened on TV pic.twitter.com/Yz6FkjHfEt— May Wong (@MayWongCNA) February 8, 2019
Hours earlier, Princess Ubolratana defended her decision to run for office.
In an Instagram post, she reiterated that she had relinquished all her royal titles and now lived as a commoner.
She said she wanted to exercise her rights as an ordinary citizen by offering her candidacy for prime minister. She said she would work with all sincerity and determination for the prosperity of all Thais.
A miscalculation by military's opponents?
Analysis by Jonathan Head, BBC News Bangkok
The entry of flamboyant Princess Ubolratana's into the political fray threatened to upend an election in which the military government has stacked the odds in its own favour through a new constitution and electoral system.
Now King Vajiralongkorn has issued an unusually strong statement censuring the nomination of his sister.
The decision to nominate the princess now looks like a grave miscalculation.
It will weaken the pro-Shinawatra faction seeking to push the military out of politics, which until now seemed likely to win the largest share of seats in the new parliament. It also underlines the power and influence of the new king, whose word on matters of state that he believes concern him is always final.
Who is Princess Ubolratana Mahidol?
Born in 1951, Princess Ubolratana Rajakanya Sirivadhana Barnavadi is the oldest child of Thailand's beloved late King Bhumibol Adulyadej. He died in 2016.
She attended the Massachusetts Institute of Technology and after marrying an American in 1972 she gave up her royal title. After her divorce she returned to Thailand in 2001 and once again started participating in royal life.
The princess engages actively in social media and has also starred in several Thai movies.
She has three children, one of whom died in the 2004 Asian tsunami. The other two now also live in Thailand.
The princess has registered for the Thai Raksa Chart party, which is closely linked to Mr Thaksin.
Why is the election important?
It will be the first vote since current Prime Minister Prayuth Chan-ocha took power in 2014, overthrowing the democratic government and ousting ex-PM Yingluck Shinawatra, the younger sister of Mr Thaksin.
Both Mr Thaksin and his sister live in self-imposed exile but remain a powerful force in Thai politics, with many in the country remaining loyal to them.
In 2016, Thais voted to approve a new constitution created by the country's military leaders, which was designed to perpetuate military influence and block Mr Thaksin's allies from winning another election.
But the princess aligning herself with a party allied with Mr Thaksin threatens those plans, correspondents say.
A former general, Mr Prayuth also announced on Friday that he would be running for prime minister in the forthcoming election as a candidate for the pro-military Palang Pracharat party.
Thailand has some of the world's toughest royal defamation "lese-majeste" laws but technically the princess is not covered by them.
However, the royal family is revered in Thailand and rarely criticised, so there are questions around whether any other candidate would want to challenge a member of the royal family.