The Supreme Court rejected an appeal and finalized the death sentence Thursday for a 69-year-old man convicted of killing five neighbors in Yamaguchi Prefecture in 2013 in revenge for what he believed to be harassment.

The decision against Kosei Homi, who was also found guilty of setting fire to two of the victims' homes in a remote community, was handed down by the top court's First Petty Bench.

"It was a brutal crime based on a firm intent to kill, and the consequences of taking five people's lives are grave," presiding Judge Atsushi Yamaguchi said in delivering a unanimous decision by the five judges.

Upholding lower court decisions, the top court acknowledged that Homi was mentally competent to be held fully responsible for his conduct even though he had been diagnosed as suffering from a type of delusional disorder at the time of the crime.

"Delusion affected the development of the motive, but he carried out the killings based on his own sense of values. The influence of delusion on his actions was not that significant," it said.

According to the ruling at the Yamaguchi District Court in 2015, Homi killed a woman and a couple, all in their 70s, by bludgeoning them in the head with a wooden pole before setting fire to their homes in the mountainous community of Shunan in July 2013. He was also convicted of murdering two more elderly people.

Homi believed he had been harassed by his neighbors, and he attacked them to retaliate, the ruling said. The sentence was upheld at the Hiroshima High Court in 2016.

Homi and his lawyers had pleaded not guilty, claiming he could not be held criminally responsible by reason of insanity or diminished mental capacity.