"Involvement of a high-ranking member of the royal family in politics, in whatever way, is an act that conflicts with the country's traditions, customs, and culture, and therefore considered extremely inappropriate", the King said in a statement. Ubolratana's candidature would have threatened the junta's prospects, given her popularity.
The princess's nomination by the opposition Thai Raksa Chart Party pitted her against current Prime Minister Prayuth Chan-ocha, the preferred candidate of the military, considered one of Thailand's most royalist institutions.
Thai Raksa Chart was created past year as part of a strategy to diversify the clan's political assets in case its main vehicle, the Puea Thai party, was dissolved by the junta that deposed the government Yingluck helmed from 2011 to 2014.
Princess Ubolratana's position within the Thai Royal Family doesn't preclude her from running for a political position, although to defy The King's wishes, after his strongly worded statement on Friday night, would place the country in an unprecedented constitutional conundrum. While it does not technically apply to Ubolratana, who lost her highest royal titles when she married an American more than four decades ago, its scope has been widened in recent years to nearly anything that sullies the royal institution, making criticism of the princess highly problematical.
"Who would dare criticise a royal prime minister?" said Puangthong Pawakapan, professor of political science at Chulalongkorn University.
The move has upended traditional thinking about Thai politics in some ways and compounds uncertainties around Thailand's upcoming elections and the country's political future.
It also potentially bridges the political divide between the "Red" shirted loyalists to Thaksin and the "Yellow" shirted royalist supporters, whose violent clashes have scarred Thailand's recent history.
But the opposition from Ms Ubolratana's younger brother, a constitutional monarch, is likely to lead to her disqualification by the Election Commission.
The party falls under the tutelage of Thaksin Shinawatra, a billionaire self-exiled former premier, who stands at the heart of Thailand's bitter decade-long political schism - loathed by the army and Bangkok elite, yet adored by the rural poor.
The coup Prayuth led unseated a Pheu Thai Party-led administration headed by Yingluck Shinawatra, Thaksin's sister.
A Thai princess will run for prime minister in March elections, in an unprecedented entry by a royal into frontline politics which pits her against the chief of the ruling junta, throwing into disarray his bid to stay in power.
"From my point of view, I think she understands Thai politics".
The Thai princess formally rescinded her royal titles in 1972, when she married American Peter Jensen, a fellow student at the Massachusetts Institute of Technology - her first break with royal protocol.
Commentators who on Friday assumed Ubolratana's bid had the blessing of her brother - the siblings are believed to be close - were at a loss for words following the king's rebuke.
Thai Raksa Chart responded swiftly, cancelling a campaign event Saturday and issuing a statement saying it "complies with the royal command". She studied mathematics and bio-chemistry at MIT and earned a master's degree in public health from the University of California at Los Angeles.
Since then, she has acted in films and thrown herself into charity work, including a foundation to fight youth drug abuse.
Who is Princess Ubolratana Mahidol?
Friday was the last day for parties to declare candidates.
Ms Ubolratana, the eldest child of King Bhumibol, was born in Lausanne in 1951. Ubolratana's win would certainly indicate a rising role for the monarchy in the country's politics as she would be the first royal to win the premiership since Thailand moved away from absolute monarchy.
Thailand has among the world's toughest lese-majeste laws, which make it illegal to defame, insult or threaten the king, queen, heir apparent or regent.