DOUENTZA, Mali — Mali’s elephants, Africa’s northernmost herd and adapted to life in the country’s harsh desert, were in desperate need of protection.

The animals live in an unforgiving landscape southeast of Timbuktu, enduring sandstorms and blistering temperatures. To survive, they trek in search of food and water across what is thought to be the biggest migratory range of their species, more than 12,400 square miles.

But it wasn’t only climate change endangering the elephants. It was also poachers.

They were being slaughtered in staggering numbers as ivory traffickers took advantage of a security vacuum in the region, with 163 killed since 2012, said Susan Canney, director of the Mali Elephant Project, an initiative of the Wild Foundation and the International Conservation Fund of Canada.

The situation was so dire that in January 2016, Dr. Canney predicted all Mali’s elephants would be killed within three years if poaching continued unabated.