BROWNSVILLE, Texas (AP) — On a doorstep outside a family home, a father wondered why police had to shoot his son in the hall of the boy’s middle school. In an office across town, a police chief insisted that his officers had no choice.

And scores of others in this Texas border city wondered: Could the death of 15-year-old Jaime Gonzalez have been prevented?

A day after police fatally shot an eighth-grader who was brandishing a realistic-looking pellet gun, his anguished parents pleaded for answers, demanding to know why police didn’t try a Taser or beanbag gun before resorting to deadly force.

In front of the family home, the father lamented his loss and called on authorities to explain their actions.

“Why three shots? Why one in the back of the head?” asked Jaime Gonzalez Sr.

Some standoffs with police last three or four hours, he said. This one “took not even half an hour.”

But there was broad agreement among law enforcement experts: If a suspect raises a weapon and refuses to put it down, officers are justified in taking his life. The shooting also raised questions about whether pellet guns should be marked in a way that would easily distinguish them from real handguns.

Brownsville interim Police Chief Orlando Rodriguez denied the family’s accusations that the boy had been shot in the back of the head. He defended his officers, saying that the younger Gonzalez pointed the pellet gun at police and repeatedly defied their commands to put it on the floor.

Officers spoke with the boy’s parents Thursday and exchanged information with them, the chief said.

Authorities also released a 911 recording from Cummings Middle School. The assistant principal on the phone first says there’s a student in the hall with a gun, then reports that he is drawing the weapon and finally that he is running down the hall.

On the recording, police can be heard yelling: “Put the gun down! Put it on the floor!” In the background, someone else yells, “He’s saying that he is willing to die.”

Before police arrived, school administrators had urged Jaime to give up the gun. When officers got to the school, the boy was waiting for them, Rodriguez said.

Moments before he was killed, Jaime began to run down a hallway, but again faced officers. Police fired down the hallway — a distance that made a stun gun or other methods impractical, Rodriguez said.

If the situation had involved hostages or a gunman barricaded in a room, police might have tried negotiations. But instead, Rodriguez stressed, this was an armed student roaming the halls of a school.

The two officers who fired have been placed on administrative leave — standard procedure in police shootings. Rodriguez expected them back at work soon.

Under federal law, pellet or BB guns must be sold with an orange band around the tip of the barrel so they can be distinguished from real weapons. But law enforcement experts say users often remove the bands, and the coloring can sometimes be hard to see.

Gonzalez’s gun had no markings, according to Rodriguez.

Cary Young, a program coordinator at Sam Houston State University’s Law Enforcement Management Institute, said pellet guns are often painted black so the orange tip no longer shows up. An officer dealing with someone holding such a gun has no choice but to consider it a deadly weapon, he said.

“If a reasonable officer believes it’s a deadly weapon, he has the right to protect himself and others,” said Young, a police officer in Texas for 20 years.

California considered legislation last year that would have made the state the first to require that BB and pellet guns to be made entirely with bright colors, but lawmakers did not approve the measure.

The bill was proposed after a Los Angeles police officer shot a 13-year-old boy carrying a pellet gun in a park. The boy was paralyzed.

Although the gun — a replica of a Beretta handgun — had an orange tip, it could not be seen because the incident occurred at night, police said.

Los Angeles Police Chief Charlie Beck said the Brownsville shooting appears to be another in a series of incidents that might have been prevented if pellet and BB guns looked different from other weapons.

“Nobody can give me a legitimate downside to this,” said Beck, who testified in support of the failed California legislation. “Does it hurt the sport? No. For me, this is just another way to keep folks safer.”

The Brownsville shooting unfolded quickly Wednesday just as students were beginning their first-period classes. The boy walked into one room and randomly punched a classmate in the nose.

School staff saw the gun in his crotch and called police. The building was swiftly locked down, and the shots were heard a short time later.

Gonzalez said his son was not a bad kid, an assessment supported by the district superintendent.

The teen was a drum major whose band instructors had recently praised his achievements to his parents, his stepmother Noralva Gonzalez said.

She showed off a photo on her phone of a beaming Jaime in his drum major uniform standing with his band instructors. Then she flipped through three close-up photos she took of bullet wounds in her son’s body.

Jaime’s father said he didn’t know where Jaime got the gun. Police believed it was a gift, and a friend of the boy’s, Star Rodriguez, said Jaime told her that. But she didn’t know who gave it to him.

His parents said they would never give him a gun.

On Thursday, they waited for authorities to release Jaime’s body to a funeral home so they could hold a wake in a church near the family’s home. Throughout the day, Jaime’s friends stopped by the house to visit his family.

The school was closed Thursday while police finished their crime-scene investigation. Students were bused instead to a new elementary school that was recently completed on the outskirts of Brownsville but had not yet been used.

District spokeswoman Drue Brown said 17 counselors were working with students and staff. Cummings has a student body of about 750, but only 200 students came to classes Thursday.