A 24-year-old man dressed in a Batman's Joker costume attacked passengers on a Tokyo train line yesterday evening, injuring 17 people.

Police arrested the suspected attacker at the scene.

A man believed to be in his 60s was in critical condition after being stabbed, while witnesses also said the attacker had spread fluid around the train and started a fire.

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."

The witness said there was blood on the knife.

Another video on Twitter showed a 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 police in a subsequent clip.

The attack occurred on the Keio express line bound for Shinjuku, the world's busiest rail station, at around 8pm local time.

Partial service on the Keio line remained suspended late into last night.