By Kate McGeown
BBC News, Bangkok
Thailand has been in political limbo for months, but the events of Tuesday night still caught everyone off guard.
So far the coup has been peaceful
"What happened last night took me by surprise," admitted Giles Ungpakorn, a political commentator at Bangkok's Chulalongkorn University. "There had been rumours, yes, but there had been rumours about many things recently."
There is no doubt, though, that something needed to be done.
Since a general election in April was annulled as undemocratic, Thailand has been run by a caretaker administration, and has been struggling to get back to normal.
As time ticked by, Thaksin Shinawatra's position as prime minister was increasingly being questioned.
In fact, just last week army chief General Sonthi Boonyaratglin said in a statement that the military would not stage a coup.
But a week is a very long time in current Thai politics, and it was General Sonthi himself who led the move to oust the prime minister on Tuesday evening.
Although details are still sketchy, it is now apparent that the military has split into two factions, one loyal to Mr Sonthi and the other loyal to Mr Thaksin.
Without a single shot being fired, Mr Sonthi's side triumphed, taking over Government House and national broadcasting networks in a well-organised operation, and accusing Mr Thaksin of causing an "unprecedented rift in society".
The coup leaders also said Mr Thaksin had harmed the dignity of Thailand's highly revered king, which many in the military would have seen as tantamount to treason.
According to Pasuk Pongpaijitr, the author of several books on Thai politics, the pro-Thaksin soldiers are now keeping a low profile.
"They were resisting at first," she said, "but they are being quiet at the moment, as people close to Thaksin are being arrested."
Analysts will now be watching very closely to see if, and how, these pro-Thaksin groups decide to respond.
The people of Bangkok largely seem to have welcomed the night's developments. Some are even going onto the streets to bring presents to the soldiers and take their photographs.
"To many people here, it's a breath of fresh air. They hated Thaksin," said Dr Pasuk.
But she said the military coup was a worrying development in a country which had prided itself on being one of the most democratic in South East Asia.
"The problems over Thaksin had to be addressed, but I don't like the way it happened. It took a lot of time and effort to make the last constitution, and that's just been thrown in the wastepaper bin," she said.
"If the prime minister has done something wrong, I'd rather see him tried legally in the courts than be overthrown like this."
Many people in rural Thailand are also likely to be frustrated by the turn of events. Mr Thaksin is popular among poorer farming communities, for initiatives such as a low-cost health scheme and rural loans.
"I think these people will be wondering what the coup leaders will do about Thaksin's policies. The new government will have to give them answers on that soon," said Mr Ungpakorn.
According to local media professional Kittipong Soonprasert, pro-Thaksin political leaders in rural areas are likely to be assessing their options over the next few days.
"They need time to decide what to do - and they know they're being watched," he said.
"Martial law is in place, so I think that although they might well want to take a stand, I don't think it will be now," he said.
The question of whether there is a backlash from the rural poor - or indeed from senior aides close to Mr Thaksin - is just one of many issues which are still far from clear.
The long-term intentions of the coup leaders also seem uncertain.
Many analysts are drawing parallels with the last military coup in 1991, when General Suchinda Kraprayoon toppled a civilian government in a bloodless takeover, putting the military back in power.
General Sonthi has promised to restore democracy as soon as possible, but Giles Unprakorn has his doubts.
"People are claiming Sonthi is a reformist, but in reality he is similar to Suchinda," he said.
According to Dr Pasuk, though, the situation is different this time.
"In 1991, the military wanted to come back to power and replace the elected government. There will be huge pressure to stop them doing that this time round," she said.
Ultimately, the outcome may well be decided by the actions of King Bhumibol Adulyadej.
So far the palace has not commented on this crisis, but in the past the king's interventions have immediately calmed the situation, such is his influence throughout the country.
In the meantime there is little the Thai people can do but wait and see how this drama unfolds.
The coup leaders have declared Wednesday a public holiday in Thailand, closing schools, banks and government offices.
Usually, public holidays are a time for celebration. But right now there is just a palpable sense of unease, as Thai people try to digest what has happened in the last 24 hours, and speculate on what happens next.