A divided Supreme Court ruled Tuesday in favor of a Border Patrol agent who faced a lawsuit from parents of a Mexican child he killed in a June 2010 cross-border shooting.

Jesus Mesa Jr. and the parents of 15-year-old Sergio Adrián Hernández Güereca gave different accounts of what happened, with the parents claiming the teen and his friends were playing a game where they ran back and forth across the border, and Mesa claiming they threw rocks at him during an illegal border-crossing attempt. The Supreme Court's 5-4 ruling said that regardless of the circumstances, precedent regarding lawsuits against officers, known as "Bivens claims," does not apply to cross-border shootings.

TRUMP SAYS SOTOMAYOR, GINSBURG SHOULD RECUSE THEMSELVES FROM CASES DEALING WITH HIS ADMINISTRATION

"As we have made clear in many prior cases," Justice Samuel Alito wrote in his opinion, "the Constitution’s separation of powers requires us to exercise caution before extending Bivens to a new 'context,' and a claim based on a cross-border shooting arises in a context that is markedly new."

In the 1971 opinion Bivens v. Six Unknown Fed. Narcotics Agents, the Supreme Court held that a person claiming they were unlawfully arrested and searched could bring a lawsuit under the Fourth Amendment, even if there was no statutory basis for it. In Tuesday's opinion, Alito noted the high standard of extending Bivens to a "new context" and gave several reasons why it was inappropriate in this case.

The first factor was the impact a lawsuit in such a case could have on foreign relations.

"A cross-border shooting is by definition an international incident; it involves an event that occurs simultaneously in two countries and affects both countries’ interests," Alito wrote. "Such an incident may lead to a disagreement between those countries, as happened in this case." The U.S. had determined that Mesa should not face criminal charges or be extradited to Mexico.

“To avoid upsetting the delicate web of international relations, we typically presume that even congressionally crafted causes of action do not apply outside our borders," the opinion said. “These concerns are only heightened when judges are asked to fashion constitutional remedies. Congress, which has authority in the field of foreign affairs, has chosen not to create liability in similar statutes, leaving the resolution of extraterritorial claims brought by foreign nationals to executive officials and the diplomatic process.”

Alito also pointed to concerns with the court getting involved with matters of national security.

"Since regulating the conduct of agents at the border unquestionably has national security implications, the risk of undermining border security provides reason to hesitate before extending Bivens into this field," he said.

The court also pointed to Congress' history of not awarding damages in cases against federal officials where the injuries took place outside the U.S. While Mesa was on American soil at the time, Hernández was on the Mexican side of the border when Mesa shot him.

In a concurring opinion, Justice Clarence Thomas asserted that "the time has come to consider discarding the Bivens doctrine altogether," noting that the court "has consistently refused to extend the Bivens doctrine for nearly 40 years, even going so far as to suggest that Bivens and its progeny were wrongly decided."

CLARENCE THOMAS REVERSES COURSE IN SWIPE AT DC BUREAUCRACY

Justice Ruth Bader Ginsburg pushed back in a dissent joined by Justices Stephen Breyer, Elena Kagan and Sonia Sotomayor.

"Neither U.S. foreign policy nor national security is in fact endangered by the litigation. Moreover, concerns attending the application of our law to conduct occurring abroad are not involved, for plaintiffs seek the application of U.S. law to conduct occurring inside our borders," Ginsburg argued.

Ginsburg also pointed to the facts of the case, specifically how Hernandez had been running back and forth across the border prior to being shot. The liberal justice noted that the only reason why the majority rejected his family's claim is that he happened to be on the Mexican side when he was shot.

CLICK HERE TO GET THE FOX NEWS APP

"But Hernández’s location at the precise moment the bullet landed should not matter one whit," Ginsburg wrote.

The Supreme Court's decision upheld those from the District Court and the Fifth Circuit Court of Appeals. This was the second time this case had gone before the Supreme Court. In 2017, the court declined to rule and sent the case back down to the Fifth Circuit for reconsideration in light of the Supreme Court’s ruling in another matter that dealt with Bivens claims.