A Danish zoo shot one of its giraffes as it bent down to eat some bread, then butchered its carcass and fed it to lions -- all in the name of combating inbreeding. But while the issues cited by the zoo are very real, many experts are leery of the way the Copenhagen Zoo has handled the case of 2-year-old Marius the giraffe.

Marius was healthy, but was simply not needed as a stud in the European giraffe breeding program. And, as a male, he wouldn't have been able to stay with his home herd for much longer -- his presence would likely irritate the resident older male and provoke fights, which could prove dangerous for Marius. (In the wild, young male giraffes tend to live in "bachelor herds"; in zoos, breeding groups are kept to a single male and a group of females.)

"As this giraffe's genes are well represented in the breeding program and as there is no place for the giraffe in the zoo's giraffe herd, the European Breeding Program for Giraffes has agreed that Copenhagen Zoo euthanize the giraffe," the zoo's scientific director, Bengt Holst, said in a statement.

This justification did not assuage animal-rights activists and even some other zoos that disagreed with the decision.

A spokesperson for the Dublin Zoo in Ireland said it was "saddened" by the news of the giraffe's death, especially given that other zoos had offered to take the giraffe, the Irish Times reported Monday.

The decision to shoot Marius might seem cruel, but the underlying reason -- preventing inbreeding -- is an important factor in ensuring the safety and healthiness of giraffes as a species for generations to come. Genetic variation helps make a population resilient. If there’s a sudden pressure on the population -- maybe a new virus arises, or perhaps there’s flood or famine -- some animals may have be better equipped to survive it, because of their unique genetic makeup. But if every animal in a species is nearly genetically identical, it’s much easier for something to threaten the entire population.

Zoos try to increase genetic diversity as much as they can by keeping extensive records of their animals’ lineages -- that way, they can breed those animals that are less closely related.

But finding two giraffes that are genetically different, but not so different that they won't have trouble reproducing, is a difficult task. Both in the wild and in zoos, giraffes are getting sorted into smaller and narrower breeding groups. In 2007, a group of researchers from the University of California Los Angeles found six distinct lineages of giraffes in Africa, all with little evidence of interbreeding with each other.

“Such extreme genetic subdivision within a large vertebrate [species]… is unprecedented and exceeds that of any other large African mammal,” the UCLA team wrote in the journal BMC Biology.

In a chapter from the 2010 zoo management textbook “Wild Mammals in Captivity,” National Zoo research scientist Jonathan Ballou and colleagues used the giraffe as an example of the tough job it is to try and maintain a diverse zoo population. In the 1990s, when a species survival plan was first initiated for the giraffe, zoos got a glimpse of detailed lineages for their giraffes for the first time -- but were dismayed at what they found.

“Many curators were unpleasantly surprised to discover that about 30% of living giraffes were subspecific hybrids or had minimally traceable pedigrees,” Ballou and colleagues wrote.

In other words, many zoo giraffes were useless for breeding, either because they couldn’t mate with other animals outside of their narrow niche, or because zoos had no idea how closely they might be related to potential mates. So, because there are such narrow subpopulations of giraffes, there’s less opportunity for a giraffe like Marius to find a place where his genes are wanted.

"Historically, many of the 347 zoos that belong to the Amsterdam-based European Association of Zoos and Aquaria (EAZA) were eager to have giraffes of any kind,” Joerg Jebram, who manages the European Endangered Species Program for giraffes, told the Associated Press on Sunday. “But in the past several years, zoo breeding programs have produced enough of some subspecies.”

But, you might ask, why couldn’t the zoo just castrate Marius -- or use some kind of contraception?

“Until recently, either would have required sedation, which is a relatively high-risk operation with giraffes,” Jebram says. “They are liable to break their necks when they fall while sedated.” This is because giraffes typically must be sedated from a distance -- usually with a tranquilizer gun -- because it's difficult to get them to lie down. (Giraffes often, but not always, sleep standing up.) Still, the sedation argument is not a strong one -- while tranquilizing carries a risk, it is not guaranteed to endanger the animals. (Here's a 2011 story about a giraffe who was sedated in order to treat her overgrown hooves; she withstood the procedure just fine.)

Even if Marius’s death was justified, the backlash may prove to have repercussions beyond Copenhagen. U.K. naturalist Chris Packham -- whose partner runs the Isle of Wight Zoo -- said that while euthanasia is often a necessary part of animal husbandry, the way the Copenhagen Zoo has handled this case is a giant public relations disaster for zoos as a whole.

“The belligerent arrogance of this particular zoo in the face of a worldwide campaign to save the animal will have global repercussions,” Packham wrote in the Guardian on Monday. “People are polarized about zoos: they are either for or against. And the vast majority will not bother to find out why this happened; they will make a judgment.”