Three judges have been shot dead at a court in China's southern Hunan province by a man armed with a submachine gun.
Three other judges were wounded before the man, who was carrying two other weapons, killed himself.
Officials told the BBC the attacker was Zhu Jun, 46, the head of security at a post office. He reportedly borrowed the weapons from a colleague.
The Xinhua news agency reported the shooting happened during just before 10am (0200 GMT) on Tuesday at the Lingling District People's Court.
The killer barged into an office at the courtroom and opened fire on the officials.
Xinhua said he had been motivated by revenge: he was reported to have divorced his wife three years ago and was unhappy at the way the court divided their wealth.
A series of knife attacks in Chinese schools in recent weeks have left 17 people dead and dozens injured.