CENTENNIAL, Colo. -- A teenager who may have had a grudge against a teacher opened fire Friday with a shotgun at a suburban Denver high school, wounding a fellow student before killing himself.

Quick-thinking students at Arapahoe High School alerted the targeted teacher, who quickly left the building. The scene unfolded on the eve of the Newtown massacre anniversary, a sombre reminder of the ever-present potential for violence in the nation's schools.

The wounded student, a 15-year-old girl, underwent surgery and was in critical condition. Authorities originally said a second student was wounded, but Arapahoe County Sheriff Grayson Robinson said Friday night that the other girl taken to a hospital was covered in blood from the first student and wasn't injured.

Robinson identified the shooter as Karl Halverson Pierson, 18. The sheriff did not elaborate on any possible motive except to say Pierson had a "confrontation or disagreement" with the teacher. He didn't know if the injured girl was intentionally shot.

Pierson made no attempt to hide his weapon after entering the school from a parking lot and asking for the teacher by name, Robinson said.

When the teacher learned that he was being targeted, he left "in an effort to try to encourage the shooter to also leave the school," the sheriff said. "That was a very wise tactical decision."

Jessica Girard said she was in math class when she heard three shots.

"Then there was a bunch of yelling, and then I think one of the people who had been shot was yelling in the hallway, 'Make it stop,"' she said.

Two suspected Molotov cocktails were also found inside the school, the sheriff said. Robinson said one was lit and thrown, but no one was injured.

The school was swiftly locked down. Within 20 minutes of the first report of a gunman, officers found Pierson's body inside the school, Robinson said.

Several other Denver-area school districts went into lockdown as reports of the shooting spread. Police as far away as Fort Collins, about a two-hour drive north, stepped up school security.

Arapahoe High students were seen walking toward the school's running track with their hands in the air, and television footage showed students being patted down. Robinson said deputies wanted to make sure there were no other conspirators. Authorities later concluded that Pierson had acted alone.

Nearby neighbourhoods were jammed with cars as parents sought out their children. Some parents stood in long lines at a church. One young girl who was barefoot embraced her parents, and the family began to cry.

The shooting came a day before the anniversary of the Newtown, Conn., attack in which a gunman killed 20 children and six adults at Sandy Hook Elementary School.

Arapahoe High stands just 8 miles east of Columbine High School in Littleton, where two teenage shooters killed 12 classmates and a teacher before killing themselves in 1999. The practice of sending law enforcement directly into an active shooting, as was done Friday, was a tactic that developed in response to the Columbine shooting.

Since Columbine, Colorado has endured other mass shootings, including the killing of 12 people in a movie theatre in nearby Aurora in 2012. But it was not until after the Newtown massacre that state lawmakers moved to enact stricter gun control laws. Two Democratic lawmakers were recalled from office earlier this year for backing the laws, and a third recently resigned to avoid a recall election.

The district attorney prosecuting the theatre shooting, George Brauchler, lives near Arapahoe High. At a news conference, he urged anyone who needed help to call a counselling service and gave out a phone number.

Tracy Monroe, who had step-siblings who attended Columbine, was standing outside Arapahoe High on Friday looking at her phone, reading text messages from her 15-year-old daughter inside.

Monroe said she got the first text from her daughter, sophomore Jade Stanton, at 12:41 p.m. The text read, "There's sirens. It's real. I love you."

A few minutes later, Jade texted "shots were fired in our school." Monroe rushed to the school and was relieved when Jade texted that a police officer entered her classroom and she was safe.

Monroe's brother knew a teacher killed in the Columbine shooting, Dave Sanders.

"We didn't think it could happen in Colorado then, either," Monroe said.

After hearing three shots, freshman Colton Powers said everyone "ran to the corner of the room and turned off the lights and locked the door and just waited, hoped for the best. A lot of people I couldn't see, but they were crying. I was scared. I didn't know what to do."

His mother, Shelly Powers, said she first got word of the shooting in the middle of a conference call at work.

"I dropped all my devices, got my keys and got in my car," she said. "I was crying all the way here."

More than 2,100 students attend Arapahoe High, where nine out of 10 graduates go on to college, according to the Littleton Public Schools website.

------

Associated Press writer P. Solomon Banda contributed to this report