EDINBURG — As she saw her 15-year-old grandson escorted in handcuffs and shackles into a courtroom Friday afternoon, Irma Bermudez choked back tears.

The grandmother remembered the child she raised and wondered where things went wrong as he stood accused of leading a chase with Department of Public Safety troopers while behind the wheel of a truck loaded with Guatemalan immigrants in October 2012. Two immigrants died when a trooper opened fire on the truck from a helicopter.

“I don’t know if it was the fact that his mother was never there or the friends he keeps, I just don’t know,” Bermudez said after her grandson was ordered into detention by 449th State District Judge Jesse Contreras.

U.S. Border Patrol agents arrested the teen, whose name was not released because he is underage, about 2:30 a.m. Thursday after a chase that ended near Sullivan City, the agency said.

Fleeing from authorities is what thrust this particular teen into the spotlight Oct. 25, 2012, when authorities said he was driving a red pickup truck with nine immigrants in the back.

Attempting to pop the truck’s tires, a Department of Public Safety sharpshooter opened fire on the truck from a helicopter that was trying to shoot out the tires, thinking the truck was loaded with drugs — not people. Two Guatemalan nationals were fatally shot.

Hidalgo County District Attorney Rene Guerra said Friday that the sharpshooter, Miguel Avila, could still face charges in the case. A grand jury in recent weeks has been reviewing evidence in the case. Avila has returned to his duties as a state trooper.

The fatal shooting prompted DPS this year to end its practice of opening fire on fleeing vehicles during chases.

But after the fatal shooting, a second — slower — pursuit by authorities ensued, attempting to arrest the underage driver, who slipped from custody amid several apparent miscommunications about his identity by local law enforcement agencies.

In the hours following the controversial chase and fatal shooting, the teenager was released by authorities after a communication error between the various agencies investigating the case.

The teenager was arrested on Dec. 7, 2012 after McAllen police arrested him on a theft charge, records show.

After the teen went through the juvenile court system on nine counts of human smuggling, Contreras said he decided that rather than spend taxpayers’ money in keeping the teenager locked up, he moved to have the teen released on probation so that federal authorities could deport him.

The teenager was released on June 6, but was once again detained by federal authorities June 15 and deported again. Upon hearing of several incidents where the teen broke the law, Contreras said he issued an arrest warrant for the boy.

“It was a choice I made at the time wanting to spend that money on a U.S citizen instead,” Contreras said after Friday’s court hearing. “Obviously, he didn’t learn his lesson and he’s been doing this two, three, four times, I am now going to take care of this and help this young man. If it is not done now he will never learn.”

Contreras said his staff is looking into a possible sentence where if the teen doesn’t learn his lesson as a juvenile, he would be transferred into the adult prison population after he becomes an adult.

On Friday, the teenager and Bermudez went before the judge, where he told them about the legal process that awaited them and ordered the teen be detained while he underwent a series of evaluations and tests before the case moved forward.

The grandmother said she has cared for the boy since he was just eight days old, when his estranged mother left him in her care.  

“He is a good boy; he was never disrespectful,” Bermudez said in Spanish as she wept after the hearing. “I just want someone to help him. I don’t want him doing bad things or hanging out with those friends he has.”