Dramatic LAPD body-camera footage shows officers removing a pilot from an airplane just seconds before the train slammed into it in Pacoima, Sunday.

The bloodied pilot lost power and was forced to make an emergency landing that left him right on top of railroad tracks between San Fernando Road and Osborne Street.

“Foothill Division Officers displayed heroism and quick action by saving the life of a pilot who made an emergency landing on the railroad tracks at San Fernando Rd. and Osborne St., just before an oncoming train collided with the aircraft,” LAPD tweeted on Sunday.

A nearby bystander filmed the scene from a different angle, with debris flying toward him after the impact.

“Saw a plane crash just now, and almost got hit with debris when a train crashed into the plane,” Luis Jimenez captioned the video. “Luckily first responders were able to remove the pilot in the nick of time, and he was treated on site.”

There were no other passengers inside the airplane and the injured pilot was taken to a nearby hospital.

The incident is still under investigation.

Advertising disclosure: We may receive compensation for some of the links in our stories. Thank you for supporting LA Weekly and our advertisers.