In Washington state, authorities kept a gun out of the hands of a man bent on setting a record death toll for mass shootings.

A Florida judge in the county where 17 people were killed in a high school shooting last year has since handled more than 330 petitions to take guns from people thought to be a threat to themselves or others.

And California added new ammunition limits to what are already some of the nation’s strictest gun laws.

Across the country, a growing list of states require new measures like universal background checks and “red flag” laws to curb gun violence before it starts. The changes are part of a national movement for tougher gun laws now stirring in Minnesota in response to an ongoing cycle of bloodshed.

“Every time there’s a shooting, these [proposals] come to the forefront again,” said Chief Circuit Judge Jack Tuter, who has presided over all of the Broward County petitions for “extreme risk protection orders” since last year’s shooting at Marjory Stoneman Douglas High School in Parkland prompted Florida to pass a red flag law.

“When we enacted ours, there were only five states that had them. And when I looked at the map the other day — man, states have gone crazy. It looks like everybody is doing them.”

Nearly all of the 17 states — plus the District of Columbia — that adopted red flag laws did so after the Parkland shooting, which fueled a youth-driven movement for stronger gun control. Twenty-one states and D.C. also now require background checks for all gun transfers, including private sales. Back-to-back shootings that killed more than 30 people in El Paso, Texas, and Dayton, Ohio, this month have intensified calls for new restrictions nationwide, including in Minnesota, although partisan divisions have so far stalled any new gun laws.

Gun-rights activists also are mobilizing. Even in states where new gun laws have passed, some law enforcement leaders are establishing “Second Amendment sanctuaries” where they say they will refuse to enforce them. And Colorado state Rep. Tom Sullivan, a Democrat whose son was killed in the 2012 Aurora movie theater shooting, faced an unsuccessful recall attempt after sponsoring a red flag bill.

“This is what the public wants us to do,” Sullivan said.

While support for new gun restrictions cuts along party lines in the Minnesota Legislature, national polls conducted after the shootings in Texas and Ohio show broad, bipartisan support among registered voters for both red flag laws and universal background checks. A Fox News poll last week showed 88% of Democrats and 75% of Republicans backing red flag laws, and universal background checks received nearly 90% support from voters in both parties.

Research suggesting red flag laws in Connecticut and Indiana saved at least one life for every 10 to 20 petitions factored prominently into pitches from Minnesota DFL lawmakers calling for similar legislation over the past two years.

“Are red flag laws going to stop every tragedy? We all know the answer to that,” said Minnesota state Rep. Ruth Richardson, a Mendota Heights Democrat who sponsored a red flag bill last session. “But we also recognize that there are options here to save lives.”

Jeffrey Swanson, a Duke University psychiatry professor who worked on the research, said support for red flag laws tends to swell during moments of crisis. But, he added, such measures may do more to curb suicides — especially in cases where despondent people are able to pass a background check.

“I think of this as a jigsaw puzzle where you have a lot of different pieces in it,” Swanson said. “There’s no one thing that’s going to do it.”

Yet in Washington state, where a red flag law was adopted by ballot initiative, Seattle prosecutor Kimberly Wyatt has witnessed her share of chilling cases among the 70-some petitions for extreme risk protection orders she’s handled since last year.

In April, one man told his girlfriend he fantasized about committing a mass shooting that would dwarf the 2017 Las Vegas attack that killed 58 people. In another case, authorities learned that a patient who described making a hit list to his therapist had applied for a concealed-carry permit the same day.

Other cases, Wyatt said, can be moving — like the girlfriend who petitioned to stop her boyfriend from buying a firearm after a failed suicide attempt. Later, at the court hearing for the petition, the couple walked into the courtroom together holding hands.

“Any time we can interrupt, or law enforcement can put eyes on somebody when they’re displaying these crisis behaviors, I think is important,” Wyatt said. “I think it’s something that the public would hope and expect law enforcement is able to do.”

In California, the state’s new law requiring additional background checks for ammunition sales is being challenged in federal court, where opponents hope that a conservative judiciary being remade under President Donald Trump will be more inclined to rule in favor of gun rights.

California Attorney General Xavier Becerra said the new law stopped more than 100 people from buying ammunition illegally in its first month. But Sean Brady, a Long Beach attorney representing gun enthusiasts, pointed out that California’s system also initially blocked more than 11,000 people who shouldn’t have been barred from buying ammunition.

“Laws are not going to stop someone who wants to kill innocent people,” Brady said. “But apart from that, when the government acts as a gatekeeper to the exercise of constitutional rights, it can’t say, ‘Let’s just burden 11,000 people’s constitutional rights so we can hopefully deter a bad guy.’ ”

Despite strict California gun laws, which include an assault-weapons ban, the state saw the July killings of three people at a garlic festival by a shooter who legally bought his assault-style rifle in Nevada. In Minnesota’s Republican-controlled Senate, such examples underpin arguments that new gun laws will do more to limit civil liberties than curb gun crimes.

“Obviously those gun laws are not working very well, and yet they keep being more and more restrictive,” said state Sen. Andrew Lang, an Olivia Republican who voted against universal background checks and red flag legislation last session.

But Adam Winkler, who has studied gun policy at the UCLA Law School, said the effectiveness of gun control laws in states like California can be “inevitably undermined by porous borders and the gun-friendly states nearby.”

In other states with new gun laws on the books, some law enforcement officials are vowing not to enforce laws they’ve long opposed.

“We’re basically viewing the red flag law as something that is ineffective and unconstitutional and we’re going to avoid its use,” said Weld County, Colo., Sheriff Steve Reams.

In New Mexico, Cibola County Sheriff Tony Mace calls his state’s new universal background check system “a feel-good measure” for legislators to show that they “did something rather than nothing.” But Mace, whose state has one of the country’s highest rates of gun ownership, is now working with Democratic lawmakers to try to forge a compromise on a red flag bill being crafted ahead of the state’s 2020 legislative session.

In Florida, where a Republican-dominated government passed a new red flag law, Tuter sees the law as a tool for law enforcement and the courts, uniquely tailored to today’s gun-rich climate.

“Nobody had a gun when I was growing up — we fought it out in the smoking area behind the high school,” Tuter said. “Now judges are being put in this unenviable position … with these [risk protection orders] to try to predict human behavior that family members who are next to that person can’t even predict.”

Correction: Previous versions of this article misstated the hometown of a DFL sponsor of a red-flag bill in the last legislative session. State Rep. Ruth Richardson is from Mendota Heights.