ROSEBURG, Ore. — When a downstairs neighbor of Laurel Harper learned there was a gunman on the loose at Umpqua Community College here, he ran up to tell her, knowing that her son, Christopher Harper-Mercer, was a student there. Like other parents, Ms. Harper started to set out in a desperate search, fearing her son could be hurt.

“She was very upset,” said the neighbor, who asked not to be named, citing his family’s privacy.

But as she was leaving, the sheriff and his deputies intercepted her and broke the news that her son was the gunman.

Ms. Harper, who divorced her husband a decade ago, appears to have been by far the most significant figure in her son’s troubled life; neighbors say he rarely left their apartment. Unlike his father, who said on television that he had no idea Mr. Harper-Mercer cared so deeply about guns, his mother was well aware of his fascination. In fact, she shared it: In a series of online postings over a decade, Ms. Harper, a nurse, said she kept numerous firearms in her home and expressed pride in her knowledge about them, as well as in her son’s expertise on the subject.

She also opened up about her difficulties raising a son who used to bang his head against the wall, and said that both she and her son struggled with Asperger’s syndrome, an autism spectrum disorder. She tried to counsel others whose children faced similar problems. All the while, she expressed hope that her son could lead a successful life in finance or as a filmmaker.