Accused killer Nikolas Cruz appears in court in Fort Lauderdale on Feb. 19. (Mike Stocker/AP)

SINCE LAST month’s high school massacre in Parkland, Fla., attention has focused on lapses by the FBI, which failed to act on tips that the alleged shooter, Nikolas Cruz, posed an imminent danger. It’s also the case that neighbors, teachers, classmates, acquaintances and local authorities were aware that Mr. Cruz was armed and potentially dangerous, a fact that President Trump noted the day after the killing spree. “Must always report such instances to authorities, again and again!” he tweeted.

What the president failed to mention is that state law in Florida, as in all but a handful of states, provides no legal procedure that would have allowed people close to Mr. Cruz, or even law enforcement, to ask a court to order the immediate confiscation of his weapons — even if they presented alarming evidence. As Broward County Sheriff Scott Israel told the Miami Herald, “We can’t arrest for something a person is thinking about.”

In fact, whether or not Congress adds muscle to gun laws — and it should, by banning military-style weapons, enacting universal background checks and raising the minimum age of firearms purchase to 21 — states need not be impotent in the face of credible threats. Five states — California, Connecticut, Indiana, Washington and Oregon — have enacted “red-flag” laws that empower relatives and close friends, as well as law enforcement officers, to ask judges to issue “gun violence restraining orders.” Had such a recourse been available in Florida, it’s possible that the Parkland rampage could have been averted.

Mr. Trump seemed to embrace such measures in his White House meeting with lawmakers Wednesday, even suggesting that due process could be dispensed with. (It can’t and shouldn’t be, of course.) Recent and repeated experience suggests it would be foolish to put much stock in the president’s musings, but some states are already acting.

Lawmakers in Maryland and elsewhere have introduced red-flag legislation that would allow individuals — immediate relatives, lovers, guardians, roommates — and law enforcement to ask courts to order temporary confiscation of a person’s weapons based on credible evidence of a threat. If the petition is granted, the weapons are seized immediately, though the subject may challenge the order within a brief period — days or weeks. Typically, the order expires in a year, but it may be renewed if a judge is convinced the risk is unabated.

Mass shootings grab the headlines, but suicides may also be prevented through red-flag laws. In 2015, firearms were used in about half of 44,000 suicides in the United States. A study led by Duke University researchers found that in Connecticut, which enacted a red-flag law in 1999, the measure averted at least 70 suicides over a 14-year period.

The National Rifle Association has opposed red-flag laws even though they preserve due-process rights and address specific at-risk individuals in an evidence-based process, not gun owners as a class. The fact is that there were abundant warning signs about the perpetrators of many of America’s bloodiest massacres, but no mechanism was available to act on those warnings. In the absence of previous felony convictions, adjudications of mental incapacity or domestic violence complaints, most states lack the legal means to confiscate or bar access to firearms. Parkland can be the impetus for legislation that respects the Second Amendment while safeguarding communities from the trauma of more carnage.