Thailand's Constitutional Court has ruled that Prime Minister Samak Sundaravej violated the constitution by hosting television cooking shows and must resign from office.
Today's ruling also means Mr Samak's cabinet must resign.
The ruling comes amid a deepening political crisis for Thailand.
Judge Chat Chonlaworn told the court that Mr Samak had "violated Article 267 of the constitution" and that "his position as prime minister has ended".
Thailand's constitution bars government ministers from private employment while in office.
Anti-government protesters have occupied the grounds of Mr Samak's office since 26 August, demanding his resignation.
Protesters had pledged to end their sit-in at Thailand's Government House if Mr Samak stepped down, but it was unclear if the court's ruling would satisfy them.
Mr Samak's party said later that it had unanimously agreed to renominate him as candidate for prime minister.
The party met immediately after the Constitutional Court ruled that Mr Samak must resign.
The decision is likely to inflame an ongoing political crisis.
Party spokesman Kuthep Saikrajang said that the party members agreed to nominate Mr Samak in Parliament as their candidate for prime minister.
He said that the party still needs the support of the ruling six-party coalition and Mr Samak himself.