BANGKOK (Reuters) - If Prayuth Chan-ocha's decision to stage Thailand's latest in a long list of coups was as impulsive as he suggests, then the stern-faced general has a Herculean task managing the fallout and deciding what happens next.
Seizing power in Thailand is one thing, running the country is another, and after overthrowing populist tycoon Thaksin Shinawatra's political juggernaut for a second time in eight years, the generals should be prepared for a backlash.
The military top brass appeared to have been chastened by the experience of 2010, when a crackdown on Thaksin's "red shirt" supporters ended in serious bloodshed. They had repeatedly said since that the army would stay out of politics.
Now, by detaining senior politicians, declaring martial law, shutting down partisan media and announcing curfews and bans on public gatherings, analysts say it has set the wheels in motion for a repressive crackdown to avert any new insurrection.
"It's a very dangerous situation. I can't see Thaksin's supporters responding peacefully or nonchalantly," said Andrew Walker, a 20-year Thailand expert and dean of the college of Asia Pacific studies at the Australia National University.
"We're looking at a prolonged effort to neutralise pro-Thaksin forces and any successful attempt to do that would be very oppressive indeed."
Thaksin himself was toppled by the army in 2006, after winning two landslide election victories with the support of the rural masses in the poorer north and northeast.
The red shirts formed after that, and they have since grown in number and are increasingly organised, defiant and militant in what they call a fight against a meddling military and a royalist establishment threatened by Thaksin's rise.
They have long promised to fight back against any intervention to remove their governments and could launch a challenge to a junta that risks spiralling out of control.
The army says it was forced to launch the coup to bring peace to Thailand. But the men with guns may have shot themselves in the foot.
"The coup in 2006 gave birth to the red shirts, so the military created a monster and it now has to deal with it," said Pavin Chachavalpongpun of the Center for Southeast Asian Studies at Kyoto University.
"This, sadly, will end with another round of conflict."
Most experts point to the irony of the generals intervening as a circuit-breaker in a polarising, often violent conflict, when they sided with a Bangkok oligarchy to topple Thaksin, a billionaire whose massive electoral popularity rattled Thailand's decades-old royalist status quo.
Despite a steady flow of televised announcements, the junta has offered only vague hints about its next move. Few believe the military was naive enough to stage a putsch without first having a strategy in place, or a plan B if talks between bickering political factions collapsed.
Prayuth has taken over the powers of prime minister, but it was not clear if he intended to hold on to the position.
One possibility is that he appoints himself interim prime minister, a strongman with a rescue remit to reform and stabilise a country many Thais feared was heading towards armed conflict and irreparable damage.
That's seen as unlikely, however, as Prayuth could be out of his depth handling a yawning social divide, an economy in poor shape and rival political factions with shadowy militant elements adept at carrying out bombings and drive-by shootings.
More palatable, according to analysts, is that the Senate - Thailand's only legislative arm functioning now - would appoint an interim prime minister to choose a cabinet, a process with a semblance of democracy that could soften the blow of the putsch.
"It will follow the usual coup template, but this time, with more repression," said Thitinan Pongsudhirak, a politics and regional security expert at Bangkok's Chulalongkorn University.
"They'll move to set up a government, maybe with support of the Senate, then begin to deal with damage control.
"Most challenging for the army will be domestic defiance, opposition and resistance and they will clamp down all over the country. We may see a level of repression not seen in a long time in Thailand."
On Friday, the junta looked to be moving to snuff out potential opposition, detaining former premier Yingluck Shinawatra, who had been among dozens of politicians and bureaucrats ordered to report to the military. It was not immediately clear how many others may have been detained.
Yingluck was forced from office by a court on May 7 for abuse of power and is accused by Bangkok's middle classes of entrenching brother Thaksin's legacy of cronyism and corruption.
The military has also banned Yingluck and 154 activists and political figures, mostly allies of the deposed government, from travelling overseas, from where Thaksin has exercised a strong influence over the red shirts and two elected governments.
Though the red shirts' response to the coup has been muted, they aren't expected to sit quietly. They've already started to defy protest bans in their north and northeast strongholds, where Thaksin's micro-loans, virtually free healthcare and generous subsidies since 2001 transformed Thai politics and won him the hearts and votes of millions.
It might be a while before they get a chance to vote their party back into power, and whoever gets to runs the country in the meantime could be in for a rough ride.
"Even if the next government is full of technocrats, they will all be part of an anti-Thaksin network that doesn't trust elections and won't be in a hurry to hold them soon and risk bringing another Thaksin proxy to power," Pavin added.
"It will still be a military regime, it will struggle to govern and could be ruthless depending on how Thaksin and his supporters respond."
(Editing by Alex Richardson)