The dogs were spotted huddled on the train tracks on Christmas Day in the Ukrainian community of Uzhhorod by Denis Malafeev, who posted the footage to Facebook.
One of the canines in the video appears to be injured and unable to stand, and the other dog stands guard beside her. When a train rushes toward the dogs, the male dog flattens down beside his friend and pushes her head down to shield her from the locomotive overhead.
When the train finally passes, the dogs appear to be uninjured.
The astounding footage has since been viewed more than one million times and has been picked up by media outlets across the globe.
It was challenging to help the injured dog because its companion attempted to defend her from anyone getting too close, Malafeev wrote in the Facebook post.
The dogs were eventually taken to safety and reportedly adopted to a new family, which has named them Panda and Lucy.