KEY POINTS:
The Thai Army hasn't the faintest idea what to do next. Sixteen months ago, after weeks of anti-Government demonstrations by opposition party supporters in Bangkok, the military overthrew the elected Government of billionaire Prime Minister Thaksin Shinawatra, accusing him and his wife of corruption.
They put in a former general as interim Prime Minister, promised a swift return to democracy, and set about rewriting the constitution to give themselves a bigger permanent role in politics. They also raised the military budget sharply, presumably as a reward to themselves for saving the country from Thaksin.
For a while, things went well. The coup was popular at first, at least in Bangkok. In May the military regime got the courts to order the dissolution of Thaksin's party, Thai Rak Thai, and to ban 110 of its senior officials from taking part in politics for five years.
But the economy stumbled, and Thai Rak Thai simply re-formed as the People Power Party (PPP). When the promised election to return the country to civilian rule was held last month, the PPP won.
It didn't get quite enough seats to rule alone, but it has now formed a coalition with five other parties that gives it a comfortable majority of about 315 members in the 480-seat Parliament. Thaksin's party is back in power, and he says that he will be back in Thailand by April (he has been living in self-imposed exile, claiming that he could not get a fair trial on the corruption charges while the military were still in power).
In the meantime, the PPP is being led by Samak Sundaravej, who openly says that he is Thaksin's proxy. Thaksin has said that he does not want to return to power, but the new Government will take his advice on a daily basis, and he could always change his mind.
All of which poses a problem for the soldiers who overthrew him in September, 2006. But what is going on in Thailand is not really a military-civilian power struggle.
It is a struggle between the city and the country. It was only Thaksin's great wealth that enabled him to rise so fast in politics, for he was not a member of the traditional political class.
The country's politics have long been dominated by a Bangkok-based elite that had close ties to the bureaucracy, the military and the monarchy. Political bosses in the provinces delivered the peasants' votes in return for cash and favours, but Thailand was governed by and for the urban middle class.
Thaksin, the great-grandson of a Chinese immigrant, came from the north of the country, and made his money in mobile phones. He was the ultimate outsider, and when he won the 2001 election, he really upset the insiders.
He started spending the Government's money on the villages where the majority of Thais still live: everything from a debt moratorium for farmers to micro-credit, better schools, and universal healthcare. During his five years in office the proportion of Thais living in poverty dropped by half, and health insurance even became available to the country's two million foreign workers.
But of course this meant diverting some money from the traditional concerns of the urban middle class.
The Thai economy grew strongly through all this, allowing Thaksin to pay off the country's debt to the International Monetary Fund two years early. He was always a populist and sometimes an outright demagogue.
He had a nasty authoritarian streak that came out in actions like his "war on drugs" that saw 2700 people killed in seven weeks (the police deny that they were operating death squads, but then they would, wouldn't they?) and his clumsy and brutal attempts to quell the insurgency in Thailand's three mostly Muslim southern provinces.
But he won the 2005 election with an even bigger landslide than 2001. Was he corrupt? Not by the very low standards of traditional Thai political practice, if only because he was too rich to need to steal.
Thailand's traditionally dismal rating on the corruption indexes maintained by various international organisations actually improved on his watch. But then in September 2006, to the great joy of the Bangkok middle class, he was overthrown by the Army.
Now that military intervention has been decisively rejected by the electorate, and the successor to the party that Thaksin created is coming back to power. The poor have spoken, and it will be difficult for the military to ignore what they have said. Real politics has reached Thailand at last.
What will happen next is a series of mini-crises, as the Army and the middle class struggle to come to terms with the fact that they have lost control of the country. It may even blow up into a major crisis and a new military intervention.
But it is much more likely to end up with a permanent change in the nature of Thai politics. The country is leaving the "Southeast Asian model" - military interventions, downtrodden peasantry, elite dominance - and moving towards the welfare-state style of democracy that prevails in most of the developed world. And a good thing too.
* Gwynne Dyer is a London-based independent journalist whose articles are published in 45 countries.