A man brandishing a "long knife" while dressed as the Joker from Batman stabbed several passengers on a Tokyo commuter train before starting a fire in one of the carriages, local media reported.
At least 17 people were injured in the attack, including three seriously, though not all the wounded had been stabbed.
The incident happened on the Keio express line bound for Shinjuku station - the world's busiest - at about 8pm local time on Sunday near the Kokuryo station as people headed into the Japanese capital for Halloween parties.
The attacker, wearing a green shirt, a blue suit and a purple coat like the Joker in the Batman comics, spread fluid around before igniting it, reports said. Flames were seen gushing from one of the carriages and some seats burned.
A witness said he saw the attacker "walking this way, slowly waving a long knife" smeared with blood.
"I thought it was a Halloween stunt," he told the Yomiuri newspaper.
A man in his 60s was left unconscious after being stabbed. Other passengers - assisted by the emergency services - escaped through train windows.
"Train doors were closed and we had no idea what was happening, and we jumped from the windows," witness Shunsuke Kimura said. "It was horrifying."
A 24-year-old suspect was arrested on the spot and is being questioned on suspicion of attempted murder, NHK public television said. The motive for the attack is not known.
It is the second attack involving a knife on a Tokyo train in just under three months.
In August, the day before the Tokyo Olympics closing ceremony, a 36-year-old man stabbed 10 passengers on a commuter service.
The suspect later told police he wanted to attack women who looked happy.