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

Quick-thinking students alerted the targeted teacher, who quickly left the building, and police immediately locked down the scene on the eve of the Newtown massacre anniversary, a sombre reminder of how commonplace school violence has become.

One of the wounded students, a girl, was hospitalized and in serious condition. The other student suffered minor injuries and was expected to be released from the hospital later Friday evening, Arapahoe County Sheriff Grayson Robinson said.

Robinson initially reported that the girl was wounded after confronting the gunman, but he later said that did not appear to be the case.

Another nearby hospital reported that it treated a third student who was not shot.

The gunman, later identified by authorities as 18-year-old Karl Pierson, made no attempt to hide the weapon when he entered the school from a parking lot and started 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 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 Molotov cocktails were also found inside the high school, the sheriff said. One of them detonated but the other didn't.

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 the gunman had acted alone.

Students comfort each other at Arapahoe High School in Centennial, Colo., on Dec. 13, 2013, where a student shot at least one other student at a Colorado high school Friday before he apparently killed himself, authorities said. (Ed Andrieski/Associated Press)

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 13 kilometres 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.

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 was family friends with 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," he said. "A lot of people, I couldn't see, but they were crying.

"I was scared," he said. "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.