MEXICO CITY -- A U.S. federal judge on Friday dismissed a lawsuit brought by the Mexican government against U.S. gun manufacturers arguing their commercial practices has led to bloodshed in Mexico.

Judge F. Dennis Saylor in Boston ruled Mexico's claims did not overcome the broad protection provided to gun manufacturers by the Protection of Lawful Commerce in Arms Act passed in 2005.

The law shields gun manufacturers from damages "resulting from the criminal or unlawful misuse" of a firearm.

"While the court has considerable sympathy for the people of Mexico, and none whatsoever for those who traffic guns to Mexican criminal organizations, it is duty-bound to follow the law," Saylor wrote.

Mexico's Foreign Affairs Ministry said it would appeal the decision "and continue insisting that the sale of guns be responsible, transparent and accountable, and that the negligent way in which they are sold in the United States facilitates criminals' access to them."

Mexico was seeking at least $10 billion in compensation, but legal experts had viewed the lawsuit as a long shot.

The Mexican government argued that the companies know their practices contribute to the trafficking of guns into Mexico and facilitate it. Mexico wants compensation for the havoc the guns have wrought on its people.

Among those sued were some of the biggest names in guns, including: Smith & Wesson Brands Inc., Barrett Firearms Manufacturing Inc., Beretta U.S.A. Corp., Colt's Manufacturing Company LLC and Glock Inc.

Another defendant was Interstate Arms, a Boston-area wholesaler that sells guns from all but one of the named manufacturers to dealers around the U.S.

The Mexican government estimates 70 per cent of the weapons trafficked into Mexico come from the U.S., according to the Foreign Affairs Ministry. It said that in 2019 alone, at least 17,000 homicides in Mexico were linked to trafficked weapons.

Mexico argued the U.S. protection act did not apply when an injury occurred outside the United States.

Saylor did not agree.

"Mexico is seeking to hold defendants liable for practices that occurred within the United States and only resulted in harm in Mexico," he wrote. "This case thus represents a valid domestic application of the PLCAA, and the presumption against extraterritoriality does not apply."

The sale of firearms is severely restricted in Mexico and controlled by the Defense Department. But thousands of guns are smuggled into Mexico by the country's powerful drug cartels.