Thailand's beleaguered prime minister appeared in court yesterday to defend his popular cooking show against accusations that his extra-curricular activities violated the constitution. Samak Sundaravej, the irascible rightwinger and gourmet, spent an hour in the witness box defending the television programme, Tasting, Grumbling, a mix of tips on traditional Thai cooking and rants on subjects of his choosing that could see him forced to resign.

He gave up the show in April, more than two months after becoming prime minister. However, if the constitutional court, which is due to deliver its decision today, finds that he did work for a private company while in office, the 73-year-old could be forced to stand down, just seven months after he took office at the head of a six-party coalition.

Samak's mounting woes come after he declared a state of emergency in Bangkok when clashes between government supporters and opponents left one man dead and dozens injured.

More than 5,000 anti-government demonstrators from the People's Alliance for Democracy have been camped in the grounds of his offices for nearly two weeks, accusing him of corruption and demanding his resignation. The protesters' constant diet of music and political speeches has prevented Samak and his ministers from entering their offices.

Samak hosted Tasting, Grumbling for a number of years before he became prime minister, though it was off air for some months after the government appointed by the leaders of the 2006 coup closed down the state broadcaster. The channel was resurrected when Samak took office and he made about half a dozen appearances on the show before stepping down. Senators accused him of breaching the constitution by working for a private company while in office and filed a petition.

In court, Samak defended his actions, saying he was not employed by the television company, but had received a small fee and the cost of his transportation to the studio. "I was hired to appear on the programme and got paid from time to time," he said. "I was not an employee of the company, so I did not violate the law. I presented the cooking show and got paid for my acting."

The managing director of the company that produced the programmes, Sakchai Khaewwaneesakul, testified that Samak was paid 80,000 baht (£1,250) for four shows. "The presenters of our show are not our employees," he said. "But we pay them honorariums."

Samak was indicted by an independent watchdog, the National Counter Corruption Commission, which forwarded the allegation to the constitutional court.

In the event that the court decides to disqualify Samak, it could defuse much of the political tension that has beset Thailand for months. "By making a quick decision, the court will help a lot in resolving the political crisis," said Suwat Apaiakdi, a lawyer for the senators who lodged the petition. "If the court rules that prime minister Samak is disqualified from holding office, then the political crisis could automatically cease."

The election commission ruled last week that Samak's People Power party had committed electoral fraud and should be disbanded, a case that is also expected to end up before the constitutional court.

Apart from the cooking show charge, Samak also has been accused of defamation by Bangkok's deputy governor, Samart Rajpholasit. A lower court sentenced Samak to three years in jail, and an appeals court is expected to rule on September 25 whether to uphold the sentence.