Emergency workers and police investigate the scene at a train station in Tokyo on Sunday, Oct.
The attacker, identified as a 24-year-old man, was arrested on the spot and was being investigated on suspicion of attempted murder, NHK said.
Television footage showed a number of firefighters, police officials and paramedics rescuing the passengers, many of whom escaped through train windows.
Shunsuke Kimura, who filmed the video, told NHK that he saw passengers desperately running and while he was trying to figure out what happened, he heard an explosive noise and saw smoke wafting.
In August, the day before the Tokyo Olympics closing ceremony, a 36-year-old man stabbed 10 passengers on a commuter train in Tokyo in a random burst of violence.
In 2019, a man carrying two knives attacked a group of schoolgirls waiting at a bus stop just outside Tokyo, killing two people and injuring 17 before killing himself.