A complex network of pipelines, some under construction, links oil and gas wells in Larimer County with Crestone Peak Resources' hub off of Weld County Road in Erie. (Doug Conarroe, The Colorado Sun)

Senate Bill 181, Democrats’ omnibus effort to regulate Colorado’s $32 billion oil and gas industry, is heading to Gov. Jared Polis’ desk.

The Colorado Senate approved House changes to the measure on Wednesday, ending weeks of debate on a bill that drew backlash from Republicans and the energy industry.

A number of changes were made to the measure before it cleared its final hurdle in the legislature this week.

MORE: The oil and gas bill is nearing final approval. Here’s a look at the concessions the industry won.

Senate Majority Leader Steve Fenberg, a Boulder Democrat who led the push for the bill, said Wednesday that the measure isn’t perfect and that neither the industry nor oil and gas activists got everything they wanted with the legislation. But, he said, it’s a solid start toward prioritizing health and safety when it comes to drilling in Colorado.

The legislation would make the protection of public health and safety and the environment the top priorities of state energy regulators. It also would grant local governments new authority over where wells can be drilled.

Currently, regulators’ top priority is encouraging production, and only the Colorado Oil and Gas Conservation Commission, the state’s regulatory body, can approve well locations.

“While we clearly disagree on this bill, we appreciate that legislative leaders heard us and opened a dialogue in the final two weeks about the unintended, and intended, consequences of the legislation as introduced,” Dan Haley, who leads the Colorado Oil and Gas Association, said in a written statement. “We hope that dialogue will continue for the remainder of the legislative session and beyond—that’s how Colorado should work.”

MORE: The oil and gas industry is again spending big to stop more regulation in Colorado. This time, it’s not working.

Environmentalists applauded the bill’s passage.

“Coloradans can breathe easier today knowing that our state is finally on track to put the health and safety of workers and residents, and our environment ahead of oil and gas industry profits,” said Kelly Nordini, who leads the liberal-leaning environmental advocacy group Conservation Colorado. “Thank you to our leaders who heeded voters’ clear message and delivered these overdue reforms.”

Polis is expected to sign the bill.

The Associated Press contributed to this report.

We use this byline as a placeholder in breaking news situations when an editor has written a story. The byline will be updated when the story contains information gathered by a reporter.