Rescue workers from Sea World and Queensland Parks and Wildlife Services battled to save a humpback whale that beached itself on Australia's Gold Coast.

beached whale gold coast
AFP

The juvenile humpback whale washed ashore at Palm Beach and rescuers worked throughout the night to try to return it to the sea.

Attempts to drag it out to sea failed when ropes use to move the 15-tonne mammal snapped three times.

There were concerns for the nine-metre whale when a wave flipped it onto its back, blocking its blowhole. Fortunately, another wave flipped it over again.

Onlookers cheered when the tide rose in the afternoon and the whale floated free and swam about 10 metres from shore, but it was washed back to shore.

Efforts to save the beast were abandoned as fading light hampered efforts to return it to the sea. Locals continued to try to rescue the animal as darkness fell, but this only caused the animal more stress.

beached whale gold coast
AFP

It all looked bleak for the whale, but rescuers finally managed to successfully tow the it out to sea on Thursday morning.

Crowds that had watched the dramatic 36-hour rescue attempt cheered as the whale swam free to continue its annual migration north to the Great Barrier Reef.