Scott G Winterton, Deseret News
FILE - Police investigate a teen shot in argument near Union Middle School in Sandy on Tuesday, Oct. 25, 2016. A 14-year-old boy charged with attempted murder will be kept in detention despite his attorney's arguments that he is a young first-time offender.

WEST JORDAN — A 14-year-old boy charged with attempted murder at a Sandy school will be kept in detention despite his attorney's arguments that he is a young first-time offender.

As the boy made his initial appearance Thursday, which had been twice delayed as his attorney sought to close all hearings to the public, she asked that her client be released to home detention.

"He is a first-time offender in juvenile court, he is only 14 years old, he's having a lot of problems being held in detention. We do believe this is a very severe case of bullying," defense attorney Sophia Moore told the judge.

Prosecutor Thaddeus May opposed the request, saying that in light of the serious allegations in the case, holding the boy in detention is "the only responsible path for the court."

"Obviously this is a very, very serious offense, one for which, but for the grace of God, we would have a dead child," May said.

The boy has been held since his arrest more than a month ago. The Deseret News has opted not to name the 14-year-old at this time.

According to police, the 14-year-old and Joshua Cordova, a 16-year-old Hillcrest High student, met for a fight on the north end of the Union Middle School grounds, 615 E. 8000 South, just as class was letting out on Oct. 25.

The teen is charged with shooting the older boy in the head, and then shooting him again after he fell to the ground. A teacher who was outside the school when the shooting happened told detectives at least three shots were fired, and the teen attempted to fire a fourth round but the gun jammed, charging documents state.

Cordova survived the shooting.

According to police, the boys were arguing over a girl, and the 14-year-old boy instigated much of the confrontation.

Attorneys said Thursday they are awaiting intake reports, expected later this month, before scheduling certification or preliminary hearings. The 14-year-old will return to court for a status conference on Jan. 3.

Salt Lake County District Attorney Sim Gill has said he will seek to have the teenager certified to face the charges in adult court. The 14-year-old is charged with attempted murder, a first-degree felony; discharge of a firearm causing serious injury, a first-degree felony; discharge of a firearm, a third-degree felony; and possession of a gun on school property, a class A misdemeanor.

The shooting at Union Middle School is just one of several recent cases involving violence by juveniles in recent weeks.

• Just hours prior to the hearing Thursday, police say a 15-year-old student brought two guns to Mueller Park Junior High School in Bountiful, sending the school into lockdown after at least one shot was fired. His parents, who went to the school after noticing the weapons were missing, are credited with grabbing and detaining the boy before police arrived.

• Third District Juvenile Judge Kim Hornak agreed to seal charges filed against three ninth-grade students accused of stealing a car and hitting and killing West Valley police officer Cody Brotherson as they fled on Nov. 6. Brotherson was attempting to place a spike strip to stop the car when he was struck, according to police.

• On Nov. 15, a 16-year-old boy was arrested in Orem after police said he stabbed five classmates in a locker room at Mountain View High School, then turned the knife on himself. The 16-year-old and all five victims survived the stabbings. A competency evaluation has been ordered for the teen, who Alpine School District officials have said was a straight-A student with no disciplinary record. The boy had been home-schooled prior to enrolling at the high school in August.