JAKARTA (REUTERS) - Indonesian volunteers managed to save six whales beached on the northern tip of Sumatra but four died, a conservation official said on Tuesday (Nov 14).

The rescuers worked late into Monday night (Nov 13) to free six of 10 massive sperm animals using ropes and patrol boats and turn them back into the waters off Aceh province.

"Some people got injured on the coral and the high tide was also an obstacle but we tried our best," said Sapto Aji Prabowo, head of the Aceh conservation agency.

"It is an important lesson for us on how to evacuate such huge animals if it happens again." Prabowo said it was not known why the sperm whales, which are among the biggest mammals on the planet, had washed up in shallow water.

"We plan to collect samples from the dead whales to determine the cause of death and for future research," he said.

Though unusual, whale beachings have been seen in other parts of Indonesia, a vast archipelago of over 17,000 islands.

In 2016, 29 pilot whales were briefly trapped in a mangrove swamp off the eastern coast of Java, but managed to free themselves or were helped back out to sea by fishermen.

Officials had previously said 12 whales had been stranded in Aceh.