At the scene of a plane crash in Los Angeles on Sunday, police pulled a bloodied pilot to safety just seconds before a train smashed into the wreckage.

The single-engine Cessna 172 crashed on tracks near county-run Whiteman Airport, a one-runway facility in L.A.’s northeastern San Fernando Valley, putting its injured pilot in peril as a double-decker commuter train barreled toward it shortly after 2 p.m., according to authorities.

According to Ian Gregor, a spokesman for the Federal Aviation Administration, the plane crashed after taking off from Whiteman. “The pilot was the only one on board,” he explained.

According to body camera footage released by the LAPD, multiple officers from the Foothill Division, based about a half-block away, blocked the roadway with their SUVs while one officer stood at the tracks in the direction of the oncoming train in an apparent attempt to warn the conductor.

However, the train from Metrolink, which claims to be the nation’s third-largest commuter rail system in terms of miles covered, roared ahead, its horn blasting as crossing arms were lowered and warning bells rang.

Two officers yanked the pilot from the upright plane, while a third and fourth attempted to assist and warn them that the train was approaching.

“Go, go, go!” exclaimed one of the officers as the pilot was dragged along the ground and away from the wreckage.

The time between the video’s focus on officers yanking on the pilot’s seat and the collision is approximately 6 seconds. The only thing missing from a Hollywood ending was an over-the-top, unrealistic explosion.

According to the Los Angeles Fire Department, the pilot, who has not been identified, was taken to a trauma center for treatment of unknown injuries. There were no other injuries reported.

According to the department, the intersection was closed and the plane, which was seen on video of the crash site as a crumpled hulk, remained at the scene.

The Metrolink line, which connects Los Angeles to the high desert town of Antelope Valley, has been halted.

The FAA and the National Transportation Safety Board were both looking into what caused the plane to crash.

The officers’ bravery came at a time when the LAPD is under fire for police shootings, including the unintentional death of a 14-year-old girl shopping in the San Fernando Valley two days before Christmas, as well as frustration with officers who refuse to wear masks or get vaccinated.

The officers, according to the Foothill Division, “displayed heroism and quick action by saving the life of a pilot who made an emergency landing on the railroad tracks” on Sunday. The airport’s neighborhood, which has seen a number of small plane crashes over the years, has become a sore spot for some residents in Pacoima, a historically Mexican American community that wasn’t as dense when Whiteman opened a year after World War II.

Monica Rodriguez, the community’s councilwoman, stated on Sunday that she has been advocating for the closure of the facility because she believes it is a danger to everyday Pacoima residents, poor and working-class people who are unlikely to use the airport or own one of the hundreds of planes based there.

Rodriguez said on Twitter that she is grateful for the officers’ actions on Sunday, but the airport remains a problem.

“Tragically, this latest incident reflects yet another example of the public safety threat that Whiteman Airport continues to pose to my constituents and why I’ve been a consistent voice in calling for its closure,” she said.