A federal judge has scheduled an August hearing to determine whether statements made by a Border Patrol agent can be used in his trial for the fatal 2012 cross-border shooting of a Mexican teenager.

A grand jury last fall indicted Agent Lonnie Ray Swartz on a murder charge for shooting through gaps in the fence in Nogales and killing 16-year-old Jose Antonio Elena Rodriguez on Oct. 10, 2012. For the first time, court documents have made public the details of what occurred after Elena Rodriguez was shot.

Story Continues Below

Documents filed by prosecutors last week reveal that Border Patrol Supervisor Leo Cruz-Mendez said he was surprised to see Swartz at the fence on the night of the shooting. Swartz had been assigned to work at a nearby port of entry.

Cruz-Mendez told the grand jury that he told Swartz everything was OK after the shooting, but the agent began to vomit.

According to the documents, Swartz said people were throwing rocks from the other side of the fence and hit a police dog.

"I shot and there's someone dead in Mexico," he continued, and produced and empty ammunition magazine from his pocket, according to court records.

An autopsy conducted in Sonora, Mexico, showed that Elena Rodriguez was hit 10 times. U.S. Customs and Border Protection has refused to release surveillance camera footage of the incident.

Story Continues Below

It's not unusual for Border Patrol agents to move from where they are assigned in response to an incident, according to Shawn Moran, spokesman for the national Border Patrol union. The Nogales port of entry is only blocks from where Elena Rodriguez was killed.

U.S. District Court Judge Raner C. Collins has scheduled an Aug. 23 hearing on the admissibility of Swartz's initial statements and his responses to further questions from Cruz-Mendez. Prosecutors have argued that they should be admissible but Swartz's lawyers say they should be suppressed.

Swartz's attorneys say the agent was compelled to answer them to avoid disciplinary sanctions, including the possibility of being fired.

The trial has been delayed for the fourth time at the request of Swartz's lawyer Sean Chapman. It is now scheduled to start in February, nearly four years after the shooting.

Elena Rodriguez' family declined to comment through their lawyer after the case's most recent hearing.

© 2016 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.