GAJAH MAKMUR, Indonesia — This small agricultural village in the hills of Sumatra island, in the province of Bengkulu, is a testament to happy days in human-elephant relations: When the village — whose name translates to “Prosperous Elephant” — was founded in 1991, residents nursed an injured wild elephant back to health until it one day disappeared into the forest, never to be seen again.

But when wild elephants raided, villagers organized into brigades and used everything they could gather — pots and pans, a megaphone — to scare off the rampaging giants, forcing them to a palm oil plantation elsewhere.

It was just one example of how the rapid expansion of palm oil plantations into elephant territory here has brought humans and elephants into more frequent conflict, especially in remote villages far from ranger bases. Increasingly, that conflict is deadly.