WASHINGTON – The Supreme Court on June 5 rejected Mexico’s attempt to hold U.S. gunmakers liable for violence and atrocities Mexican drug cartels have inflicted using their weapons.

The court unanimously ruled that firearms makers are protected by a federal law barring certain lawsuits against them.

"An action cannot be brought against a manufacturer if, like Mexico's, it is founded on a third-party's criminal use of the company's product," Justice Elena Kagan wrote for the court.

The decision landed against a backdrop of strained diplomatic relations between the United States and Mexico. President Donald Trump wants Mexico to do more to stop illegal drugs from flowing into the United States and Mexico wants to stop illegal arms from flowing south. Mexico has maintained tighter regulations on firearms than its neighbor to the north.

First Supreme Court ruling on law protecting gunmakers

The case was also the first time the Supreme Court ruled on a 2005 law that shields gunmakers from liability for crimes committed by third parties.

An exception in the Protection of Lawful Commerce in Arms Act allows suits if a gunmaker is accused of knowingly violating a state or federal law.

Attorneys representing Mexico argued that gun companies are “aiding and abetting” the trafficking of hundreds of thousands of high-powered firearms into Mexico through deliberate design, marketing and distribution choices.

That includes doing business with dealers who repeatedly sell large quantities of guns to cartel traffickers, Mexico's counsel alleged.

Firearms makers, led by Smith & Wesson Brands, said the chain of events between the manufacture of a gun and the harm it causes after being sold, transported, and used to commit crime in Mexico involves too many steps to blame the industry. Guns made in the United States are sold to federally licensed distributors who sell them to federally licensed dealers – some of whom knowingly or negligently sell them to criminals who smuggle them into Mexico, where they end up in the hands of cartel members.

What the Trump administration means for you: Sign up for USA TODAY's On Politics newsletter.

Lower courts were divided over the issue

Mexico’s attorneys stressed that the suit was in its early stages and said Mexico should be allowed a chance to prove its allegations in court.

A federal judge in Massachusetts dismissed the suit, ruling it was barred by the Protection of Lawful Commerce in Arms.

But the Boston-based 1st U.S. Circuit Court of Appeals said the challenge met an exception in the law and could move forward. Mexico, it said, had adequately alleged the gunmakers “aided and abetted the knowingly unlawful downstream trafficking of their guns into Mexico.”

The Supreme Court disagreed, saying Mexico's lawsuit "closely resembles" the type of challenges Congress was trying to prevent.

If Mexico's suit meets the exceptions in the law, that would "swallow most of the rule," Kagan wrote.

Gunmakers `gratified' by ruling

Noel Francisco, the attorney who argued for the gunmakers before the court, said his clients make a "legal, constitutionally protected product that millions of Americans buy and use."

"And we are gratified that the Supreme Court agreed that we are not legally responsible for criminals misusing that product to hurt people, much less smuggling it to Mexico to be used by drug cartels," Francisco said in a statement after the ruling.

Mexico was seeking an unspecified amount of monetary damages, estimated in the range of $10 billion, and a court order requiring gun companies to change their practices.

Mexico will pursue other options

Pablo Arrocha Olabuenaga, the legal adviser for Mexico’s Foreign Ministry, said in a statement the country continues to pursue other avenues, including a pending lawsuit against gun dealers in Arizona.

“We are considering all options to expand and bring more legal actions, and we are convinced we will prevail,” he said.

Divided views from gun rights and gun violence prevention groups

Lawyers for gun rights groups had told the Supreme Court that Mexico's suit is an attempt to bankrupt the American firearms industry and undermine the Second Amendment.

“Thankfully, the Supreme Court saw through this thinly veiled attempt to wield the legal system as a cudgel against lawful commerce," said Adam Kraut, executive director of the Second Amendment Foundation.

Gun violence prevention groups worried the case could make it harder to bring domestic lawsuits against the gun industry.

David Pucino, legal director at GIFFORDS Law Center, said after the decision that the Supreme Court may have ended Mexico’s lawsuit but “the justices did not give the gun industry the broad immunity it sought.”

Pucino said the decision “does not affect our ability and resolve to hold those who break the law accountable.”

The case is Smith & Wesson Brands Inc. v. Estados Unidos Mexicanos.

This article originally appeared on USA TODAY: Supreme Court rules Mexico can't sue US gunmakers over cartel violence

Reporting by Maureen Groppe, USA TODAY / USA TODAY

USA TODAY Network via Reuters Connect