Legislation that would allow Colorado judges to order the seizure of guns from people who are considered a “significant risk” to themselves or others passed out of the Democratic-controlled House on Friday night with almost no Republican support.

House Bill 1436 cleared the chamber by a 37-23 vote — with two Republicans voting “aye” — but not before facing another round of GOP backlash.

“If you truly care about those in uniform who protect us every day you will not take away the rights that they defend overseas,” said House Minority Leader Patrick Neville, R-Castle Rock, in assailing the measure.

Red flag bill passes the Colorado House, but with almost no GOP support. #coleg #copolitics pic.twitter.com/Nnn3q8UsxW — Jesse Aaron Paul (@JesseAPaul) May 5, 2018

Democrats argue the legislation is among the best of so-called “red flag” bills and laws in the U.S.

“We have the opportunity to take a vote today that I truly believe will save lives,” said Assistant House Majority Leader Alec Garnett. “This bill has the potential to prevent mass shootings … and suicides.”

The bill would allow relatives, household members or law enforcement to petition a judge to issue a temporary extreme risk protection order for the removal of firearms from a person who is deemed a significant risk. The court would hold a second hearing within a week on whether to weigh evidence that would bar the person from having or receiving a firearm for six months — and potentially longer.

The judge could consider a person’s recent credible threats of violence, relevant mental health issues, any history of domestic violence, abuse of controlled substances and evidence of a recent acquisition of a firearm or ammunition to determine if they are a risk.

Gun control groups have been pushing for a red flag bill in Colorado for months and a recently released poll indicated there’s broad support for the concept among likely Colorado voters. But when the measure was introduced earlier this week, it immediately sparked blowback from conservatives who worry it represents government overreach.

Another vote in defense of our civil liberties. No on HB 18-1436. Twitter will only let me tag 10 of my colleagues, but many more joined me in defense of your civil liberties #coleg #copolitics pic.twitter.com/jEsFbG0IBB — Justin Everett (@Everett4Colo) May 5, 2018

Assistant House Minority Leader Cole Wist, a Centennial Republican who is a co-prime sponsor of the bill, even faced a demotion attempt by fellow GOP lawmakers and attacks by an ardent gun rights group over the legislation. He called it “easily the toughest” issue he’s worked on during his three sessions at the legislature.

“I know that it’s been a tough week, and I know that for some of you, you’re not happy with me that this bill dropped without prior notice to the caucus,” he said on the House floor. “… I recognize that this bill is likely to die when it leaves this chamber.”

The bill now heads to the Republican-controlled Senate, where its chances appear to be poor because GOP leadership there has already expressed serious reservations about the bill.

“I haven’t liked what I’ve heard so far,” Senate President Kevin Grantham, R-Cañon City, told reporters earlier in the week.