A clever, albeit brutal, goat eradication program on the Galápagos Islands is credited for successfully saving a rare population of giant tortoises from extinction.

More than 1,500 giant tortoises (Geochelone hoodensis) are now believed to populate Española, the southernmost island on the archipelago. More may soon be born on nearby Pinta Island, where scientists are also hoping to launch their program to reestablish the giant tortoise.

A Galápagos tortoise can weigh almost 900 pounds, be up to five feet in length, and can live almost 100 years. Spanish explorers who discovered the islands named them Galápagos, which is Spanish for tortoise.

The Galápagos Islands consist of almost 20 volcanic islands hovering on the equator, 600 miles west of Ecuador. They are known for their many endemic species, which British biologist Charles Darwin studied as he developed his theory of evolution by natural selection.

There are believed to have been as many as 250,000 giant tortoises hundreds of years ago, but in the 1970s their numbers dwindled down to a few thousand, with many killed by passing sailors for food or oil. These sailors and other visitors also introduced nonnative species such as goats to the islands.

The introduction of a few goats quickly turned ugly, with their numbers multiplying over the years to tens of thousands. They devastated the islands’ vegetation.

Efforts to eradicate the goats began in the 1970s, as sharpshooters killed them individually. Another effort in the 1990s involved helicopters, radio tracking devices, and dogs, but the herds proved elusive and difficult to eradicate entirely.

Henry Nicholls, ambassador for the Galápagos Conservation Trust, said that the situation changed when they began using the goats against themselves. Certain goats were fitted with electronic collars, allowing hunters to find them—and the herd—easily. Hunters killed the herd but left the one goat with the electronic collar. They waited for the marked goat to locate another herd, and then they repeated the process until only the goat with the collar was left. Then it was shot.

Conservationists admit that this situation is not a pretty picture, but it has been a necessary solution. “There was little public outrage because it was seen that the tortoises were at risk,” Johannah Barry, president of the Galápagos Conservancy, told the Guardian.

Scientists moved 15 giant tortoises—among the last survivors of the species—from their ruined Española habitat to a captive breeding program. As the goats were eradicated, progeny from the breeding program were reintroduced to the island.

“Tortoises have begun to play their role as ecosystem engineers,” Washington Tapia, leader of the survey that recently estimated the total number of tortoises on Española, told the Guardian. “We can say with certainty that the ecological integrity of Española is being re-established.”

A similar project has begun on the island of Pinta, at the northern end of the archipelago, where the population of native tortoises has dwindled to one. Tortoises from Española are being carefully brought to Pinta. They are a close genetic match, and scientists are hoping they will begin to reproduce.