By Jon Herskovitz

AUSTIN, Texas (Reuters) - A 14-year-old girl, who shot a female schoolmate last week at a high school in west Texas and then died of a self-inflicted gunshot wound, intended to shoot her 14-year-old stepbrother, police said on Wednesday.

The schoolmate, who is 17, noticed the girl raising a handgun and ran for cover. The 14-year-old girl began shooting, hitting the schoolmate in the lower body as she fled before turning the gun on herself, said police in Alpine about 200 miles southeast of El Paso.

The names of the students involved in the Sept. 8 incident that stunned the rural town of about 6,000 people have not been released. The 17-year-old female has been treated for her wounds and is expected to fully recover.

The shooter is thought to have moved to Alpine, with her family about six months ago, police said. The stepbrother was not injured in the incident. Police have not given a reason why the girl intended to shoot her stepbrother.

The girl was found dead in a bathroom, with a 9-mm pistol recovered nearby. She brought the gun from home to the school in her backpack along with 18 rounds of ammunition, police said, adding that she had fired five rounds.

Police interviewed almost all of the 290 students at Alpine High School as a part of their investigation.

"It's not supposed to happen here. It has got us all in shock," Brewster County Sheriff Ronny Dodson told reporters last week. "This is Alpine. It is a peaceful place to live and come."

The United States has long been plagued by shootings at schools and colleges, some of which have claimed dozens of lives. The deadliest mass school shooting was in 2007, when a gunman killed 32 people at Virginia Tech. In 2012, a gunman shot dead 20 children and 6 educators at Sandy Hook Elementary School in Newtown, Connecticut.

The deadliest attack on a U.S. high school occurred in Littleton, Colorado, in 1999, when a pair of heavily armed teenagers shot dead 12 students and a teacher at Columbine High School, wounding 20 others.

(Reporting by Jon Herskovitz; Editing by Jeffrey Benkoe)