A mass rescue operation managed to pull most of the stranded whales into the deep sea, said Wahid Noor Azis, head of the local Fishery and Maritime management.
Wahid said the whales began stranding themselves during high tide Wednesday on the coast of Pesisir village in Probolinggo district in the province of East Java.
The whales, numbering about 32 to 35, are likely short-finned pilot whales, which live in tropical and subtropical waters, Wahid said.
Dozens of locals using two boats were trying to drive the last two stranded whales still alive into the deep sea.
The provincial Conservation and Natural Resources Agency will be conducting autopsies on the 10 dead whales to find out why they became stranded, Wahid said.
The locals would bury the carcasses of the dead whales after the autopsies.
Pilot whales are among the largest of the oceanic dolphins, exceeded in size only by the killer whale.
They are also among the most common cetaceans stranded.