The good news is that a coup-prone country is unlikely to experience yet another military takeover in the immediate future. The bad news is that the Thai army should no longer need such tactics. The junta laundered its power into a supposed democratic mandate this spring, through an electoral system rigged to ensure it would prevail, and a new constitution. Prayuth Chan-ocha, the 2014 coup leader, is the elected prime minister.

Still, you can never be too careful. Despite all its advantages, the military needed weeks to secure its unwieldy 19-party coalition; there is already friction. And far from reconciling Thais, as the junta once promised, the election has sharpened divisions.

For two decades the country has been defined by the faultline between the “yellowshirts” of the royalists, military and urban elites, and the poorer and more rural “redshirts”, especially in the north and north-east, aligned with the former prime minister Thaksin Shinawatra; he or affiliates have won every election since 2001, and been ousted each time.

This time his proxy Pheu Thai party won most seats, but not enough to form a government, and swung behind the prime ministerial bid of Thanathorn Juangroongruangkit. His pro-democracy Future Forward party did unexpectedly well, particularly among young, educated urban people. That suggested a potential realignment bound to unnerve those in power. In the wake of the election, the vitriol directed at the military’s critics has been shriller than ever, and opposition activists have endured a spate of violent attacks. Six exiled anti-military activists in neighbouring Laos have vanished since December. Last month two members of Thailand’s human rights commission – once regarded as a regional model, but enfeebled by the junta – quit, saying they could no longer perform their duties independently. And opposition politicians face a battery of legal cases.

Future Forward faces 23 legal cases and complaints, six of which (including a sedition claim) relate directly to its leaders, an auto parts tycoon. On 1 October the attorney general is expected to issue a prosecution order under the computer crimes act, over a speech criticising the junta which the politician posted on Facebook. He is already suspended from parliament for alleged illegal holding of media shares when he became a candidate (he says he had already transferred them); that could become a permanent ban when the case comes to court next month.

The prime minister and cabinet faced their own challenge, for omitting the promise to uphold the constitution from the oath of office when they were sworn in. But no one was surprised when the constitutional court rejected a complaint last week; the king had issued a statement of support for the government, and the monarchy is an untouchable institution, which is entrenching its power.

Some wonder if the prime minister’s downfall could ultimately come from his former colleagues. The priority now for democratic governments is to make it clear to Thailand’s government that they are watching the cases against political opponents closely, that slowing growth is not unrelated to the political situation, and that intimidation cannot paper over the country’s growing cracks for ever.