A teenager who may have had a grudge against a teacher opened fire with a shotgun at a US high school, wounding two students before killing himself.
Quick-thinking students at Arapahoe High School in Denver, Colorado, 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.
One of the wounded students, a girl, was taken to hospital in a serious condition. The other student suffered minor gunshot-related injuries and was released from the hospital hours later, authorities said.
A third person was being treated for unspecified injuries but had not been shot, a hospital spokeswoman said.
Arapahoe County Sheriff Grayson Robinson initially reported that the most seriously hurt student was wounded after confronting the gunman, but he later said that did not appear to be the case.
Mr Robinson identified the gunman last night as Karl Halverson Pierson.
The gunman entered the school armed with a shotgun and looking for a teacher he identified by name, said Mr Robinson. The teacher immediately left the school when he learned the student was looking for him, he added.
"He 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."
Two suspected Molotov cocktails were also found inside the school, the sheriff said. One detonated, though no-one was injured.
Within 20 minutes of the first report of a gunman, officers found the suspect's body inside the school, Mr 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. Mr Robinson said deputies wanted to make sure there were no other conspirators. Authorities later concluded that the gunman 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.
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.
The practice of sending law enforcement directly into an active shooting was developed in response to another Colorado school shooting that shook the nation. In 1999, two teenage gunmen killed 12 classmates and a teacher at Columbine High School before killing themselves.
Arapahoe High School is just eight miles (13km) from Columbine.
More recently, a gunman killed 12 people at a cinema in Aurora, another Denver suburb, in the summer of 2012.
Earlier this year, Colorado's Democratic Legislature and governor approved a slate of gun control measures, including ammunition magazine limits and expanded background checks.
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.
At 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. Mr Robinson said deputies wanted to make sure there were no other conspirators but now believe the gunman acted alone.
The shooting came a day before the anniversary of the Newtown, Connecticut, attack in which a gunman killed 20 children and six adults at Sandy Hook Elementary School.
For one mother who rushed to Arapahoe High, it was her second experience with a school shooting.
Tracy Monroe, who had step-siblings who attended Columbine, was standing outside the school yesterday looking at her phone, reading text messages from her 15-year-old daughter inside.
Ms Monroe said she got the first text from her daughter, second-year student Jade Stanton, at 12.41 pm local time. The text read: "There's sirens. It's real. I love you."
A few minutes later, Jade texted "shots were fired in our school". Ms Monroe rushed to the school and was relieved when Jade texted that a police officer entered her classroom and she was safe.
Ms 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," Ms Monroe said.