Police in Texas have shot dead a 15-year-old boy carrying an air-powered pellet gun, saying he had refused to lower the weapon after a classroom fight.

Jaime Gonzalez, an eighth grade student, was in possession of what looked like a handgun when police went to Cummings middle school in Brownsville, the acting police chief, Orlando Rodriguez, said.

He said that, before the confrontation with police, Gonzalez had walked into a classroom and punched another boy in the nose. "He had plenty of opportunities to lower the weapon … and he didn't want to," Rodriguez added.

Two officers fired three shots, hitting Gonzalez at least twice, he said. The autopsy results are pending.

His parents demanded to know why officers took lethal action.

"Why was so much excess force used on a minor?" Jaime Gonzalez Sr, his father, asked outside the family home. "Three shots. Why not one that would bring him down?"

His mother, Noralva Gonzalez, 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 including one in the back of the head.

"What happened was an injustice," she said angrily. "I know that my son wasn't perfect, but he was a great kid."

Rodriguez said his officers had every right to do what they did to protect themselves and other students.

Robert Valle, one of the students locked down in classrooms during the confrontation, said he had heard police run down the corridor and shout "put the gun down" before several shots were fired.