Darius the giraffe is dissected at Darius the giraffe dissected at Copenhagen zoo. WARNING: some viewers may find these images disturbing Reuters

In the chilly dawn of Sunday morning a healthy young giraffe in a Danish zoo was given its favourite meal of rye bread by a keeper – and then shot in the head by a vet.

The death of Marius, an 18-month-old giraffe considered useless for breeding because his genes were too common, was followed by his dissection in front of a large crowd, including fascinated-looking children, prompting outrage and protests around the world.

Copenhagen zoo carried out the killing despite a small group of protesters at the gates and an international petition which garnered more than 27,000 signatures, as well as offers from several zoos to rehouse the creature. Yorkshire Wildlife Park, near Doncaster, which offered to take Marius, said it was saddened to learn of his fate.

The zoo's decision to conduct the public dissection, and the disclosure that the animal was shot rather than being killed by lethal injection so that it could be fed to the carnivores, fanned the protests and provoked some calls for the zoo to be boycotted or closed. The controversy was fed further by startling images and video of the process, including a picture of a large chunk of meat with an unmistakably spotty hide being fed to the lions.

Bengt Holst, the zoo's scientific director, said he had never considered cancelling the killing, despite the protests. "We have been very steadfast because we know we've made this decision on a factual and proper basis. We can't all of a sudden change to something we know is worse because of some emotional events happening around us.

"It's important that we try to explain why we do it and then hope people understand it. If we are serious about our breeding activities, including participation in breeding programmes, then we have to follow what we know is right. And this is right."

The dissection took almost three hours because of the numbers of spectators, and the zookeepers giving detailed explanations of the process.

Holst said they had previously had public dissections of zebras, snakes and goats, but the giraffe was a first.

"People are fascinated by it, both adults and children, and they would like to hear stories they normally don't have access to. I think that's good. It helps increase the knowledge about animals but also the knowledge about life and death."

When a storm of protest broke over the news that the giraffe was to be killed – the small gene pool among European zoos meant there was a risk of inbreeding if it was allowed to reproduce – the zoo posted a detailed justification on its website. It explained that as part of an international programme, only unrelated animals were allowed to breed: "When breeding success increases, it is sometimes necessary to euthanise."

The zoo also said that giving Marius contraceptives would have had unwanted side-effects and represented poor animal welfare, and that there was no programme for releasing giraffes into the wild.

The European Association of Zoos and Aquaria, which monitors international standards and of which Copenhagen is a member, said it fully supported the decision of the zoo. It added that zoo animals were very rarely killed for conservation management, but almost always because of ill health.

"Our aim is to safeguard for future generations a genetically diverse, healthy population of animals against their extinction," it said in a statement. "Copenhagen is highly involved in these programmes and took a transparent decision that the young animal in question could not contribute to the future of its species further, and given the restraints of space and resources to hold an unlimited number of animals within our network and programme, should therefore be humanely euthanised."

However, Stine Jensen, from Denmark's Organisation against the Suffering of Animals, disagreed: "It shows that a zoo is not the ethical institution that it wants to portray itself as being, because here you have a waste product – that being Marius."

An online petition had argued: "Marius deserves to live and there must be somewhere for him to go. The zoo has raised him so it is their responsibility to find him a home, no matter how long it takes." It attracted 27,170 signatures before it was closed when news broke that the giraffe was dead.

Yorkshire Wildlife Park (YWP) was among several zoos that offered to rehouse Marius – a private individual apparently also offered to buy him for €50,000 (£41,000) – but received no response. In a statement, the park said without knowing the full details it would be inappropriate to comment further.

Copenhagen zoo's silence was more surprising because Yorkshire's head of hoofed animals is Danish, and the YWP has already taken a young male giraffe from the Danish zoo.

"YWP has a state-of-the-art giraffe house built in 2012 with a bachelor herd of four male giraffes and the capacity to take an extra male, subject to the agreement of the European stud book keeper. One of the YWP giraffes is Palle, who came from Copenhagen zoo in September 2012, when he was the same age as Marius," the statement said.

Holst said that though Yorkshire participated in the giraffe breeding programme, Marius was not the right genetic match, and if they had space it should be reserved for a genetically more valuable giraffe.

London Zoo was unable to offer a home for Marius because it has a non-breeding group of hybrid giraffes.