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.

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.