Samak Sundaravej, Thailand's prime minister, has been found to have broken the Thai constitution by hosting a cooking show - seen as moonlighting while in public office.
Samak and his entire cabinet must resign over the scandal, Thailand's constitutional court said on Tuesday.
Chat Chonlaworn, head of the nine-judge court, said that Samak had "violated Article 267 of the constitution" and that "his position as prime minister has ended".
Thailand's constitution bans government ministers from private employment while in office.
The court said the cabinet will remain in a caretaker position until a new administration is installed.
The forced resignation does not, however, ban Samak from standing as prime minister again and his ruling People Power party (PPP) has vowed to re-elect him.
"I insist that our party leader will be the prime minister," Wittaya Buranasiri, chief government whip for the PPP, said shortly after the verdict.
Samak had hosted a popular TV cooking show called Tasting and Complaining before becoming prime minister seven months ago.
He made a few appearances on the show - a mix of cooking and rants on various topics - after taking office, prompting a group of senators to petition the court on grounds that a prime minister was not allowed under the constitution to work with private companies.
The case is the latest embarrassment for Samak, who has not been able to enter his office at Government House in the capital, Bangkok, since anti-government protesters stormed the compound two weeks ago.
|Despite celebrations, PAD supporters vowed to remain at the protest site [AFP]
Supporters of the People's Alliance for Democracy (PAD) continued their sit-in on Tuesday, breaking into cheers upon hearing the court's ruling.
Prapanth Koonmi, a PAD leader, announced: "We will continue the protest.
"The prime minister has stepped down but there's still the cabinet. I'm not sure the cabinet will listen to the law."
Around 5,000 demonstrators remain on the government office grounds.
They accuse Samak as acting as a proxy for Thaksin Shinawatra, a former prime minister ousted in a 2006 military coup after large demonstrations by the same group of activists.