Women mourn during a vigil at a Walmart parking lot in Roseburg, Oregon. — AFP Seven other people were wounded in the attack in Roseburg, about 180 miles south of Portland.
Harper-Mercer, who died during a shoot out with police, was armed with handguns and a rifle, some of which were military grade.
The weapons had been purchased legally over the past three years, some by him, others by relatives, said Celinez Nunez, assistant field agent for the Seattle division of the Bureau of Alcohol, Tobacco and Firearms.
Those who knew the shooter described a deeply troubled loner.
At a different apartment complex where Harper-Mercer and his mother lived in Southern California, neighbours remembered a quiet and odd young man who rode a red bike everywhere.
Reina Webb, 19, said the man's mother was friendly and often chatted with neighbours, but Harper-Mercer kept to himself. She said she occasionally heard him having temper tantrums in his apartment.
"He was kind of like a child so that's why his tantrums would be like kind of weird. He's a grown man. He shouldn't be having a tantrum like a kid. That's why I thought there was something - something was up," she said.
Harper-Mercer's social media profiles suggested he was fascinated by the Irish Republican Army and frustrated by traditional organised religion.
He also tracked other mass shootings. In one post, he appeared to urge readers to watch the online footage of Vester Flanagan shooting two former colleagues live on TV in August in Virginia, noting "the more people you kill, the more you're in the limelight."
He may have even posted a warning. A message on 4chan - a forum where racist and misogynistic comments are frequent - warned of an impending attack, but it's unclear if it came from Harper-Mercer.
"Some of you guys are alright. Don't go to school tomorrow if you are in the northwest," an anonymous poster wrote a day before the shootings.
On Thursday morning, he walked into the classroom at Snyder Hall at Umpqua Community College and began firing, shooting many victims repeatedly.
Survivors described a classroom of carnage, and one said he ordered students to state their religion before shooting them.
Students in a classroom next door heard several shots, one right after the other, and their teacher told them to leave.
"We began to run," student Hannah Miles said. "A lot of my classmates were going every which way. We started to run to the centre of campus. And I turned around, and I saw students pouring out of the building."
An aunt of an Army veteran hit by several bullets said he tried to stop the gunman from entering the classroom.
Wanda Mintz said her 30-year-old nephew, Chris Mintz, a student at the college, fell to the floor and asked the shooter to stop. But, she said, he shot Mintz again and went inside.
Portland Fire and Rescue Lt. Rich Chatman, who is serving as a spokesman for the criminal investigation, said investigators were still processing the crime scene.
The college cancelled classes for all of next week.
Several years ago, Harper-Mercer moved to Winchester, Oregon, from Torrance, California, with his mother, a nurse named Laurel Harper. His father, Ian Mercer, originally from the United Kingdom (UK), told reporters outside his Tarzana, California, home, "I'm just as shocked as anybody at what happened."
At school in Oregon, "he was a typical Roseburg kid, kind of nerdy, kind of out there. Just himself," said Alex Frier, a stage manager at the college who said Harper-Mercer built sets for theatre performances last semester.
A neighbour, Bronte Harte, said Harper-Mercer "seemed really unfriendly" and would "sit by himself in the dark in the balcony with this little light."
Harte said a woman she believed to be Mercer's mother also lived upstairs and was "crying her eyes out" Thursday.
The Army said Harper-Mercer flunked out of basic training in 2008.
Army spokesman Lt Col Ben Garrett said Harper-Mercer was in the military for a little over a month at Ft. Jackson, South Carolina, but was discharged for failing to meet the minimum standards.
Garrett did not say which standards Harper-Mercer failed. Generally, the Army requires recruits to pass physical fitness tests and to be in generally good physical and mental health.
Recruits must also pass a multiple-choice test covering science, math, reading comprehension and other topics.
In Washington, President Barack Obama lamented the government's inability to pass stricter gun laws even after attacks like the one in Oregon.