DENVER — State lawmakers killed legislation dubbed the “No Kings Act” on Monday night, as opposition from local government groups tanked a bill that would have allowed Coloradans to sue federal officials who violated their civil rights.

Two Democrats — Sens. Dylan Roberts and Lindsey Daugherty — joined with the Senate Judiciary Committee’s Republican Sens. John Carson and Byron Pelton to kill Senate Bill 176 on a 4-3 vote. Had it passed, the “No Kings Act” would’ve allowed lawsuits against federal officials for violating residents’ civil rights, filling what supporters had described as a gap in state and federal law that largely provides no legal avenue to challenge federal authorities’ actions.

The measure was an expanded version of another bill that’s already passed the Senate. That one would allow lawsuits against federal officials involved in immigration enforcement. But Senate Bill 5 is narrower — meaning that it wouldn’t cover election interference, for instance, or other federal overreach.

SB-5 is also likely more legally uncertain, since laws similar to it have been challenged in Illinois and overturned in California. Supporters of the wider-scoped SB-176 argued that it was more likely to survive an almost-certain legal challenge from the Trump administration.

“Members, we grapple with hundreds of bills a year. I don’t know if anything I’ve done in 10 sessions cuts down quite as deep (into) the basic questions of government as this one does,” Sen. Mike Weissman, an Aurora Democrat, told the committee shortly before the vote. He sponsored the bill with Sen. Julie Gonzales. “Do we stand by people’s rights? Do we have remedies? I hope we have remedies, and I desperately hope we don’t need to use them.”

But the bill was opposed by a swath of groups representing local officials, police departments and counties, led by the state’s elected district attorneys.

To pass constitutional muster, the bill was drafted so that it would allow Coloradans to sue local and federal officials. That prompted prosecutors and others to argue that the bill opened them up to waves of new lawsuits.

“The concern that we’ve got, which is a serious one, is that we will be litigating the scope of this law, and the extent of federal law applying here, for years,” Denver District Attorney John Walsh told the committee.

He argued that federal officials would never face a successful lawsuit under the law and that SB-176 would instead “be unleashed on state and local officials.”

Attorney General Phil Weiser, a Democrat who has pinned part of his gubernatorial campaign’s appeal on his own efforts to repeatedly sue the Trump administration, also opposed the bill.

The bill’s proponents, as well as outside legal experts who spoke with The Denver Post, said those fears were unfounded.

State officials already can be sued under federal law for civil rights violations, and the bill did not change immunity or liability protections that provide shields to those officials. More than 160 former Department of Justice attorneys, including seven former U.S. attorneys, sent the Judiciary Committee a letter urging them to pass SB-176. They argued that the bill “would not change the status quo for state and local officials.”

That letter was sent to lawmakers by Gov. Jared Polis’ office, which “urged” the committee to consider the former officials’ comments. Eric Maruyama, a Polis spokesman, previously had said that the governor was only “open” to the bill.

“If you’re a district attorney or something, you don’t want to take any chances; anything that could reduce your immunity, you want to oppose,” Jonathon Booth, a historian and law professor at the University of Colorado Law School, said in an interview last week.

But he said that, in his view, there was nothing in the bill to validate that concern: “I don’t think it’s a realistic interpretation of what this bill would do.”

Stan Garnett, a defense attorney and former district attorney in Boulder, said he understood the prosecutors’ concerns and that it wasn’t clear how Colorado courts would interpret the new law. But he, too, said he didn’t believe the bill would actually change liability or immunity for local officials.

Connecticut and Vermont recently passed legislation similar to SB-176.

Still, Daugherty and Roberts said they were swayed by concerns from local advocates, including those representing public health officials and school administrators, who argued that their employees would suddenly be overwhelmed with costly lawsuits.

“Unfortunately, I do think this would increase litigation and have a chilling effect on the independent decision-making that public officials should have,” Daugherty, an Arvada Democrat, said.

The death of SB-176 is another win for local law enforcement groups. Opposition from police officials and sheriffs sank two bills that tried to limit the government’s ability to buy people’s private data and to use and access information collected by license plate-reading cameras.

The remaining bill that would allow lawsuits against some federal officials, SB-5, passed its final committee vote on Monday. It is next set for two full votes on the House floor. This year’s legislative session ends May 13.