Prime Minister Banharn Silpa-archa won the vote, but lost office.
Facing a censure vote in parliament Saturday after three days of bruising allegations of corruption, lying and ineptitude, Banharn won the support of his coalition partners only on condition he announce his resignation first.Eyes downcast, Banharn pledged at a packed news conference to step down within a week and turn over power to a member of the six-party coalition.
Minutes later, Banharn's former allies backed him in the confidence vote. He won, 207 votes to 182 and received a formal round of applause, but his career lay in ruins.
The bizarre exercise was aimed at saving face and avoiding the dissolution of parliament, which would have brought fresh elections that the coalition wasn't certain to win.
Banharn, 64, or members of his government had been accused of accepting bribes, looting a bank, firing corruption fighters, engaging in land scams and illegal logging, intimidating the press and blocking political reform.
No criminal charges have been filed, although some Cabinet ministers are being investigated.
Opposition figures have called Banharn's 14-month premiership one of the most corrupt in Thai history, yet reaction to his resignation was muted.
"There hasn't been any change yet. The (coalition) government still holds power," said Chuan Leekpai, the leader of the chief opposition party, the Democrats, who was toppled as prime minister last year over a land scandal.
Thailand has emerged in recent years as an economic powerhouse in Southeast Asia, and the political crisis is viewed as a symptom of the government's inability to keep up with the supercharged growth.
Thais accustomed to hearing about their country's economic success became alarmed at news of sagging exports, the downgrading of the country's credit rating and the worst stock market showing in three years.
After three days of parliamentary debate followed by millions on live television and radio, betting on the outcome was rife in this gambling-crazed nation.
"I'm tired," Banharn said in announcing his resignation. "I've done the best I could do in my job."
His daughter, Kanchana, a legislator accused of using family connections to reap windfall profits from a land sale, broke into tears when her father uttered the word "resign."
Had Banharn lost the confidence vote, new elections could have created a Democrat-led government bent on prosecuting him.
The Democrats called for Ban-harn's arrest during the debate.