BANGKOK, Thailand (CNN) -- Former Thai Prime Minister Samak Sundaravej lost a second crucial legal battle Thursday, again over a television appearance.
Samak Sundaravej was removed from power on September 9, by Thailand's constitutional court.
An appeals court upheld a two-year jail sentence that Samak received after he was convicted in a libel case, the Thai News Agency (TNA) reported.
Samak had been convicted of defaming a former Bangkok deputy governor during a TV show in 2006.
A criminal court last year sentenced him to two years in jail, but the sentence had been on appeal until now.
On Thursday, the appeals court ruled it would not suspend the sentence.
The case stems from a televised talk show where Samak accused the deputy governor, Samart Ratchapholsit, of malfeasance in awarding city contracts.
A television appearance also caused Samak to lose his prime minister's position.
On September 9, a constitutional court removed Samak from power, ruling that he had violated the constitution by appearing as a paid guest on a TV cooking show.
A provision of the constitution bars ministers from working for private companies, the court ruled.
Following Thursday's ruling, Samak's lawyer said he would appeal the verdict to the Supreme Court, said TNA -- which is owned by a public corporation controlled by the government.
The former prime minister was released on 200,000 baht ($5,926). Because he is still a member of the parliament, he might avoid prison until the parliamentary session ends in November.
All About Thailand • Samak Sundaravej