Both of the dogs left this close call with the train unharmed

It’s hard to watch, but there is a happy ending.

One dog just proved that canines are loyal to all who show them love, including other dogs.

According to the New York Post, a brave pup in Uzhhorod, Ukraine, risked his life to protect his friend, covering her body with his own to shield her from an oncoming train.

The terrifying event occurred after the female dog became stuck on the tracks. Unwilling to leave his companion behind, the other dog laid on top of her in what appears to be an attempt to protect her from the train hurtling towards them both.

The shocking moment was captured on video by a Ukraine resident, who was unable to help the dogs before the train arrived. As shown in the second video from the snowy scene, both of the dogs survived the close calls with no injuries.

This nerve-wracking, near-death encounter turned into a Christmas gift of sorts for the dogs. After the dedicated pair were removed from the tracks by rescuers, the video of the male dog’s heroic act was posted to Facebook, where it quickly amassed over 1 million views.

Thanks to this attention, both of the pooches were adopted by the same family, who have since named the furry best friends Panda and Lucy.