Usually with whales, it's the mom who keeps her baby safe, who steers her calf from potential trouble spots, and who hurries to the rescue.

But on Thursday in Australia, it was a humpback whale baby who realized its mom was in trouble, stranded on a sandbar, and who tried heroically to shove its mother to the safety of deeper water.

This sad but touching scene played out twice on Thursday and Friday in Moreton Bay in Queensland, Australia, both times concluding with what appears to be a happy ending. (The videos are posted in succession, helping to illustrate the story as it developed.)

The initial episode, after the adult humpback whale was discovered on the sandbar during a receding tide, was videotaped by rangers.

The newborn calf repeatedly tried to rescue its mom, in an agonizing struggle that played out over several hours. The nursing calf, obviously, could not feed with its mother resting belly-first on the sand.

7 News Brisbane posted the footage to Facebook (top video), generating an outpouring of sympathy.

"Given that someone was filming this you would hope they have called for help," reads a comment from Kristie Boykett.

RELATED: Humpback whale surprises dog on the beach

"I hope the poor baby doesn't exhaust itself trying to help," stated Amanda Witt.

Ultimately, though, the mother humpback received a boost from Mother Nature, when the tide rose and she was able to swim with her calf toward deeper water (second video).

7 news Brisbane later posted that footage, too, and it generated considerable relief among those participating on the comment thread.

"This made me cry, not for fear the whale wouldn't make it but for the baby trying to get its mummy free," reads a comment from Vanessa Collet.

"A baby's love for its mother. So happy the outcome was good," stated Kim Blair.

But the situation was not as good as it had seemed. The mother humpback, perhaps suffering from an illness, became stranded again Friday while rangers were still monitoring her progress.

Again the calf pushed and nudged, and again it was this and the rising tide – and a few kicks of the mother whale's fluke – that enabled her to swim freely once more (third video).

Whether she stays in deep water, however, and can continue to nurse her calf before their impending migration to Antarctic waters, remains to be seen.

But for now, stated 7 News Brisbane reporter Erin Edwards, "This mum and her newborn are safe at sea, heading south."

More from GrindTV

Skateboarding with magnetic skateboard wheels looks strangely satisfying

Here are 5 places for a perfect desert trip this fall

At home with adventure photographer Becca Skinner