A top German court has ruled that it is still lawful for poultry and egg producers to kill unwanted male chicks.
The ruling, by Germany's Federal Administrative Court on Thursday, backs companies on a temporary basis until an alternative can be found.
Mass-culling of male chicks is common practice in industrialised farming around the world.
After being sexed, billions of the baby birds are killed shortly after birth - usually by grinding or gassing.
Officials say this means about 45 million male chicks die every year in Germany alone.
Why was there a court challenge?
In 2013, the state of North Rhine-Westphalia issued a decree banning hatcheries from killing chicks. Two egg hatcheries in the state then appealed against this.
Paragraph one of Germany's Animal Welfare Act states that: "No-one shall inflict pain, suffering or harm on a pet without a reasonable cause."
A lower court ruled that killing for food production constituted "reasonable" grounds, leading to the latest high court challenge.
The German Minister for Agriculture, Julia Klöckner, has described the practice as "ethically unacceptable" and called for its ban.
But on Thursday the high court in Leipzig confirmed it will remain permissible until alternative methods of sex determination in eggs are introduced.
Some hens are farmed exclusively for eggs, while other "broilers" are raised for their meat
The ruling means that economic reasons alone do not constitute "reasonable" grounds - but stops short of immediately banning the practice.
Friedrich Ostendorff, a spokesman for the German Green party, said he was "surprised and disappointed" by the court's decision.
How widespread is male chick culling?
The mass-killing of male chicks is common practice in food production around the world.
For the billions of hens used in egg and poultry farming every year, a similar number of male chicks are killed shortly after birth.
Male chicks are viewed in the industry as commercially useless because they grow more slowly than hens so are deemed unsuitable for meat production.
Male chickens are usually culled almost immediately
After sorting, the most common methods of killing involve asphyxiation by gassing or maceration in high-speed grinders.
The UK-based Royal Society for the Prevention of Cruelty to Animals (RSPCA) says that maceration can actually be considered more humane than gassing because, if carried out correctly, it kill chicks within a second while asphyxiation may take two minutes.
The mass-culling of male chicks has long been a focus of animal rights activists who say the practice is unethical.
What are the alternatives?
Scientists in a number of countries have been trying to find a solution.
After years of research and millions in government funding, a German company called Seleggt started to sell the first "no kill" eggs on the market last year.
They developed a non-invasive way to determine chicken embryo sex, from about seven days after fertilisation, by extracting fluid and detecting hormones.
The method allows them to bring females to full maturity and discard males prior to hatching - turning them into high-quality animal feed.
The eggs, labelled Respeggt, are currently available in more than 200 shops in Germany, with hope the technology will become more widespread soon.
Have your say
More World Headlines
- Ramaphosa 'deliberately' misled parliament - Public Protector
- US shoots down Iranian drone
- S. Africa: Soldiers deployed to counter surge in violence
- Man finds own amputated leg on cigarette packets without consent
- Trump sparks condemnation after supporters chant 'send her back'
- US honours Nigerian imam who hid Christians from killers
- Trump renews attacks on congresswomen of colour: ‘Let them leave’ America
- Kenya deports 17 foreign directors of betting firms
- Former president of ECOWAS Commission De Souza passes away
- Mexican drug lord El Chapo gets life in prison
- Africans 'twice as likely to be refused a UK visa'
- Tom Steyer: Trump 'has met' criteria for impeachment
- US House votes to condemn Trump's attacks on congresswomen
- Zuma says he received death threat after commission testimony
- I am not a racist - Trump insists