Hours after the Senate failed to advance another round of measures aimed to limit gun sales, a bipartisan group of senators today introduced what they call compromise legislation to bar some terrorism suspects from buying firearms.

They say their bill intends to achieve the delicate balance of preventing those suspected of having terrorist ties from buying guns—while preserving their right to due process.

“We are not finished with this war on terrorism,” said Sen. Jeff Flake, R-Ariz., who helped write the bill, in an interview with The Daily Signal. “We want to help prevent future attacks while also protecting people’s constitutional rights. We feel like we thread the needle as best as we can.”

The bill is the latest response from Congress after the terrorist attack June 12 at a nightclub in Orlando, Florida.

It is more narrowly written than one of the four bills that failed Monday, in that it would bar guns from being sold to individuals who are on the FBI’s “no-fly” and “selectee” lists. The selectee list includes suspected terrorists who must undergo additional security screening before boarding a plane.

People who are on the broader terrorist watch list, or have been on it within the past five years, still could freely purchase guns under the bill, but the FBI would be notified.

The killer in the Orlando massacre, Omar Mateen, was on the terrorist watch list from 2013 to 2014, the FBI has said, but the agency removed him from the list after investigations did not turn up enough information to arrest him.

None of the four bills considered Monday garnered the 60 votes needed to end debate and advance to a final vote. One of the four would have blocked anyone on the terrorist watch list from buying guns.

Flake co-wrote the new bill with Sens. Susan Collins, R-Maine; Kelly Ayotte, R-N.H.; Heidi Heitkamp, D-N.D.; Angus King, I-Maine; Lindsey Graham, R-S.C.; Tim Kaine, D-Va.; and Martin Heinrich, D-N.M.

The Arizona Republican said he was inspired to engage in a bipartisan solution because he was dismayed at how the previous bills seemed to be deliberately written to fail in order to “score political points.”

“We modified this in a way that is designed to pass, not fail,” Flake told The Daily Signal, adding:

The legislation before this went through the motions so everybody could latch onto what’s comfortable, understanding the effort would fail. This has meaning because we are actually helping to fix a problem. It’s been too long since Congress has been inspired to reach across to the other side and actually try to pass something of importance.

Still, the bill, expected to be voted on Thursday, likely will continue to have Republican detractors who question the constitutionality of the terrorist watch list itself, and view the idea of taking guns away from those who are on the list as doubly unfair.

The influential National Rifle Association opposes the legislation.

“No one wants terrorists to have legal or illegal access to firearms,” said Chris Cox, executive director of the National Rifle Association’s Institute for Legislative Action.

In a statement, Cox said:

Keeping guns from terrorists while protecting the due process rights of law-abiding citizens are not mutually exclusive. Unfortunately, Senator Collins and others are focusing their efforts on unconstitutional proposals that would not have prevented the Orlando terrorist attack. The American people want Congress to stop playing politics and pass policies that will keep them safe from terrorists.

Established in 2003 in response to the 9/11 attacks and to criticism that intelligence agencies were not sharing information well, the FBI’s Terrorist Screening Center maintains what is commonly known as the terrorist watch list.

The list is a consolidated database of information about those known or reasonably suspected to have engaged in terrorism or related activities. The no-fly and selectee lists are a subset of the larger list. Individuals do not have to be charged with a crime to be placed on the lists, and many don’t know they are on one or more lists.

To address due process concerns, Flake’s bill allows someone on the no-fly and selectee lists who is blocked from buying a gun to appeal that decision.

If a judge determines the person should not have been blocked from buying the gun, the government has to pay that individual’s legal fees.

But the appeals process occurs only after he or she has been denied the purchase, which may not be enough for GOP lawmakers who prefer more protections on the front end of the transaction.

Some Democrats, meanwhile, could view the proposal as too narrow.

Sen. Dianne Feinstein, D-Calif., who authored one of the four bills that failed Monday, told reporters that the new proposal is “not enough to close the loophole that creates this terror gap.”

Depending on the level of support from Democrats (and two independents who caucus with them), it could take as many as a dozen or more Republican votes to overcome the 60-vote threshold in the Senate. The GOP controls 54 seats.