BANGKOK, Thailand — Thailand's prime minister was forced out of office Tuesday after a court ruled that he had broken a conflict-of-interest law by hosting TV cooking shows.

Prime Minister Samak Sundaravej's supporters immediately vowed to bring him back to power, leaving Thailand in the deep political crisis that has virtually paralyzed the government, spooked the financial markets and scared away tourists.

Chat Chonlaworn, the head of the Constitutional Court, ruled that Samak's Cabinet must also leave office, but will stay on as a caretaker government until a new administration is installed.

"The defendant has violated Article 267 of the constitution, and his position as prime minister has ended," said Chat, the head of the nine-judge panel, explaining that the ruling meant Samak himself was immediately removed from office.

The senior deputy prime minister, Somchai Wongsawat, meanwhile assumes the prime minister's duties. He is the brother-in-law of former Prime Minister Thaksin Shinawatra. Parliament will meet Friday to vote on a new prime minister, and all parties can nominate candidates.

The People's Alliance for Democracy, which had been trying to force Samak's resignation by occupying the grounds of the prime minister's office, said it would stay put at least until the vote.

If Samak or anyone tied to his patron, former Prime Minister Thaksin Shinawatra, was chosen, the occupation will continue, alliance spokesman Suriyasai Katasila told The Associated Press.

Tuesday's court judgment, broadcast live on television and radio, was greeted with loud cheers and claps from Samak's opponents who have occupied his office compound since Aug. 26 to demand his resignation.

Samak, 73, a self-proclaimed foodie, hosted a popular television cooking show — "Tasting and Complaining" — for seven years before becoming prime minister. But he also made several appearances after taking office, breaking a constitutional prohibition on private employment while in office.

"His employment at the company can be considered an employment," said Chat. He said Samak gave "conflicting testimony" and that there was an attempt to fabricate evidence "to hide his actions."

Before the court began its session, Samak had said he would honor the verdict. He was not immediately available for comment.

Samak had claimed that he was not an employee of the company that made the show and only received payment for his transportation and the ingredients used for cooking.

The verdict provided a new twist to Thailand's political uncertainty that began in early 2006 when a group of royalists, urban residents and union activists, calling themselves the People's Alliance for Democracy, started demonstrating against Thaksin, accusing the then-prime minister of corruption.

The relentless demonstrations, led by media tycoon Sondhi Limthongkul and four others, led to a military coup that ousted Thaksin. The junta called elections in December 2007, which were won by a coalition of Samak's People's Power Party and five other parties.

It triggered a fresh round of demonstrations by the alliance, which accuses Samak of being a proxy for Thaksin, who has fled to Britain to avoid facing corruption charges.

Samak had refused to resign or call fresh elections, and many believed the court ruling could give him an opportunity to make a graceful exit without losing face.

Kuthep Saikrajang, the spokesman of Samak's party, said its members unanimously agreed to renominate Samak in Parliament as their candidate for the prime minister's post. But the final decision depends on Samak as well on other parties in the ruling coalition, he said.

Samak's renomination — and possible return — could enrage his opponents. Nor are they likely to be pleased that Deputy Prime Minister Somchai Wongsawat will serve as acting prime minister. He is Thaksin's brother-in-law.

Samak is also facing other legal problems — the Election Commission has recommended that his party be dissolved for vote fraud, and he faces a defamation suit and three possible corruption cases.

Analysts were doubtful if Tuesday's ruling would end Thailand's political deadlock.

"It adds more color to the ongoing conflict but is not significant enough to change anything. The confrontation will go on with no end in sight," said Chaiwat Kamchoo, a political science lecturer at Bangkok's Chulalongkorn University.


Associated Press writers Sutin Wannabovorn, Jocelyn Gecker and Vijay Joshi contributed to this report.