WOBURN — For years before the bloodshed, the warning signs around Jeffrey Yao became clearer.
Fellow students, neighbors, police — even Yao himself — saw troubling evidence of mental illness in the Winchester man. On several occasions, residents and former classmates said they warned school or law enforcement officials that Yao was dangerously erratic.
In 2012, a former schoolmate said he reported Yao to Winchester school administrators as a possible “threat to student safety.” In September, Yao told police he was hearing voices in his head and thought about hurting himself, court records show.
On Saturday, authorities say the 23-year-old brought a 10-inch knife to his local library and slashed a young woman to death in a seemingly random attack.
Yao was ordered held without bail Monday after pleading not guilty to murder charges in Woburn District Court, where his lawyer, J.W. Carney Jr., said Yao suffers from a chronic mental illness that clearly played a role in the assault.
“Jeff has a long history of mental illness, including multiple hospitalizations,’’ Carney said in an interview before Yao’s court appearance. “This terrible tragedy, which shocked his parents, is unquestionably related to his severe mental illness.”
The woman he is accused of killing, Deane Kenny Stryker, a 22-year-old medical student, was sitting at a table in a reading room at the Winchester Public Library on Saturday when Yao stabbed her from behind, authorities say. He pursued her when she tried to get away, wounding her 20 times in a relentless assault, police said.
More than a half-dozen witnesses identified Yao as the attacker, police said.
Carney, who was hired by Yao’s family, declined to elaborate on his client’s mental history. He said outside the courthouse that the death of Stryker is “every parent’s nightmare.”
“My client’s parents feel devastated about the death of that young woman, who was totally blameless,” he said.
Carney said there is no indication that Stryker and Carney knew each other. They both attended Winchester High School around the same time but were apparently not in the same graduating class.
People who knew Yao have been concerned about his behavior for years.
In 2012, a former schoolmate said he reported Yao to Winchester school administrators as a possible “threat to student safety,” after Yao allegedly posted several gun-related items on social media, including a video manifesto recorded by Seung-Hui Cho, who killed 32 people at Virginia Tech in 2007.
“I believe that tonight’s posts signify a true issue, and I wanted to notify someone before it could become a larger issue,” the student wrote on Feb. 12, 2012, in an e-mail to Thomas Gwin, the principal at Winchester High School at the time. “I hope that I am not sounding too frenzied or incendiary, but I truly do not want WHS students to be at risk.”
Yao’s former classmate, who requested anonymity because he fears for his and his family’s safety, said he is concerned Yao’s pattern of disturbing behavior was not adequately addressed.
“It’s upsetting that over the course of six years, you have people talk about how concerning someone’s behavior is and have nothing happen about it,” the classmate said.
The former classmate provided the Globe a copy of the 2012 e-mail, which was sent with the subject line “WHS safety.” The man said he subsequently met with Gwin, as well as a vice principal, and a Winchester police school resource officer. He said the officials appeared to take his concerns seriously.
Winchester School Superintendent Judith A. Evans declined to comment, citing student privacy laws. In an e-mail, she said “school and district personnel respond promptly to investigate, review, and respond to every issue of concern brought to our attention about our students..”
After Saturday’s slaying, Yao’s neighbors told the Globe that they feared Yao, whom they said had tried to break into homes, smashed glass in the road, shattered his own windows, and made threatening gestures to passersby on Farrow Street. Neighbor Leslie Luongo said she was so afraid of Yao that she would run to her car every day when she left the house at 5 a.m. to go to work. She said residents kept their children indoors, kept baseball bats nearby.
Luongo said she had told the police last summer that she and other neighbors were afraid.
In September, Yao allegedly tried to break into another neighbor’s house shortly before 4 a.m., according to court records. The neighbor, who asked the Globe that his name be withheld out of concern for his own safety, frantically called 911, and told officers he was awoken by the sound of “loud bangs.” Armed with a golf club, he went downstairs and saw Yao banging on a rear sliding door with his forearm, the report said. Yao then began to throw his shoulder into the door, but did not get in.
“He is a total loose cannon,” the neighbor told police, according to court records.
The September report noted police had had “several encounters” with Yao previously.
“On each of my dealings with Yao he has displayed erratic behavior and mental instability,” the reporting officer wrote.
Yao was arrested that September night near Lynch Elementary School, which concerned residents in the neighborhood. One mother from the neighborhood said she and a friend went to talk to officials at the school about Yao, bringing a picture of him from Facebook to alert teachers in case he showed up on the playground.
Officers who arrested Yao reported that he “appeared to be very disoriented” and complained about hearing voices in his head.
Yao wrote “Yes” in response to a booking sheet question asking if he was under medical care and wrote “Yes” when asked if he was under psychiatric care and if he was thinking about hurting himself, records show.
Yao was released on bail and “escorted to Winchester hospital with mother,” the booking sheet said. He was placed on pretrial probation in December and ordered to continue mental health treatment and stay away from his neighbor, records show. It was not immediately clear if he had complied with the probation requirement.
In a brief interview Monday, Winchester Police Chief Peter MacDonnell said his officers followed appropriate protocols with Yao, including following up with mental health professionals. “Most of our interactions with him resulted in some sort of service provided,” MacDonnell said.
He declined to elaborate, citing medical privacy laws. He said Yao’s only arrest before the slaying came during the attempted break-in last fall.
All told, MacDonnell said, his officers filed three or four incident reports on Yao in each of the past two years, as well as one report this year.
He declined to provide details about those reports Monday but said a department spokesman will soon release redacted accounts.
In the report on Saturday’s fatal stabbing, police wrote that 77-year-old Lester Taber yelled at Yao and ordered him to stop, an action that caused Yao to turn away from Stryker and turn his attention toward Taber, police wrote.
“Yao did stop for a moment, turned to Taber and cut across his upper arm with the knife before turning his attention back to Ms. Stryker,” police wrote.
Yao attacked Stryker for a third time as other library patrons placed themselves between Yao and Stryker.
“They were able to get between/or separate him from Ms. Stryker, who fell to the floor with the knife still in her neck,’’ police wrote.
Yao, who no longer had a weapon, came to a stop and put his hands into the air and was taken into custody without incident by Winchester police, who arrived within three minutes of getting their first 911 call around 10:38 a.m. Saturday, police said.
Taber spoke briefly outside his Winchester home, calling Stryker’s death a “tragic situation’’ and one that he repeatedly declined to discuss in any detail. Taber, who was wearing a long-sleeved shirt, said he suffered a five inch cut on his arm that will heal.
Yao is due back in court April 11.
Stephanie Ebbert of the Globe staff and Globe correspondents John Hilliard and Jeremy C. Fox contributed to this report.