A US Border Patrol agent has pleaded not guilty to second-degree murder in the fatal shooting of a Mexican teen across the border fence.

Lonnie Swartz entered the plea during his arraignment on Friday in federal court in Tucson. He was allowed to remain free pending trial but he must surrender his Border Patrol pistol and not travel outside Arizona and Nevada.

Swartz was charged on 23 September and has been placed on administrative leave, nearly three years after he fatally shot 16-year-old José Antonio Elena Rodríguez.

Elena Rodríguez was near the fence in Nogales, Sonora, when Swartz shot him from the Arizona side.

The Border Patrol has said Swartz was being attacked by rock-throwers, a potentially deadly situation.

Elena Rodríguez’s family denies he was involved.