A pilot who survived a plane crash was pulled from the aircraft seconds before a train smashed into it.

It's like watching a scene from an action film, only it's real.

A pilot flying a Cessna 172 aircraft lost power and crashed shortly after takeoff from Whiteman Airport in California's San Fernando Valley on Sunday, according to the Associated Press. The FAA clocked the crash as occurring at approximately 2:10 p.m., with the plane coming to a stop at a railroad crossing just blocks from the Los Angeles Police Department's Foothills Division station, about 20 miles northwest of downtown Los Angeles.

Officers arrived at the scene, and at 2:15 p.m.—just five minutes after the plane crash-landed—a train barreled into the airplane, smashing it to pieces. Thankfully, four officers on the scene were able to extricate the pilot from the aircraft, literally seconds before the Metrolink train slammed into it. Video of the rescue was captured on bodycam and by a bystander from distance, and it's just about the most harrowing real-life footage imaginable.

Watch the cell phone video from a somewhat safe distance (the person filming was nearly hit with flying pieces of airplane when the train hit). The group of people moving away from the tracks just before impact are the officers carrying the pilot.

Then watch the bodycam footage from one of the officers involved in the rescue. (There is no audio for the first 10 seconds, FYI.) Utterly terrifying.

CBSN Los Angeles identified the four officers at the scene as Damien Castro, Christopher Aboyte, Robert Sherock and Sgt. Joseph Cavestany.

“I had requested Metrolink to cease all train activity," Cavestany told the station, "but apparently that didn’t happen."

The Los Angeles Fire Department said that the pilot was the only person on board. According to the Los Angeles Times, the pilot was in stable condition as of 8:00 p.m. Sunday evening. No other injuries were reported.

“Seeing what happened, I’m grateful to be alive. I’m grateful the pilot survived as well,” Sherock said, according to the AP.

It's not every day that you see someone dramatically escape death not once, but twice, within minutes. Especially in such a close call. Best wishes to the pilot, and kudos to the four LAPD officers for their quick thinking and quick-moving heroism.