The father of a murder victim detonated two hand grenades in a courtroom in the Ukrainian city of Nikopol on Thursday and died in the explosion, police said.
At least seven others present at the trial, including the accused, were injured, police added in a statement.
The suspect stands accused of killing the man's son and one other person after shooting at a car they were in with an automatic weapon in 2016.
A police spokesman said that a total of nine people were wounded, including the defendants, court personnel and guards.
The tragedy highlights the arms trafficking problem in Ukraine since the conflict between Russian-backed rebels and Kiev army erupted in April 2014 in the country's east and has since then killed more than 10,000 people.
In November, Kiev police said two men were detained after 6.5 kilograms of explosives were found hidden in a car that was parked near a shopping center in a densely populated area on the outskirts of the Ukrainian capital.
Also this month, in the eastern war-torn Donetsk region police intercepted a car that was illegally carrying hundreds of cartridges and six hand grenades.
Security forces in southern Odessa region have also announced the arrest of a man suspected of trafficking weapons from the conflict zone.