The technological fight against wildlife poaching usually happens inside preserves, from drones that search for intruders to AI that predicts when the next attack will happen . But one project in South Africa looked at an earlier step in the process: Using data analytics tools that are more commonly used in marketing, a company mapped out networks of rhino poachers–and discovered that the guns that they used were coming from a particular supplier in Europe.

“The data actually tells you a story as soon as you start stitching it all together,” says Anni Toner-Russell, managing director for Data Shack, a South Africa-based data science company that worked with the South African National Parks Board to analyze the crisis in rhino poaching.

Poaching has surged in South Africa over the last decade and thousands of rhinos have been killed for their horns In 2007, only 13 were killed. But that jumped to 83 a year later. 333 animals died in 2010, and by 2014, the number had climbed to 1,215. Much of the poaching happens in Kruger National Park, a preserve that sprawls over an area larger than the state of Massachusetts.

Data Shack had previously worked with the mining industry to study the illicit diamond trade, and as the team learned about crime syndicates, they realized that some of the same techniques could be useful to tackle the problem of poaching. Beginning in late 2014, the company gathered data from a variety of sources–the serial numbers on guns left behind in parks, police data, intelligence data, social media posts that show relationships between people–and then used tools from Tibco, a data analytics software company, to study the links. Since the work began, the number of rhinos killed has slowly but steadily started to drop.

“We can connect the dots and try and understand how these people networks are stitched together, and try and figure out patterns…and how these transactions basically happen,” says Toner-Russell. “[That has] led us to bringing down the poaching numbers.”

Often, she says, organizations working on the problem don’t necessarily have access to data from other sources. They also haven’t had data analytics tools to look for connections that might not otherwise be obvious. Data Shack used analytical clustering and segmentation algorithms–tools that can surface patterns in people and behavior. In marketing, the tools are used to study consumers.

“People know the application of certain of these techniques very well–clustering [similar] customers together and understanding what to sell them next,” she says. “But it takes thinking out of the box to go and say, with what I’ve learned from industry, how can I apply it to using data for the greater good?”