WASHINGTON (Reuters) - The U.S. Supreme Court on Tuesday barred a lawsuit against a Border Patrol agent for fatally shooting a 15-year-old Mexican boy on Mexican soil from across the border in Texas, refusing to open the door for foreign nationals to pursue civil rights cases in American courts in such incidents.

With its conservative justices in the majority and its liberal justices dissenting, the court voted 5-4 to uphold a lower court’s dismissal of the lawsuit against the agent, Jesus Mesa, who was standing on the U.S. side of the border when he shot Sergio Adrian Hernandez Guereca in the face in 2010.

The boy’s family sued in federal court seeking monetary damages, accusing Mesa of violating the U.S. Constitution’s Fourth Amendment ban on unjustified deadly force and the Fifth Amendment right to due process.

The ruling, which matched the position taken by President Donald Trump’s administration in the case, also ended litigation involving a similar incident in which a Border Patrol agent fatally shot a 16-year-old Mexican named Jose Antonio Elena Rodriguez from across the border in Arizona.

“To be left with no remedy ... given such a violent and unprovoked shooting weakens the constitutional foundation of America’s house,” said Robert Hilliard, a lawyer for Hernandez’s family, adding that the ruling could “promote a Wild West attitude on our border.”

The decision prevents civil rights lawsuits in U.S. federal courts involving such cross-border incidents when the person who is injured or killed is not on American soil.

Later on Tuesday, the Mexican government said it is deeply concerned about the effects this decision will have on similar cases in which its citizens have died from gunshots fired by U.S. agents towards the Mexican side.

“The gravity of this ruling could not be clearer given the Trump administration’s militarized rhetoric and policies targeting people at the border,” said Lee Gelernt, a lawyer for the American Civil Liberties Union, which represents the Rodriguez family.

The ruling was issued at a time of high tensions involving the southern border, where Trump is pursuing construction of a wall separating the United States and Mexico.

Justice Samuel Alito, writing for majority, said the case presented “foreign relations and national security implications” and noted that Congress should decide whether such lawsuits can be permitted.

Alito added that the United States and Mexico have sought to resolve border issues through diplomacy and that U.S. Border Patrol agents have a key role in protecting national security, including illegal cross-border traffic.

‘SCARCELY MAKES SENSE’

The incident took place on the border between El Paso and Ciudad Juarez in Mexico. Hernandez was in a culvert located right on the border, just on the Mexican side.

Slideshow ( 3 images )

In a dissenting opinion on behalf of the court’s liberals, Justice Ruth Bader Ginsburg dismissed the national security concerns cited by the conservative majority.

“Mesa’s allegedly unwarranted deployment of deadly force occurred on United States soil. It scarcely makes sense for a remedy trained on deterring rogue officer conduct to turn upon a happenstance subsequent to the conduct - a bullet landing in one half of a culvert, not the other,” Ginsburg wrote.

The U.S. Customs and Border Protection agency had no immediate comment. A lawyer for Mesa could not immediately be reached for comment.

Slideshow ( 3 images )

Conservative Justice Clarence Thomas wrote a separate opinion, joined by fellow conservative Neil Gorsuch, agreeing with the outcome but calling for the court to throw out a broader precedent from 1971 that allows people to sue federal officials individually for civil rights violations.

The Supreme Court has been reluctant to extend the scope of civil rights protections. For example, it ruled in 2017 that U.S. officials who served under former President George W. Bush could not be sued over the treatment of non-U.S. citizen detainees rounded up in New York after the Sept. 11, 2001 attacks.

Mesa did not face criminal charges, though Mexico condemned the shooting. The Border Patrol has said Hernandez was pelting U.S. agents with rocks from the Mexican side of the Rio Grande when he was shot. The FBI also said Hernandez was an immigrant smuggler, guiding illegal immigrants into the United States.

The lawyers for Hernandez’s family disputed that account, saying he was playing a game in which a group of teenagers would run across the culvert from the Mexican side and touch the U.S. border fence before running back.