Updated

A school official says an 18-year-old brought a gun inside a Houston high school and shot another student in the leg despite metal detectors on the campus.

North Forest school district spokeswoman Sue Davis says the 16-year-old who was shot was taken to a hospital in stable condition Tuesday. She says the shooter was detained by a government teacher who also happens to work as a deputy constable.

Davis says the teacher wrapped up the 18-year-old senior without a struggle. The student was taken into police custody.

Davis says the 16-year-old didn't appear to be the shooter's intended target but couldn't immediately say if there was another target or if the shooting was accidental.

The school's metal detectors are only turned on in the morning. The shooting happened around lunchtime.