LEWISTON, Maine (AP) — Authorities in Maine spent Monday continuing to piece together the events that led to the worst mass shooting in the state’s history — with the suspect’s record of interaction with police and warning signs involving mental illness and violent threats emerging as key threads.

Robert Card — the suspected shooter who was found dead Friday of a self-inflicted gunshot wound — underwent a mental health evaluation last summer after he began acting erratically at an Army training facility in New York, officials said. A bulletin sent to police shortly after last week’s attack said Card had been committed to a mental health facility for two weeks after “hearing voices and threats to shoot up” a military base.

At a news conference last week, police said there was no evidence that the 40-year-old Card — who was also a firearms instructor — had ever been involuntarily committed to a mental health facility, which could’ve made it illegal for him to posses guns.

But family members of Card told federal investigators that he had recently discussed hearing voices and became more focused on the bowling alley and bar where the shootings took place, according to law enforcement officials who spoke to The Associated Press on condition of anonymity in order to discuss details of the investigation. Card’s Oct. 25 rampage killed 18 and injured 13, shocking both the nation and a community where guns are prevalent, but gun violence is rare.

Police across Maine were alerted just last month to the “veiled threats” by the U.S. Army reservist. Two local law enforcement chiefs told The Associated Press that a statewide awareness alert was sent in mid-September to be on the lookout for Robert Card after he made threats against his base and fellow soldiers. But ultimately, after a visit to Card’s home, police moved on.

The body of suspected gunman Robert Card was found late Friday in a trailer at a recycling center in Lisbon Falls. Card died of an apparent self-inflicted gunshot wound though it was unclear when, authorities said. Card was also suspected of injuring 13 people in the shooting rampage Wednesday night in Lewiston.

Authorities recovered a multitude of weapons while searching for Card and believe he had legally purchased his guns, including those recovered in his car and near his body, said Jim Ferguson, the special agent in charge of the Boston office of the Bureau of Alcohol, Tobacco, Firearms and Explosives. He declined to discuss any specifics.

Investigators are still searching for a motive for the massacre, but have increasingly focused on Card’s mental health history.

State Department of Public Safety Commissioner Michael Sauschuck has said Card believed “people were talking about him and there may even have been some voices at play.”

A stay-at-home order in place during the massive search for Card was lifted Friday afternoon, hours before authorities announced they had found Card’s body. On Monday, Democratic Gov. Janet Mills said she planned to address the state that afternoon about its coordination with federal and local governments in response to the shooting.

Residents of Lewiston returned to work Monday, the morning after coming together to mourn those lost in Maine’s worst mass shooting. Many had gathered Sunday evening, hugging one another, singing a rousing edition of “Amazing Grace,” and seeking guidance out of these dark days from religious leaders who talked of hope, healing and the power of prayer.

More than 1,000 people attended Basilica of Saints Peter and Paul for a vigil in Lewiston. Some put their heads in their hands as the names of the people who died in Wednesday’s shooting were read. Others quietly wept.

Hundreds more watched a livestream of the vigil shown on a huge screen in front of the church. Some held American flags and others had lit candles in cups marked with the names of the dead and injured.

Christian leaders along with a rabbi and an imam spoke of the pain from the shooting but also the healing process and the resilience of the community of 40,000. There was also a speaker from Lewiston’s deaf and hard of hearing community, as four of its members were killed in the shooting.

Meanwhile, Lewiston was slowly reopening. Lewiston Public Schools released a limited schedule for the week “with room for reflection as we move forward.” Only the staff was returning Monday; students were due back Tuesday. The Lewiston City Hall planned to reopen on Monday afternoon.

The deadliest shootings in Maine’s history stunned a state of 1.3 million people that has relatively little violent crime and only 29 killings in all of 2022.

Three of the injured remained in critical condition at Central Maine Medical Center, and a fourth was stable, hospital officials said. Another was transported to Massachusetts General Hospital, and the rest were discharged.

The Lewiston shootings were the 36th mass killing in the U.S. this year, according to a database maintained by AP and USA Today in partnership with Northeastern University. The database includes every mass killing since 2006 from all weapons in which four or more people, excluding the offender, were killed within a 24-hour time frame.