LOS ANGELES — A Metrolink commuter train believed to be carrying up to 350 people collided with a freight train Friday, killing four people and injuring dozens of others.
Firefighters extinguished a blaze under part of the wreckage and were working two hours after the wreck to free people from a commuter car left mangled, toppled on its side with the train’s engine shoved back inside it. Two other cars in the Metrolink train remained upright.
The Union Pacific freight train’s engine was also turned onto its side, with the rest of the train splayed out like an accordion behind it.
Los Angeles County sheriff’s spokesman Steve Whitmore said four people were confirmed dead and 30 to 40 people were injured.
Firefighters treated the injured at three triage areas near the wreck, and helicopters flew in and out of a nearby landing area on medical evacuation flights.
One of the largest medical facilities in the area, Northridge Hospital Medical Center, was told to prepare for the arrival of injured passengers, said hospital spokeswoman Christina Zicklin.
‘‘We are expecting some people. I don’t know the number yet,’’ she said.
A male passenger told KNBC-TV he boarded the Metrolink train in suburban Burbank and was talking with a fellow passenger when the crash occurred.
‘‘Within an instant I was in my friend’s lap. It was so quick. It was devastating,’’ he said. The man was visibly injured, but able to walk with the aid of firefighters. The man said he was involved in a devastating 2005 Metrolink crash in Glendale and was talking about it with the other passenger when Friday’s crash occurred.
The trains collided at 4:32 p.m. in the Chatsworth area of the San Fernando Valley.
Metrolink spokeswoman Denise Tyrrell said the train left Union Station in downtown Los Angeles and was headed northwest to Moorpark in Ventura County. She couldn’t confirm how many people were on the train, but said that in rush hours there would usually be about 350 people on board.
‘‘We don’t know if we hit another train or another train hit us,’’ Tyrrell said.
She said the Metrolink train was being pulled by its locomotive rather than being pushed. The push mode is controversial due to claims that it makes trains more vulnerable in accidents.
Firefighters pulled passengers out a rear door and down a ladder from the toppled commuter car, which had been separated from the rest of the train by several feet. Crumpled and charred freight cars were strewn across the tracks. Dazed and injured passengers sat on the ground and milled about on both sides of the tracks.
The crash happened in an area where the tracks form a ‘‘U’’ shape, about 2,500 feet wide. At the top of the bend is a 500-foot long tunnel that runs beneath Stoney Point Park, popular with climbers for its large boulders.
The worst disaster in Metrolink’s history occurred on Jan. 26, 2005, in suburban Glendale, when a man parked a gasoline-soaked SUV on railroad tracks. A Metrolink train struck the SUV and derailed, striking another Metrolink train traveling the other way, killing 11 people and injuring about 180 others. Juan Alvarez was convicted this year of murder for causing the crash.
Associated Press writers Raquel Maria Dillon, Greg Risling, Denise Petski, Josh Dickey, James Beltran and John Rogers contributed to this report.