The Supreme Court expressed concern Tuesday about the implications for U.S. foreign policy and national security if the families of Mexican teenagers killed by Border Patrol agents in cross-border shootings were allowed to sue in American courts.

The court was considering for a second time whether relatives of foreign victims injured on foreign soil can go to court without express authorization from Congress.

The case began with the death of 15-year-old Sergio Adrián Hernández Güereca, who was shot and killed by a federal agent in 2010 on the Mexican side of the wide concrete culvert that separates El Paso from Juarez, Mexico.

Chief Justice John G. Roberts Jr. noted that the Border Patrol’s investigation determined the agent, Jesus Mesa Jr., had not violated its policies. What message would it send, Roberts asked the lawyer for the teen’s family, if the court contradicted the agency’s findings by allowing the lawsuit to go forward.

“I thought the country was supposed to speak with one voice,” Roberts said.

Justice Neil M. Gorsuch seemed concerned that any right to sue would not be limited to law enforcement action but could subject to liability U.S. military and diplomatic operations overseas.

“Why would it be limited to law enforcement,” he asked, “as opposed to other governmental functions that happen here but happen to injure persons abroad?”

Attorney Steve Vladeck told the court that permitting the lawsuit to proceed would not undermine foreign relations or challenge Border Patrol policies but that there must be a way for victims’ families to hold individual officers accountable for using excessive force in violation of the Constitution.

“Not only was [the agent] standing on U.S. soil when he pulled the trigger, but he could not have known in that instant where the bullet would even land, let alone the nationality of anyone it might hit,” Vladeck said.

Courts have struggled with the cross-border nature of the case, and the Supreme Court’s precedents. In a 1971 case, the high court allowed people to sue over unconstitutional actions by federal officials, even if such suits had not been explicitly authorized by Congress. But since then, the court has been more likely to restrict that right.

When Hernández was killed, he had been playing with friends, running up a steep embankment on the U.S. side to touch a tall fence — and then racing back down the hill to Mexico. Mesa claimed the boys were throwing rocks at him, but cellphone video of the incident indicated that was not true.

Mesa grabbed one of Hernández’s friends and then, while holding on to him, fired at least two shots across the border, killing the unarmed teen.

The court’s liberals pressed Mesa’s lawyer to explain how the lawsuit interfered with U.S. foreign affairs.

“We have a rogue officer acting in violation of the agency’s own instruction, using excessive force to kill a child at play,” Justice Ruth Bader Ginsburg said. “How does that call into question any foreign policy or national security policy?”

Mesa’s lawyer, Randolph Ortega, said that allowing such a lawsuit to proceed would have a “chilling effect” on the Border Patrol’s day-to-day operations and that Congress, not the courts, should decide who gets to sue federal officials.

“The Border Patrol is the forefront of our national security,” he said.

Justice Sonia Sotomayor asked whether the officer could be sued if the teen had been standing on the U.S. side of the border.

“What makes it chilling to tell a Border Patrol agent don’t shoot indiscriminately at children standing a few feet from the border?”

The Justice Department filed a brief in support of the agent and emphasized the disruption to diplomatic discussions.

“The United States and Mexico have an active disagreement over what happened here,” Deputy Solicitor General Jeffrey B. Wall said.

Allowing the lawsuit to move forward, he said, would contradict the U.S. position in talks with Mexico and “does directly undermine the credibility of the executive branch in working with a foreign government.”

In response, Justice Elena Kagan asked what would be wrong with explaining: “We live in a country in which courts play an important role in determining whether conduct is lawful. And that’s not an embarrassment to the United States or to the executive branch,” she said.

In court on Tuesday were the teen’s parents, Guadalupe Güereca and Jesús Hernández. Their position is backed by human rights groups, civil liberties organizations and the Mexican government, which indicted Mesa for the killing. The United States has refused to extradite him.

According to a court filing from the Border Network for Human Rights, at least 90 people have died since 2010 “as the result of an encounter with U.S. border agents.”

“The U.S. government must finally be held to account for the lives its agents have taken at the border — regardless of which side of the line its victims happened to be standing on when they were killed,” Justin Mazzola of Amnesty International USA said in a statement.

The justices previously reviewed the case but failed to reach a conclusion in 2017. The court said it would be “imprudent” to decide until the U.S. Court of Appeals for the 5th Circuit reconsidered the case in light of a separate Supreme Court decision issued about the same time.

In that case, the high court reinforced protections for government officials, who are generally shielded from civil lawsuits when they have acted in good faith in carrying out their duties.

The 5th Circuit again upheld the lower court’s dismissal of the lawsuit and the family appealed. The second look by the Supreme Court comes after conflicting lower-court decisions in cases in Texas and Arizona, which also involved the fatal shooting of a teen by a Border Patrol agent. The outcome of the Texas case will influence what happens in Arizona.

The case is Hernández v. Mesa.

Robert Barnes contributed to this report.