A young humpback whale stranded for nearly two whole days on a beach in Queensland, Australia is once again swimming in the open ocean, thanks to the tireless efforts of a volunteer rescue crew.

The juvenile male humpback, weighing an estimated 20 tons, became stranded at Palm Beach on the Gold Coast in Queensland late on Tuesday. Crowds gathered and unsuccessfully attempted to guide it back out to sea, and the following day were accompanied by environmental officials and staffers from the local SeaWorld.

Darkness and low tides initially hampered their efforts, and so a canopy was erected over the mammal, while buckets of water and wet blankets were thrown over it to keep it cool overnight before it was finally freed Thursday morning.

Rescuers managed to tie a rope around the stranded whale, and a boat was used to gently pull it out past the surf where it began to swim towards deeper waters.

"Once we saw it had cleared the break it was just absolute elation," SeaWorld marine animal supervisor Tacha Mulligan told the Australian Associated Press.

"We all had our hands on our hearts and were just willing this whale forward."

The humpback was able to navigate around a sandbar before swimming out to deeper waters to continue its annual migration north to the Great Barrier Reef.

Mulligan said her and the rest of the team had invested "so much of our hearts and soul" into the mission.

Crowds cheered as the exhausted animal returned to sea, but whale scientist Sean Samar, who was part of the rescue mission, is only cautiously optimistic that the humpback will survive.

"I don't think the odds are with it to be honest," he told ABC News, "but I will have my fingers crossed because I have seen miracles happen before."

SeaWorld crews will monitor the animal throughout the day and into the evening.