Three people were killed in a shoot-out at a Thai courtroom on Tuesday during a hearing into an inheritance dispute, according to police, who said two of the victims were lawyers.
The gunman opened fire on the opposing side in the dispute in Chanthaburi provincial court, before a guard shot back and fatally wounded him.
National police office spokesman Krissana Pattanacharoen said three people including the assailant were confirmed dead, while others were injured in the melee.
"Two are lawyers, another one is the shooter," he said, adding that they are still investigating why the courtroom feud turned deadly.
The identities of the victims were not released, but the Bangkok Post named one as Bancha Porameesanaporn - a former lawyer for ousted prime minister Yingluck Shinawatra during her trial for mishandling a rice subsidy scheme which allegedly cost Thailand US$8 billion.
[[nid:467190]]
She lost, being found guilty in absentia of criminal negligence and sentenced to five years in prison in 2017.
The gunman, identified as former police officer Tharin Chantharathip, and his accusers had been locked in several disputes for years, including a civil suit related to land and other criminal cases, said Suriya Hongwilai, a spokesman for the Court of Justice.
"When the judge left the courtroom, the defendant did the unexpected," Suriya said.
Gruesome images of the bloody courtroom scene, some 250 kilometres (155 miles) southeast of Bangkok, circulated on social media.
Thailand has high rates of gun ownership and petty personal disputes. Romantic and business rivalries are often resolved with bullets.
But the incident is the latest in a series of high-profile courthouse shootings that have exposed flaws in the legal system's security.
A week ago, three drug suspects - including an American - shot and stabbed their way out of a court in the seaside town of Pattaya before being tracked down by police.
In October, a Thai judge in the insurgency-battered south shot himself in the chest in front of a packed court after acquitting several murder suspects and decrying the judicial system in an impassioned speech.