(CNN)–An online petition to save a healthy young giraffe from death has failed, despite thousands of signatures from animal lovers.

Copenhagen Zoo said it euthanized the male, named Marius, on Sunday because of a duty to avoid inbreeding.

After an autopsy, “Marius” was dismembered in front of a zoo audience that included children, and fed to the zoo’s lions.

Despite online uproar over the move and reports of last-minute attempts to save the animal, the zoo in the Danish capital said it had no place for Marius in its giraffe herd.

“Our giraffes are part of an international breeding program, which has a purpose of ensuring a sound and healthy population of giraffes,” Bengt Holst, scientific director at Copenhagen Zoo, told CNN. “It can only be done by matching the genetic composition of the various animals with the available space. … When giraffes breed as well as they do now, then you will inevitably run into so-called surplus problems now and then.”

Fed to the lions

Marius was killed by a bolt gun, not a lethal injection, which would contaminate the meat.

The carcass was used partly for research and partly to feed carnivores at the zoo — lions, tigers, and leopards.

“In this case we would never throw away 200 kilograms of meat,” Holst said.

He said the giraffe was 2 years old, and while he was not officially named, his keepers had called him Marius to identify him.

The giraffe’s impending death had sparked outrage online, with more than 27,000 people signing a “Save Marius” petition, appealing for a last-minute change of heart.

“The zoo has raised him so it is their responsibility to find him a home,” author Maria Evans wrote on the petition site.