Tokyo: An express train in Japan derailed and caught fire inside a tunnel overnight, injuring 39 passengers, railway officials said on Saturday.

The injured were taken for hospital treatment though no-one was seriously hurt, officials said.

The train, carrying 240 passengers, made an emergency stop inside a tunnel on the northern Hokkaido island on Friday after its driver noticed smoke emerging from the train.

The passengers escaped but the fire continued to burn until early on Saturday morning, destroying the six-carriage train.

Officials and emergency workers found marks on the track and said one of the carriages had apparently derailed just before entering the tunnel.

The government ordered the railway company, JR Hokkaido, to carry out a thorough investigation.

Naotoshi Nakajima, president of JR Hokkaido, apologised for the accident.

"This serious accident caused injuries to so many of our passengers," he told reporters. "We are extremely sorry. We will investigate the cause and will draft prevention measures," he said.