Rescue teams hurried to a beach near Dunsborough, south of Perth, to help the whales.

Ian Wiese, from Geographe Marine Research group, said it was a huge task. "I’ve dealt with whale strandings before, but never so many," he told CNN.

Out of 160 beached whales, 130 were returned to the sea. Sadly, 28 whales died.

International Tribunal rules greenhouse gases harm marine environment, states must act International Tribunal rules greenhouse gases harm marine environment, states must act

Spotter planes are watching to make sure the released whales don't return to shore. "So far, they've stayed away," Wiese said.

The scene on the beach was chaotic, but in the end, it was good news. "We could only save a few," Wiese added.

Locals and officials worked together to keep the whales upright and help them breathe.

Pilot whales are very social animals. They look out for each other, especially when one is sick or hurt.

The remaining whales will support each other out at sea. But near shore, there are dangers that could lead to more strandings.

Wiese mentioned seeing a newborn calf among the stranded whales. "Maybe that's why they ended up stranded," he said.

Last year, over 50 pilot whales died in a similar event in Scotland. Wildlife officials in Western Australia had to make a tough choice to put down stranded whales when efforts to save them failed.