WASHINGTON — Almost all the people who carried out mass attacks in the United States last year made threatening or concerning communications beforehand, and more than three-quarters prompted concern from others, the Secret Service said in a report Tuesday.

The agency's National Threat Assessment Center analyzed 27 mass attacks during 2018, defined as incidents in which three or more victims were harmed. In all, 91 people were killed and 107 were injured. All but four of the attackers "made some type of communication that did not constitute a direct threat but should have elicited concern," the report said.

It said the former student at Marjory Stoneman Douglas High School in Parkland, Florida, who killed 14 students and three staff members, "had a long history of behavioral problems and concerning communications."

"Mental illness, alone, is not a risk factor for violence, and most violence is committed by individuals who are not mentally ill," the Secret Service said.

But in 2018, two-thirds of the attackers experienced mental health symptoms before the attacks, ranging from depression to psychotic symptoms including paranoia and hallucinations. Almost half the attackers had been diagnosed with a mental illness or treated for one.

"The findings emphasize that we can identify warning signs prior to an act of violence," the report said, noting that employers can help promote mental wellness programs and help with personal problems such as substance abuse, financial strains or problems in a personal relationship.

The report encouraged people to share concerns they may have with coworkers, classmates, family members, or neighbors.

"A reasonable awareness of the warning signs that can precede an act of violence may prompt community members to share their concerns with someone who can help," it said.

Among the other findings: 24 of the 27 attacks were carried out with firearms, mostly at places of business, and more than half ended within five minutes. The average attacker was a 37-year-old man, and some kind of grievance was the motivating factor, rather than ideology.

In 11 of the cases, the attackers appeared to have selected their targets in advance, such as the man who killed 11 people at a Pittsburgh synagogue in October.

This was the second analysis by the Secret Service of mass attacks. Its report from a year ago found that most attacks in 2017 were motivated by workplace or domestic issues, and that more than three-fourths of them had made threatening or concerning communications.