Police in Taiwan have arrested the man who set off explosives in the carriage of a busy commuter train.

Somehow, nobody died in the attack, but 25 passengers were injured when the homemade bomb was detonated at Songshan railway station in the capital Taipei.

Lin Ying-chang, 55, was one of those injured in the blast late on Thursday.

A Taiwanese police officer stands guard at the entrace after an explosion at Songshan train station in Taipei, Taiwan

A bomb squad officer in protective gear is seen entering the inside of a train carriage that was involved in a blast in Taipei on July 8, 2016. Taiwan police said they had identified "several" possible suspects after an explosion on a train in Taipei injured 25 people but they ruled out a terrorist attack

A policeman shows a photo of a homemade explosive device found at the Songshan train station during a news conference in Taipei, Taiwan

Witnesses told Straits Times they heard three blasts inside the sixth carriage before it burst into flames.

A man was seen walking in and leaving a bag in the cabin moments before the explosion, and police found items they said 'related to explosives' in the cabin's toilet.

No detonator has been found and officials are not ruling out the possibility the blast was orchestrated by more than one person.

TV footage of people with bandages on their burned limbs and faces being taken to hospital were broadcast on a local station and Wang Bao-chang of Taiwan's National Police Agency told a news conference: 'Our initial investigation has ruled out terror.'

An employee uses a flashlight to check the platform of Songshan train station in Taipei

Premier Lin Chuan earlier said: "It looks like somebody did this with a malicious intent and we will fully investigate this case."

The explosive device was a steel tube 47 cm (19 inches) long filled with pyrotechnic gunpowder, Wang added, as he displayed a picture of remnants of a black tube, with gray duct tape stuck on it, that investigators had found at the site.