Two students have been shot at a school in the US with the scene described as an active shooter situation. Courtesy FOX THIRTY ONE Denver

A TEENAGER who may have had a grudge against a teacher opened fire with a shotgun at a Colorado high school, wounding two students before killing himself.

Quick-thinking students 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 American schools.

Arapahoe County Sheriff Grayson Robinson identified the shooter on Friday night as 18-year-old Karl Halverson Pierson.

The shooter entered Arapahoe High School armed with a shotgun and looking for a teacher he identified by name, Sheriff Robinson said.

"(The teacher) knew he was the target and he left that school in an effort to try to encourage the shooter to also leave the school," the sheriff said. "That was a very wise tactical decision."

One of the wounded students, a girl, was taken to hospital in serious condition. The other student suffered minor gunshot-related injuries.

Two suspected Molotov cocktails were found inside the school, the sheriff said. One detonated but no one was injured.

Within 20 minutes of the report of a gunman, officers found the suspect's body inside the school, Sheriff Robinson said.

Students were seen walking toward the school's running track with their hands in the air, and television footage showed students being patted down.

Authorities concluded that Pierson had acted alone.

Nearby neighbourhoods were jammed with cars as parents sought their children.

Several 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.

The practice of sending law enforcement directly to an active shooting incident was developed in response to another Colorado school shooting that shook the nation: in 1999, two teenage shooters killed 12 classmates and a teacher at Columbine High School before killing themselves.

Arapahoe High School is 13 kilometres from Columbine.

More recently, a shooter killed 12 people at a movie theatre in Aurora, another Denver suburb, in 2012.

A slate of gun control measures, including ammunition magazine limits and expanded background checks, were this year approved by Colorado lawmakers.

Two state lawmakers were ousted in recall elections after voting for the measures, and a third resigned to avoid a recall. The backlash was a reflection of the divide in a state known for its hunting and where gun ownership is a treasured right.

"He had very strong beliefs about gun laws and stuff," junior Abbey Skoda, who was in a class with the alleged shooter in her freshman year, told The Denver Post.

"I also heard he was bullied a lot."

Arapahoe County Sheriff Grayson Robinson told reporters Pierson entered Arapahoe High School looking for a specific teacher by name.

Police are investigating reports he was after the teacher to settle a score after a confrontation.

"The student identified a specific teacher at the high school that he was interested in confronting, and that teacher was informed of the situation and exited the school quickly," he said.

Pierson has been described as a dedicated and bright student from a religious family who attends Bible study meetings, leaving those that knew him shocked.

"They're just a normal middle-class family, like many of the families around here," neighbour Diane Shea said.

Thomas Conrad, who had an economics class with the gunman, described him as a very opinionated Socialist.

"He was exuberant I guess," Conrad told The Denver Post.

"A lot of people picked on him, but it didn't seem to bother him."

Carl Schmidt and Brendon Mendelson, both seniors at Arapahoe High, said he had political views that were "outside the mainstream".

Schmidt said the shooter "was an outspoken kid about what he believed and a good political thinker."

Mendelson added: "He did have a lot of friends. He was popular with the people he knew."

Denver Post reporter Ryan Parker‏ tweeted the shooting happened in the cafeteria.

"Students are telling me at least two students were shot by another student in the cafeteria," Mr Parker said.

The school is home to more than 2000 students. Parents arrived at the scene frantically looking for word on the fate of their children.