In a basement of Dresden University, German scientists are busy refining a technique that could save millions of fluffy chicks from being shredded to death moments after they hatch.
The young hatchlings are usually condemned to a violent end simply because they are male, as roosters are deemed largely useless in the world of livestock farming.
Not only are they unable to lay eggs, their meat is not particularly popular.
Male chicks are therefore systematically eradicated. In many cases, they are mechanically shredded or crushed to death and used as animal feed.
More from GlobalPost: Germany gasses or shreds 45 million newborn chicks each year. And it's not alone
At Dresden's University Clinic, analytical chemist Gerald Steiner and his team are working to prevent such mass culls of newborns by detecting the sex of chicks before they hatch.
Steiner uses a spectroscopic method, based on the analysis of scattered light on blood vessels, to determine the sex of chick embryos in the egg.
Spectroscopy is already used in cancer treatment as it helps to differentiate between abnormal and healthy cells.
"If we are able to identify a tumour, then why not the sex?" said Roberta Galli, a physicist.
- '95% accuracy' -
Several teams of scientists -- including veterinarians, chemists, engineers and physicists -- are collaborating on the project, which also includes the participation of two private companies.
In the laboratory, Galli and her colleague Grit Preusse take eggs out of the refrigerator to demonstrate their technique.
The eggs have already been incubated for three days and blood vessels had by now formed.
"But not the nerve cells, so they can't feel pain," Steiner explained.
The team believes that from an ethical point of view, it is preferable to decide the chick's fate before, rather than after, it hatches.
Using a laser beam, the scientists trace a small circle at the top of an egg, which makes a little hole in the shell. Through this they can see veins in the yolk, as well as detect the flutter of a tiny beating heart.
The egg is then placed in a large black box -- the spectrometer -- and quickly, the biochemical properties of the embryo's blood are displayed on a screen.
"To the naked eye, we can't see the difference (between male and female embryos) but the computer can, if it's programmed to do so," said Steiner.
His team has been fine-tuning the programme over the past few years, and they now have it down to an identification accuracy rate of 95 percent.
In a process that should ultimately take just a few minutes, an egg containing a male chick is discarded pre-birth, while one containing a female chick is fixed up with a plaster and then returned to the incubator.
A few days later, a chick that will one day be a laying hen hatches.
Steiner believes that some use will eventually be found for the unwanted male embryos -- be it as fish feed or even in shampoo.
- 'Piling on pressure' -
Beyond the challenge of finding a technique that is minimally invasive and which would allow the female "chicks to hatch and be in good health", another important factor is that the method has to have the potential to be automated, said Preusse.
The plan is to have a machine bore a hole in the egg, while another machine identifies the gender, fixes up the female eggs and removes the male ones.
A start-up in Dresden is currently working on developing the machines, which could one day be used by poultry farmers.
But one big question is - when?
In Germany, the timing also has political resonance.
With a public that is increasing concerned about animal welfare, Agriculture Minister Christian Schmidt had promised that by 2017, male chicks would no longer be sent to be crushed.
At the same time, Schmidt is refusing to impose an outright ban, and is rather counting on Steiner's research -- which the ministry is funding -- to deliver.
"The politicians are piling on pressure ahead of the 2017 elections," said Steiner, who said he was getting phone calls "every week" from the ministry, eager for an update.