A Republican-led legislative panel rejected a bipartisan bill Wednesday to allow Denver to create a supervised injection site for drug users, despite pleas from public health experts and relatives of overdose victims.

The measure, Senate Bill 40, would have allowed one community in Colorado to create a site where drug users could inject with clean needles under the supervision of staff with medical training who can administer the overdose-antidote naloxone.

“The objective of this bill is merely to keep people alive,” said Dr. Robert Valuck, who coordinates the Colorado Consortium for Prescription Drug Abuse Prevention, in testimony before lawmakers. He called the legislation “a critical piece of a very large puzzle to address” the state’s opioid crisis.

In Denver, 174 people died of overdoses, at least 20 of them in parks, alleys or business bathrooms in 2016. That’s up from 129 deaths in 2015.

The measure won unanimous approval in a study committee in October, but it faced long odds in the state Senate, where lawmakers were concerned about condoning illegal activity. A last-minute rewrite to win votes did little to persuade the GOP lawmakers.

Sen. Owen Hill, R-Colorado Springs, said Colorado had “a much bigger problem than I ever realized” with opioids. But, in voting against it, he added: “I’m not yet moved that this is the right solution.”

The bill died on a 3-2 party-line vote.