Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

The Supreme Court ruled Tuesday that the parents of a 15-year-old boy cannot sue the federal agent who fatally shot him by firing across the border separating the United States and Mexico — a case that inflamed tensions over border security.

The ruling was a defeat for the parents of Sergio Hernández Güereca, who was on the Mexico side when he was killed in 2010 by a Border Patrol agent who fired from the U.S. side of the boundary separating El Paso, Texas, from Juarez, Mexico.

The teen, a Mexican national, was playing with three friends in the concrete culvert that separates the two cities. They dared one another to cross the unmarked border, run up and touch the fence on the U.S. side, then run back to the Mexican side.

Jesus Hernandez and Maria Guadalupe Guereca, the parents of Sergio Hernandez Guereca, outside the Supreme Court in Washington on Nov. 12, 2019. Andrew Chung / Reuters file

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Border Patrol agent, Jesus Mesa Jr., detained one of the boys for illegal border crossing, but Hernández ran away and made it back to the Mexican side. Mesa drew his weapon and fired from about 60 feet away, killing the 15-year-old with a shot to the head.

An investigation by American authorities concluded that Mesa fired in self-defense in response to smugglers who were throwing rocks at him, although it found no evidence that Hernández threw anything at the agent.

Mexican prosecutors charged Mesa with murder. When the U.S. refused an extradition request, the parents sued. American courts threw their case out, however, concluding that the Constitution's protection against excessive force did not apply to someone outside the United States.

Writing for the Supreme Court's five-member conservative majority, Justice Samuel Alito said the court would not extend the reach of federal law into claims against U.S. law enforcement actions that have effects in other countries.

"A cross-border shooting is by definition an international incident," Alito wrote, calling for a diplomatic solution, not a legal one. He said it is up to Congress, not the courts, to decide the scope of civil rights law in such contexts.

In a dissent for the court's four more liberal members, Justice Ruth Bader Ginsburg said the lawsuit should have been allowed because the agent was on U.S. soil when he fired the shot.

"It scarcely makes sense for a remedy trained on deterring rogue officer conduct to turn on the happenstance subsequent to the conduct — a bullet landing in one half of a culvert, not the other," she wrote.

Lee Gelernt, an attorney with the American Civil Liberties Union who argued the case, disagreed with the ruling.

"The gravity of this ruling could not be clearer given the Trump administration"s militarized rhetoric and policies targeting people at the border. Border agents should not have immunity to fatally shoot Mexican teenagers on the other side of the border fence," Gelernt said. "The Constitution does not stop at the border."