Story highlights The weapon the student had was a pellet gun

A 15-year-old was shot after brandishing a weapon in middle school hallways, officials say

An ambulance rushed him to a hospital, where he was pronounced dead, official says

A 15-year-old student was shot and killed by police after he brandished a weapon in the hallways of a south Texas middle school, officials said Wednesday.

"The student engaged the officers and was shot," the Brownsville Police Department said in a statement.

The weapon turned out to be a pellet gun, CNN affiliate KGBT reported.

But the weapon "certainly convinced the personnel on the scene of its potential threat to them," a Brownsville Police Department spokesman told the affiliate.

An ambulance was called, and it rushed the student to a local hospital, where he was pronounced dead, according to Israel Tapia, a spokesman for Cameron County Justice of the Peace Kip V. Johnson Hodge.

No other students or employees were injured.

School officials and students were sent to a nearby high school gymnasium for some time as authorities investigated the shooting.