Border Patrol agent Lonnie Swartz, left, walks into court in Tucson, Ariz., in this 2014 file photo.

A divided federal appeals court in San Francisco ruled Tuesday that a U.S. Border Patrol agent can be sued by the family of a Mexican teenager, who was shot to death in a 2012 cross-border incident.

Border Patrol agent Lonnie Swartz had sought qualified immunity, arguing that he was on American soil when he fired on 16-year-old Jose Antonio Elena Rodriguez in Nogales, Mexico. But the appeals court accepted the family’s explanation the boy was not committing any crime or posing any threat to the federal officer, despite assertions by Swartz’s attorneys that Elena Rodriguez was lobbing rocks across the border during a drug smuggling attempt.

“[Elena Rodriguez] was not suspected of any crime, was not fleeing or resisting arrest and did not pose a threat to anyone, the use of force was unreasonable under the Fourth Amendment,” the court stated in its 72-page opinion, adding that no reasonable officer could have thought that he should shoot the boy.

The 2-1 majority added, “We cannot imagine anyone whose conscience would not be shocked by the cold-blooded murder of an innocent person walking down the street in…