A German court has ruled that the mass killing of newly hatched male chicks doesn't violate animal protection laws.

The center-left state government of North-Rhine Westphalia, Germany's most populous state, sought to ban the practice in 2013. Several hatcheries challenged the ban. The state's highest administrative court on Friday threw out appeals against lower-court rulings backing their position.

The court in Muenster found that German animal protection laws allow the killing of animals if there are "reasonable grounds."

Each year some 45 million male chicks in Germany are shredded shortly after hatching because they don't lay eggs.

Germany's federal government has rejected calls to ban the practice, but hopes to end it next year by encouraging technology that allows the chick's sex to be determined before it hatches.