Media playback is unsupported on your device Media caption Aerial footage of the crash shows three of the train's carriages on their side

A commuter train has hit a lorry which had driven on railway tracks, causing four carriages to derail northwest of Los Angeles.

The vehicle was engulfed in flames and 28 people were injured, train operator Metrolink said, four critically.

The collision happened at a level crossing in Oxnard, after the lorry stopped on the tracks, officials said.

The 54-year-old lorry driver was detained a mile (1.6km) away and has been charged with felony hit-and-run.

Police in Oxnard say the crash was first reported at 05:44 local time (13:44 GMT).

Metrolink spokesman Scott Johnson estimated the train struck the lorry at a speed between 40 mph to 50 mph (65-80km/h).

"I saw a bright flash, a big fireball and flames, flames going pretty high," said Glenn Frisbie, who was driving to work and sitting at a junction about a block away from the incident.

The train, the first service of the day from East Ventura to Los Angeles, crashed about 65 miles (100 kilometres) away from its destination.

Captain Mike Lindbery of the Ventura County Fire Department told the BBC the train was carrying 51 people, three of them crew, and 28 people were taken to several local hospitals.

'Wrong turn'

The driver, Jose Alejandro Sanchez Ramirez from Yuma, Arizona, has been detained and hospitalised for observation.

He told police he wanted to turn right at a junction, but turned too soon and drove on to the railway tracks, said Oxnard Assistant Police Chief Jason Benitez.

The lorry was driven some way along the tracks before being abandoned and was facing the train head-on when it was hit.

Image copyright AP

Image copyright AP

Image copyright Getty Images

Image copyright Getty Images

The train had a camera on the front carriage, footage from which will be used in the investigation.

The National Transportation Safety Board (NTSB), the agency that leads transport investigations for the US government, said it was sending a "go-team" to the scene.

NTSB spokesman Robert Sumwalt said: "We are very concerned about grade [level] crossings and we intend to use this accident and others to learn from it, so that we can keep it from happening again."

He said investigators would be looking into whether the automatic "arms" that act as a barrier to traffic functioned properly, amongst other factors. They will look at data from sensors at the crossing and from the train.

He noted that over 2,000 level crossing accidents occur in the US each year, of those approximately 250 are fatal.

Mr Johnson said initial reports from the scene indicated the arms and lights were working.

A Metrolink train collided with a freight train in 2008 in Chatsworth in northern Los Angeles, killing 25 people and injuring more, and another crash at Glendale in 2005 left 11 dead.

Since then, Metrolink has added collapsible bumpers and other extra crash absorption technology to its trains.

Tuesday's accident "would have been much worse without" those measures, said Metrolink spokesman Jeff Lustgarten.