It’s good to have friends who will stick by you when you’re down. Just ask Lucy and Panda, two Ukrainian dogs whose friendship was literally a life saver.

Lucy was somehow injured near a live — and icy — train track near Uzhgorod in Ukraine. Despite harsh winter weather and the constant threat of trains, her dog-friend, Panda, would not abandon her side. He laid by her to keep her warm, and tucked in close when the trains pounded over them for two days until they were rescued.

Denis Malafeyev, a local man who was alerted to the dogs predicament and went to the site to help, captured their astonishing technique of survival in a must see to believe video.

“When we arrived, it turned out that one of the dogs, the female, was injured and couldn’t move,” Malafeyev said on social media. “But the male dog was protecting her from us.”

Then he heard a train coming down the track and feared the worst.

“The male dog heard the sound of the approaching train, came close to the female dog, and laid next to her. Both of them pushed their heads toward the ground, and let the train pass.”

The dogs had been living this terrifying, repeating scenario for two days, and despite being understandably stressed and cold, had few remarkable injuries from the train.

Eventually, both dogs were safely removed from the train tracks, received medical attention, and were reunited with their human companion.

Photo: Денис Малафеев, Facebook

“I don’t know what to call this: instinct, love, friendship, loyalty,” Malafeyev said. “One thing I know for sure, not all the people would do the same as this.”

We should all be so lucky as Lucy.