It was a last-minute rescue: In Los Angeles, police officers pulled men out of a small plane lying on the tracks - just seconds before a train crashed into the wreck.

The action was filmed by the emergency services' body cameras and the material was shared on Twitter by the Los Angeles Police Department (LAPD) on Monday.

As the Los Angeles Times reported, the pilot made an emergency landing on the train tracks in Los Angeles on Sunday afternoon.

Why this came about was initially unclear.

Tense seconds followed for the officers who were called.

The LAPD photo shows several police officers trying to free the 70-year-old man from the cockpit.

Another officer stands by and looks for the approaching train.

"Go, Go, Go!"

an officer can be heard calling, while several emergency services heave the wounded man out of the plane and pull him off the tracks.

There is a loud horn and the train collides with the small aircraft, of which not much remains, as videos of passers-by show.

Within a short period of time, the LAPD video went viral on social networks.

By Tuesday noon it had already been viewed more than 3.5 million times.

The police have shown "heroism and quick action," wrote the LAPD on Twitter.

As the "Los Angeles Times" also reported, the pilot was taken to a hospital after the rescue operation.

His condition should be stable.