A police officer attacked by a knife-wielding man Sunday in Tokyo's Setagaya Ward shot and killed his assailant before dying of his wounds.

The man, identified by police as Yoshihiko Toyama, 54, died after being shot in the chest by 51-year-old officer Takashi Hirata, who died of stab wounds to his neck and chest.

Hirata, an assistant inspector at Setagaya Police Station's community affairs division, was responding to a call about a man brandishing a knife at passersby in the Taishido area, about 300 meters north of Sangenjaya Station on the Tokyu Denentoshi Line, police said.