The attacker, only identified as a 24-year-old man, is arrested on the spot and is being investigated on suspicion of attempted murder. His motive was not immediately known.

The attack occurred on the Keio express line bound for Shinjuku, the world's busiest rail station.
The attack occurred on the Keio express line bound for Shinjuku, the world's busiest rail station. (AFP)

A 24-year-old man dressed in Batman's Joker costume has attacked passengers on a Tokyo train line, injuring 17 people as many party-goers headed into the city centre for Halloween gatherings.

Police arrested the suspected attacker on the spot, media reported. A man believed to be in his 60s was unconscious and in critical condition after being stabbed, while witnesses also said the attacker had spread fluid around the train and started a fire, according to media.

One video uploaded on Twitter showed a steady stream of people running away from a train car where, seconds later, a blaze lit up. 

Another video showed passengers rushing to squeeze out of the train's windows and onto the platform where the train had made an emergency stop.

"I thought it was a Halloween stunt," one witness told the Yomiuri newspaper, recalling the moment he saw other passengers running in a panic towards his train car. 

"Then, I saw a man walking this way, slowly waving a long knife." There was blood on the knife, he said.

Another video on Twitter showed a bespectacled man dressed in a purple suit and bright green shirt, as worn by the Joker, seated in an empty train puffing on a cigarette, his legs crossed and looking calm.

He can be seen through the window being surrounded by law enforcement in a subsequent clip.

Local media reported later that the suspect told authorities he "wanted to kill people so he could be sentenced to death".

The attack occurred on the Keio express line bound for Shinjuku, the world's busiest rail station, at around 1100 GMT (8 PM local), media said.

Partial service on the Keio line remained suspended late on Sunday, when Japanese voters went to the polls in a lower house election.

Source: TRTWorld and agencies