WASHINGTON (AP) — Despite frequent mass shootings, Congress has proved to be unable to pass substantial gun violence legislation, largely because of resistance from Republicans.

But a bipartisan proposal by Sens. Lindsey Graham, R-S.C., and Richard Blumenthal, D-Conn., is gaining momentum following weekend mass shootings in Texas and Ohio that left 31 people dead. The emerging plan would create a federal grant program to encourage states to adopt “red flag” laws to take guns away from people believed to be dangers to themselves or others.

A similar bill never came up for a vote in the GOP-controlled Senate last year, but both parties express hope that this year will be different. President Donald Trump has signaled support for the plan.

“We must make sure that those judged to pose a grave risk to public safety do not have access to firearms and that if they do those firearms can be taken through rapid due process,” Trump said in a White House speech on Monday.

Many mass shootings “involved individuals who showed signs of violent behavior that are either ignored or not followed up on,” said Graham, chairman of the powerful Senate Judiciary Committee. “State red flag laws will provide the tools for law enforcement to do something about many of these situations before it’s too late.”

In an interview Tuesday, Blumenthal said there’s “a growing wave of support on both sides of the aisle” for the red-flag plan — more momentum in fact “than any other gun violence plan” being debated in Congress, including a proposal Blumenthal supports to require universal background checks for gun purchases.

A closer look at red flag laws, which have been adopted by at least 17 states and the District of Columbia, including a law set to take effect Aug. 24 in New York. Most of the laws have been approved since the February 2018 mass shooting at Marjory Stoneman Douglas High School in Parkland, Florida.

___

HOW DOES A RED FLAG LAW WORK?

In general, red flag or “extreme risk protection order” laws allow courts to issue temporary orders barring someone from possessing guns based on some showing of imminent danger or a risk of misuse.

State laws vary, but most stipulate that only specific people — usually family or household members — may petition a court for an extreme risk protection order. In some cases, a preliminary order may be granted without prior notice to the person who is the subject of the order.

Such an order typically is brief, ranging from a few days to about three weeks. Once the person who is alleged to pose a risk of gun violence has been given an opportunity to respond, a more permanent order may be granted, typically for up to a year.

Importantly to Graham and other supporters, before an order can be entered, some factual showing must be made that the subject of the order poses a risk of using a firearm to harm themselves or others.

___

WHAT IS THE FEDERAL PROPOSAL?

Graham and Blumenthal are still developing the plan, but a similar bill proposed last year by Florida Sens. Marco Rubio and Bill Nelson essentially would pay states to implement red flag law programs. A bid last year by Graham and Blumenthal to let federal courts keep guns away from people who show warning signs of violence failed to generate political support.

Blumenthal called the failed effort to create a federal program a learning experience and said the new proposal would set a national standard that states must meet in order to be eligible for federal grants. He compared it to federal highway laws where grants are dependent on states setting speed limits or drunk-driving standards.

“If you have speed limits, you get the money,” he said, adding that the red flag law would operate on the same principle.

___

HOW MUCH WOULD IT COST?

Costs are still being worked out, but whatever the amount, “it’s a small fraction of the losses — both monetary and in the loss of life — as a result of gun violence,” Blumenthal said.

___

WHO SUPPORTS THE PLAN?

Nearly all Senate Democrats support red flag laws, along with a growing number of Republicans, including Pennsylvania’s Pat Toomey, Indiana’s Mike Braun and Iowa’s Chuck Grassley, a former Judiciary chairman. South Dakota Sen. John Thune, the second-ranking Senate Republican, told the Argus Leader in Sioux Falls that he’s “confident Congress will be able to find common ground on the so-called ‘red flag’ issue.”

Sen. Rob Portman, R-Ohio, told reporters Tuesday he is open to the proposal, noting that the alleged shooter in Dayton, Ohio, had so-called kill lists of intended targets. “Clearly people knew something was wrong with this guy, and yet nobody went to the proper authorities or the proper authorities didn’t respond,” Portman said.

A red flag law may “bridge this issue of the guns and the mental health issue, where you identify somebody who has a mental health history that might not be formally diagnosed, but that people know about,” he said.

___

WHERE IS SENATE MAJORITY LEADER MITCH MCCONNELL?

The Kentucky Republican, who has adopted the nickname the “Grim Reaper” to celebrate his success at blocking Democratic bills, is widely considered the single biggest roadblock to changes in gun laws or any significant legislation in Congress. McConnell has not publicly indicated a position on red flag laws but said in a statement Monday that “Senate Republicans are prepared to do our part” to address gun violence. He said he has spoken with Graham and other committee chairs and asked them to consider “potential solutions to help protect our communities without infringing on Americans’ constitutional rights.”

Congress passed a modest measure last year to shore up the federal background checks system and approved a grant program to prevent school violence — signs that action on gun violence is possible, McConnell said.

___

WHAT ABOUT THE NRA?

A National Rifle Association spokeswoman declined to comment. In a statement, the group said it welcomes Trump’s call “to address the root causes of the horrific acts of violence that have occurred in our country. It has been the NRA’s long-standing position that those who have been adjudicated as a danger to themselves or others should not have access to firearms and should be admitted for treatment.”