CHARLOTTESVILLE, Va. — In the aftermath of the high school massacre in Parkland, Florida, one thing about accused shooter Nikolas Cruz stands out loud and clear: His brooding anger, disturbing behavior and violent threats raised red flags all over the place.

"It was the worst-kept secret in Parkland," said Patrick Petty, a student who survived the attack that claimed 17 lives. "We all knew as soon as it happened. As soon as we found out what was happening, we all knew that it was this kid."

Experts say it's one thing nearly every school shooting has in common: There are almost always warning signs. That's why there's a long-running effort in the public schools of Virginia to catch those warning signs and do something about them before any bullets start flying.

Now, survivors and victim relatives from Parkland, Florida, and Sandy Hook, Connecticut, are pushing for Virginia-like programs across the country.

After Columbine in 1999, schools in Virginia pioneered the use of so-called threat assessment teams. That name may sound like the SWAT team is about to move in, but in fact it's a way to help troubled students before they shoot up a school.

"When a student makes a threat, that's really a red flag that they're frustrated, upset, something has gone wrong," said professor Dewey Cornell at the University of Virginia. He's been studying school violence for more than two decades. He believes the standard campus approach to threatening behavior — zero tolerance and expulsion or suspension — is counterproductive.

"We've seen in a number of school shootings," Cornell said, "that kids were alienated, angry, upset and then excluded from school — which only gave them more time to become resentful and plan and prepare an assault."

Instead of going down that path, lawmakers in Richmond adopted a decidedly different approach. State law now requires every public school in Virginia, from kindergarten through college, to have threat assessment teams standing by.

The effort began in 2000. Following the Columbine High School attack in Colorado that claimed 15 lives, the Virginia General Assembly established a program for identifying at-risk students. In 2008, following 33 shooting deaths on the campus of Virginia Tech in Blacksburg, Virginia, the assembly passed a new law that required all public colleges to have threat assessment teams.

Then, Sandy Hook happened, a shooting spree at an elementary school in Connecticut in which 28 children and adults were fatally shot. That prompted Virginia in 2013 to require threat assessment teams at all public schools from the college level down to kindergarten. The law was updated in 2016 to give threat assessment teams authority to obtain criminal history and health records of students whose behavior is of concern.

"It can help resolve the underlying concern," said Gene Deisinger, a former deputy police chief in Blacksburg. His consulting firm SIGMA Threat Management Associates provides training programs for threat assessment teams statewide.

When a concern about a student's behavior — or a threat — is reported, the team meets to evaluate the student's trouble and decide what, if anything, needs to be done. Virginia law requires that each team must include members with expertise in counseling, instruction, school administration and law enforcement.

"We sometimes identify people that have legitimate grievances," Deisinger said. "They are being bullied, they are being harassed."

The team's first step is to gather as much information from as many sources as possible.

"So that all that information synthesizes," explained Donna Michaelis, manager of the Virginia Center for School and Campus Safety. "They can find the best and most appropriate intervention in the child's life." When asked if, in her gut, she thinks the system works, Michaelis replied, "Absolutely."

Only rarely does the team decide the situation requires "calling in the cops." Each team has the expertise to refer the student to counseling or mental health services or to grapple with personal issues that are provoking tension.

That means the outcome can be good, not just for the school administrators but also for the student the team is worried about.

"Absolutely," said Jesse Turner, principal of Albemarle High School in Charlottesville, Virginia. "Once the children understand and feel as though they are supported — and they have a pathway to help them — I've never seen it not work."

According to audit reports on Virginia's program, 1,956 Virginia schools reported 9,238 threat assessment cases in the 2016-17 school year. Nine hundred twenty-eight of the cases were considered "high-level threats," and in 888 of those serious cases, "the threat was ultimately averted," the audit said.

In 40 of the 928 serious cases, "an event occurred, nearly half (18) involved suicide attempts by students."

Virginia was the first state to make threat assessment mandatory in all schools. Now the idea is catching on in other states, and legislation is working its way through Congress that would help pay for it.

"After 9/11 we secured our skies," said Sen. Steve Daines, R-Montana. "It's time now that we secure our schools."

Daines joined Sen. Orrin Hatch, R-Utah, and Sen. Marco Rubio, R-Florida, at a U.S. Capitol news conference promoting the legislation. Two members of the Petty family from Parkland, Florida, were there as well.

Ryan Petty lost his 14-year-old daughter Alaina in the Parkland shooting. He and his son Patrick are now lobbying lawmakers to act on the human side of the equation instead of endlessly arguing over gun control. They've already made progress at home in Florida.

"I'm happy to say, in three weeks we passed a school safety bill" in Florida, he told Rubio and Hatch at a roundtable discussion inside the Capitol.

"I think we would all agree," Rubio told him, "that the best way to stop these (shootings) is to stop it before a killer ever steps foot in a school or in a mall or in a stadium or anywhere."

Now they hope to spark federal change — in memory of Alaina — by lobbying for the federal Stop School Violence Act.

"I wish we had the Stop Violence Act a month ago," Ryan Petty said. His son Patrick added, "So that something like Parkland will never happen again and no other student, no other person, has to bury their sister, or family member or loved one."