The man was on a crocodile farm, probably looking for grass to feed his livestock, when he was attacked by one of the animals Friday, according to a statement from the head of Indonesia's Natural Resources Conservation Agency in West Papua, Basar Manullang, Reuters reported.
After he was buried Saturday, villagers stormed the farm and killed all the crocodiles there, Manullang said.
Images from the scene showed crowds surrounding piles of bloodied crocodiles.
One local resident named Olga told The Jakarta Post that the residents used knives to kill the crocodiles. "It was so horrid to see," Olga said.
The farm was operating legally and had a license to breed some types of crocodiles, Manullang said, but one of the conditions was that the reptiles do not disturb the community.
Manullang said his agency was helping local police with their investigation.