A gunman who opened fire inside a classroom at a rural Oregon college has killed at least nine people before dying in a shoot-out with police.
One survivor said he demanded his victims state their religion before he started shooting.
The attack shattered the first week of classes at Umpqua Community College in the small timber town of Roseburg, about 180 miles south of Portland.
The killer was identified as 26-year-old Chris Harper Mercer. The authorities shed no light on his motive and said they were investigating.
'Come on out, come on out'
Hannah Miles, 19, was in her writing class when her teacher got a call from security saying the school was in lockdown. She heard gunshots from a neighbouring classroom.
She said that huddled together in the locked classroom, the students and teacher heard a footsteps outside and a man’s voice call out to them: “Come on out, come on out.” They remained quiet and did not open the door.
Police soon arrived, and after students were convinced that it was indeed officers, they opened the door.
“It was like a huge burden had been lifted,” she said. “A huge sigh of relief that we were going to be OK.”
Douglas County Sheriff John Hanlin said at least two officers acted heroically in the shoot-out, but it was not clear if the gunman was killed by authorities or whether he took his own life.
At a news conference, a visibly angry Mr Hanlin said he would not name the shooter.
“I will not name the shooter. I will not give him the credit he probably sought prior to this horrific and cowardly act,” he said. “It’s been a terrible day. Certainly this is a huge shock to our community.”
Mercer had been living at an apartment complex in nearby Winchester. Yellow police tape surrounded the building on Thursday night.
A neighbour, Bronte Hart, said Mercer would “sit by himself in the dark in the balcony with this little light”.
She said a woman she believed to be Mercer’s mother also lived upstairs and was “crying her eyes out” on Thursday.
Distressed parents rushed to the county fairgrounds, where students were being taken by bus to reunite with families.
The sheriff said 10 people were dead and seven wounded. An FBI spokeswoman said the gunman was included in that number.
Earlier, Oregon Attorney General Ellen Rosenblum said 13 people had been killed.
Hours after the attack, a frustrated president Barack Obama spoke to reporters at the White House, saying the US is becoming numb to mass shootings and that the shooters have “sickness” in their minds.
Repeating his support for tighter gun-control measures, the president said thoughts and prayers are no longer enough in such situations because they do nothing to stop similar attacks from happening a few weeks or months later.
He challenged voters wanting to confront the problem to vote for elected officials who will act.
Police began receiving calls about a campus shooting at 10.38am local time. The school has a single unarmed security guard.
Kortney Moore, 18, said she was in a writing class when a shot came through the window and hit the teacher in the head.
The gunman then entered the Snyder Hall classroom and told people to get on the floor, she told the Roseburg News-Review newspaper. He told people to stand up and state their religion before opening fire.
The gunfire sparked panic as students ran for safety and police and ambulances rushed to the scene.
Some students were in tears. Police lined them up in a car park with their hands over their heads and searched them.
Roseburg is no stranger to school gun violence. A student at the local high school shot and wounded a fellow student in 2006.
The sheriff has been vocal in opposing gun-control legislation.
In 2013, Mr Hanlin sent a letter to Vice President Joe Biden after the shooting at a Newtown, Connecticut, school, declaring that he and his deputies would refuse to enforce new gun-control restrictions “offending the constitutional rights of my citizens”.
Before the Roseburg shooting, a posting on the message-board site 4chan included a photo of a crudely drawn frog used regularly in Internet memes with a gun and warned other users not to go to school on Thursday in the north-west.
The messages that followed spoke of mass shootings, with some egging on and even offering tips to the original poster. It was unclear if the messages were tied to the shooting because of the largely anonymous nature of the site.
Roseburg is in Douglas County, a politically conservative region west of the Cascade Range where people like to hunt and fish and pursue other outdoor activities.