Three people were killed in a shootout 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.
Gruesome images of the bloody courtroom scene, some 250 kilometres (160 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.
Early last month 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.