The party backing ousted Thai Prime Minister Thaksin Shinawatra easily won the most seats in Sunday's election, a stunning rejection of the coup which booted out the telecoms billionaire in 2006.
With 93 percent of the vote counted, the People Power Party (PPP) was heading for 228 seats in the 480-member parliament and said it would form a coalition government, although analysts do not see a smooth transition in a still deeply divided country.
Abrasive PPP leader Samak Sundaravej said Thaksin had phoned from exile to congratulate him on the result, a major problem for the generals whose campaign to consign Thaksin to political oblivion via the coup and corruption charges now lies in tatters.
"It is a victory for this country," Samak told a news conference, adding that he would "certainly be prime minister". "This country lost its freedom on September 19 last year for no good reason," he said.
The big question is whether the army and the royalist establishment, whom the Thaksin camp says was the brains behind the bloodless putsch, will stand by and watch its arch-enemy make a comeback by proxy.
One senior PPP figure has suggested Thaksin be invited back on February 14 - St. Valentine's Day. Although some analysts said a strong PPP showing could trigger another coup, others believe the army-appointed government is more likely to try first to stymie the PPP by disqualifying candidates for vote fraud.
The bigger the PPP win, the harder that will be. "It depends how many red cards they have to issue," said Kevin Hewison, a Thai expert at the University of North Carolina at Chapel Hill. "If it's 40 or 50, it may be difficult, but if it's only 10 or 20, they might be able to do it."
The Election Commission said it had received more than 750 complaints, but was taking only 157 of them seriously. It was not clear how many of these could lead to disqualifications.
ARMY DISQUIET?
Samak said he did not foresee another coup since new army chief Anupong Paochinda was a "good guy" committed to keeping out of politics.
But the military would prefer a government led by the Democrats, the main opposition during Thaksin's five years in power, even though most analysts say such a coalition would be weak and unlikely to last beyond a year.
The Democrats, led by Oxford-educated Abhisit Vejjajiva - the man foreign investors want to see as the next prime minister - looked set to take 166 seats and conceded that PPP should be first to try to form a government.
Financial markets hope the return of an elected administration will signal the end of a period of disappointing economic growth, likely to fall from 5.1 percent in 2006 towards four percent this year, the lowest rate in six years.
PPP has said it would lift the capital controls imposed a year ago to rein in the rapidly strengthening baht.
At polling stations across Bangkok, voters said they were tired of more than two years of political confrontation between Thaksin and Thailand's old elite, who considered the provincial, ethnic Chinese businessman a nouveau riche upstart. "It doesn't really matter which party gets in just as long as we have a government as soon as possible," said Anunt, 60.
The anti-Thaksin camp, which staged months of street protests in Bangkok before the coup, had vowed to renew its campaign if PPP got anywhere near power.
But it said on Sunday it respected the vote and would resume its campaign only if PPP tried to get corruption charges against Thaksin dropped.
Last year's coup was the 18th in 75 years of on-off democracy in Thailand and Sunday's vote underscored the deep political divisions between the capital and the rural masses who were the primary beneficiaries of Thaksin's populist largesse. His Thai Rak Thai party has since been dissolved and he and 110 party members barred from politics for five years.