Snap-happy spectators who rushed out in fishing boats to get a close-up of a sperm whale off the island of Java, Indonesia, have led to the re-beaching of the animal, who experts say is now dying as a result.

Rescue workers say they tried to get the 12-metre long animal out of shallow waters and back to sea Thursday, but boats packed with paying passengers blocked the animal from swimming away.

The giant whale washed ashore Wednesday near Pakis Jaya beach in Karawang, in the province of West Java. It attracted hundreds of onlookers, who clambered on top of it to pose for photographs.

Pramudya Harzani from the Jakarta Animal Aid Network said Friday that the whale was dying after being scratched and bruised by the spectators.

Police were trying to keep people away from the animal Friday while waiting for a ship to pull it back to sea.

With files from The Associated Press