A student who opened fire at a US high school has died after apparently turning the gun on herself.

Sheriff Ronnie Dodson confirmed the death of the female student at Alpine high school to NBC KWES.

The girl had reportedly shot another female student in the school's toilets before taking her own life.

The victim is alive and being treated for her injuries, local media said.

A police officer is also reported to have been injured after he was accidentally shot by "friendly fire" from another officer during the response.

All three schools in the small town were placed on lockdown after the shooting at the high school this morning.