WASHINGTON — Most students who committed deadly school attacks over the past decade were badly bullied, had a history of disciplinary trouble and their behavior concerned others but was never reported, a U.S. Secret Service study has found.

In at least four cases, attackers wanted to emulate other school shootings, including those at Columbine High School in Colorado, Virginia Tech University and Sandy Hook Elementary School in Connecticut.

The study by the Secret Service's National Threat Assessment Center is one of the most comprehensive reviews of school attacks since the Columbine shootings in 1999. The report obtained by The Associated Press looked in depth at 41 school attacks from 2008 through 2017.

The information gleaned through the research will help train school officials and law enforcement on how to better identify students who may be planning an attack and how to stop them before they strike.

"These are not sudden, impulsive acts where a student suddenly gets disgruntled," Lina Alathari, the center's head, said in an AP interview. "The majority of these incidents are preventable."

Nearly 40 training sessions for groups of up to 2,000 are scheduled. Alathari and her team trained about 7,500 people during 2018. The training is free.

The Secret Service is best known for its mission to protect the president. The threat assessment center was developed to study how other kinds of attacks could be prevented. Officials use that knowledge and apply it in other situations such as school shootings or mass attacks.

Since the Columbine attack on April 20, 1999, there have been scores of school shootings. Some, like Sandy Hook in 2012, were committed by non-students. There were others where no one was injured. Those were not included in the study.

Many were absent from school before the attack, often through a school suspension; they were treated poorly by their peers in person, not just online; they felt mistreated; some sought fame, while others were suicidal.

For the report being released Thursday, investigators reviewed instances in which a current or recent student purposefully used a weapon to kill at least one person.

"We focus on the target so that we can prevent it in the future," Alathari said.

The report covers 41 school attacks from 2008 through 2017 at K-12 schools and were chosen if the attacker was a current or former student who used a weapon to injure or kill at least one person at the school while targeting others.

Nineteen people were killed and 79 were injured; victims included students, staff and law enforcement. The research was launched following the shooting at Marjory Stoneman Douglas High School in Parkland, Florida, in 2018.

The Secret Service put out a best practices guide based on some of the research last July to 40,000 schools nationwide, but the new report is a comprehensive look at the attacks.

The shootings happened fast and were usually over within a minute or less. Law enforcement rarely arrived before an attack was over. Attacks generally started during school hours and occurred in the one location, such as a cafeteria, bathroom or classroom.

Most attackers were male; seven were female. About three-fifths of the attackers were white, 15 percent were black and 5 percent Hispanic.

The weapons used were mostly guns, but knives were also used. One attacker used a World War II-era bayonet. Most of the weapons came from the attackers' homes, the investigators reported.

Alathari said investigators were able to examine detailed information about attackers, including their home lives, suspension records and past behaviors.

There's no clear profile of a school attacker, but some details stand out: Many were absent from school before the attack, often through a school suspension; they were treated poorly by their peers in person, not just online; they felt mistreated; some sought fame, while others were suicidal.

The key is knowing what to look for, recognizing the patterns and intervening early to try to stop someone from pursuing violence.

"It really is about a constellation of behaviors and factors," Alathari said.

The attackers ranged in age but were mostly young adults, seventh-graders to seniors. More than three-quarters initiated their attack after an incident with someone at school.

In one case, a 14-year-old shot a classmate at his middle school after he'd been mocked and called homophobic names. The attacker later reported the victim made comments that made him uncomfortable and they were the final straw in his decision to attack. Seven attackers documented their plans and five researched their targets before the attack.

Thirty-two were criminally charged, with 22 charged as adults. Most took plea deals. More than half are incarcerated. A dozen more were treated as juveniles. Seven committed suicide and two were fatally wounded.

Alathari said the report shows that schools may need to think differently about school discipline and intervention.

The report does not weigh on political topics such as whether guns are too accessible or whether teachers should be armed.

She said their goal is to make schools a safer place where no more attacks occur.