Gun manufacturers Heckler & Koch scored a legal victory against the Defense Ministry on Friday when a court ruled they were not liable for damages over faulty assault rifles. Berlin had argued that the company's G36 rifle was unable to shoot straight in hot weather or when it becomes overheated from constant firing.

The court in the city of Koblenz rejected the government's call for the army to be compensated for the 3,845 rifles it ordered in two contracts dating back to 2013. The court ruled that Heckler & Koch had not reneged on what was promised in the agreement and that the military had failed to list its demands for the weapon to the gun maker.

Heckler & Koch is based in southwestern Germany and has been producing the G36 for around two decades, in which time it's become standard issue for a number of militaries around the world. The German military, or Bundeswehr, has used the gun consistently since 1997. A G36 rifle costs militaries about 1,000 euros ($1,120).

But beginning in 2012, reports out of Afghanistan emerged alleging that the weapon became less accurate during periods of continuous, rapid shooting. The Bundeswehr at first blamed faulty ammunition, but a 2015 study by the Fraunhofer Institute for High-Speed Dynamics revealed that the observed hit rate at a distance of 100 meters drops to just 7 percent in temperatures over 30 degrees Celsius (86 degrees Fahrenheit). The Bundeswehr had called for 90 percent accuracy under these conditions.

In light of this news, Defense Minister Ursula von der Leyen ordered the G36 in its current form be phased out of use by German soldiers.

Bundeswehr beset by lack of equipment

This was part of a string of equipment problems for the Bundeswehr, such as the embarrassing revelation in January that only 29 of its 93 Tornado fighter jets were available for reconnaissance missions conducted on "Islamic State" (IS) terrorists, and that even those that were functional could not fly at night because of faulty cockpit lights.

The German army has the right to appeal the verdict, but has said the outcome will have no bearing on the decision to pull the gun from its ranks.

es/sms (AFP, dpa)