A Thai court on Thursday dismissed charges of murder and abuse of power against former prime minister Abhisit Vejjajiva and his ex-deputy over a bloody crackdown on opposition protests in 2010.
Scores of demonstrators died under Abhisit's establishment-backed government in street clashes between mostly unarmed "Red Shirt" demonstrators and security forces firing live rounds in Bangkok.
A criminal court in the capital ruled that it did not have jurisdiction to hear the case because Abhisit and his then-deputy Suthep Thaugsuban were holders of public office at the time and acting under an emergency decree.
It said the only court with the authority to consider the allegations was the Supreme Court's Criminal Division for Holders of Political Positions.
"So the criminal court decided today to dismiss the two charges," a judge said.
The surprise ruling comes three months after the military seized power from Abhisit's political rivals in a bloodless coup.
Army chief General Prayut Chan-O-Cha, who was last week picked as prime minister of the Southeast Asian nation by a junta-appointed legislature, is often described as the architect of the 2010 crackdown.
Prosecutors had accused Abhisit and Suthep of issuing orders that resulted in murder and attempted murder by the security forces.
Both suspects denied the charges.
Chokchai Angkaew, a lawyer for the plaintiffs, said they planned to appeal against the dismissal, adding: "It's not over."
The country's National Anti-Corruption Commission is now expected to consider whether the pair abused their power with the crackdown.
If it believes there is sufficient grounds, the panel can forward the case to the Supreme Court's Criminal Division for Holders of Political Positions.
Suthep, who went on to lead months of street protests against Abhisit's successor Yingluck Shinawatra, appeared in court sporting a shaven head and the orange robes of a Buddhist monk after entering the clergy.
The Red Shirts are mostly supporters of billionaire tycoon turned premier Thaksin Shinawatra, who was toppled in a previous coup in 2006 and lives in self-exile to avoid prison for a corruption conviction.
Yingluck, his younger sister, was removed from office in a controversial court ruling in May this year, shortly before the military seized power.
Thailand's long-running political conflict broadly pits a Bangkok-based middle class and royalist elite, backed by parts of the military and judiciary, against rural and working-class voters loyal to Thaksin.
Since seizing power the junta has abrogated the constitution, curtailed civil liberties under martial law and summoned hundreds of opponents, activists and academics for questioning.
The military rulers say they want to reform Thailand to end years of political turbulence and street violence, but critics see the takeover as an attempt to wipe out Thaksin's influence.
In the 2010 protests, the Red Shirts were demanding snap elections, saying Abhisit's government took office undemocratically in 2008 through a parliamentary vote after a court stripped Thaksin's allies of power.
Tens of thousands of demonstrators occupied parts of central Bangkok for weeks before the army ended the standoff.