Centennial, Colo. (ABC News) -- A Colorado student who may have been seeking revenge against a teacher barged into his school with a shotgun on Friday, set off an explosive device and opened fire, wounding two students, one of them seriously.
The gunman, a senior at Arapahoe High School in Centennial, Colo., then turned the shotgun on himself and died at the scene. A 15-year-old girl was in critical condition at a local hospital and the other student was not seriously injured, police said.
Arapahoe County Sheriff Grayson Robinson said late Friday that investigators are following preliminary information that the shooter may have been out for "revenge" against a male teacher with whom he may have had a recent "confrontation or disagreement."
The shooter is Karl Pierson, age 18, federal and local officials confirmed to ABC News. The names of the two students who were injured were not released.
The gunman entered the school just after 12:30 p.m., asking students where to find a specific teacher, according to police.
One explosive device, described as a Molotov cocktail, was detonated inside the school, the sheriff said, while a second device was later disabled by authorities.
"It was clear that he was armed with shotgun, no effort to hide or conceal it," Robinson said.
Tait Priser, a witness, told ABC News the suspect was wearing a black face cover and a black hoodie.
The school's custodian saw the gunman enter the building carrying a shotgun slung over his shoulder.
"I did see a young man...entering the building, running kind of military style and I looked and I double looked and [he was carrying a] shotgun," Fabian Llerenas told ABC News affiliate KMGH-TV.
Walking the halls calling out the teacher's name, the gunman found the teacher in the school's library. When the man saw the student he fled and the gunman took a shot at him.
"So when he did that he took one shot at him and missed his head, and he said he felt the wind just go up and down," Llerenas said. The custodian then helped the teacher escape in his truck, after the man helped evacuate students.
Police initially said one of the students was wounded while confronting the gunman, but Arapahoe County Sheriff Grayson Robinson said it was no longer clear how the students got shot.
One of the students was a 15-year-old female who is in serious condition and undergoing surgery. The second was taken to a nearby hospital with a minor wound. Robinson said he has since been released.
As shots rang out, the school was immediately placed on lockdown, with teachers dimming the lights and locking their classroom doors.
"I was in math and it happened three classrooms away," said student Berny Acosta from a nearby church where evacuated students assembled.
"There was a first shot and it happened from a classroom, and then I heard three or four more. There was a shot and then a pause and then four continuous shots. We went immediately into lockdown.... Turned all the lights off, got as far from the windows and doors as we could," Acosta told ABC News.
"I saw blood on the ground of the study center when evacuated. That's where there was a lot of blood on the ground. That's where the ambulance carried people out from," he said.
Within minutes, police were on the scene looking for the gunman. Robinson said it was just five minutes between the time the school resource officer reported the shooting and found the suspect's body.
The school is part of the Littleton school district and is just a few miles from Columbine High School, the scene of one of the country's worst school massacres, in which 15 people, including two teenage gunmen, were killed.
The shooting also took place on the eve of the first anniversary of the Sandy Hook school shooting in Newtown, Conn., in which 27 people - most of them first graders - were killed.
In a scene that was eerily reminiscent of the Columbine tragedy, hundreds of students could be seen fleeing the school and then approaching police with their hands up to be searched.
Investigators questioned the gunman's family and acquaintances but said they do not believe there are other suspects.
For more from ABC News, click here.