DENVER (AP) — Colorado Gov. Jared Polis on Tuesday signed into law a major overhaul of state oil and gas rules, turning the focus away from encouraging production and directing regulators to make public safety and the environment their top priority.

The law also gives local government significant new authority to restrict the location of wells, which could limit or prohibit drilling in some areas near homes and schools.

“Today, with the signing of this bill, it is our hope that the oil and gas wars that have enveloped our state are over, and the winner is all of us,” said Polis, a Democrat.

The state has struggled for years to balance the interests of the booming industry against growing concerns of people who live nearby drilling rigs, wells and tanks.

Colorado ranks fifth nationally in crude oil production and sixth in natural gas. The industry says it contributes 2 billion annually to the state economy, including taxes and 89,000 direct and indirect jobs.

But fast-growing communities north of Denver are spilling into the state’s most productive oil and gas area, the Wattenberg field, sparking complaints about noise and pollution and provoking fears about explosions.

In 2017, natural gas escaping from a severed pipeline was blamed for an explosion that destroyed a house in Frederick, about 30 miles (50 kilometers) north of Denver. Mark Martinez and his brother-in-law, Joseph Irwin, were killed.

Martinez’s wife, Erin, was badly injured. She became a quiet but effective advocate for the new law.

“This is something that means a lot to our family,” she said after Polis signed the bill. “We feel like it’s a great way to honor Mark and Joey. The second anniversary (of the explosion) is tomorrow, so it’s really fitting we got that done before that came.”

Supporters said the law brings much needed protections for Colorado’s booming population, its environment and its growing recreation industry.

Opponents warned the law could stifle a major industry, kill jobs and shrink tax revenue.

Barbara Kirkmeyer, a Weld County commissioner and fervent industry supporter, is leading an effort to ask voters to overturn the law in November. She said her proposal would create an independent regulatory commission insulated from Colorado’s back-and-forth battles over oil and gas.

Also in Weld County, critics of Democratic state Rep. Rochelle Galindo, who voted for the law, started a drive to oust her. They need about 5,700 petition signatures by June 3 to force a recall election.

Colorado voters rejected previous attempts to impose tighter restrictions on the industry, including a proposal on last November’s ballot that would have increased the minimum distance between new wells and homes from 500 feet (150 meters) to 2,500 feet (750 meters).

The industry spent heavily on advertising to defeat the measure.

The new law does not change the setback but does allow local government to use land-use regulations to limit where wells can be drilled. That could make it much harder to drill on the western and southern edges of the Wattenberg field, near Boulder and the Denver suburbs.

But industry-friendly Weld County is not expected to impose tougher rules.

Industry analysts said the law will increase the cost of drilling for oil and gas in Colorado, which could drive some companies to states with fewer restrictions.

Specific effects of the law won’t be clear until state and local regulations are rewritten, which could take years, said Dan Haley, president of the Colorado Oil and Gas Association.

Haley said the industry supported some amendments that were made before final passage but still opposes the legislation overall.

___

Follow Dan Elliott at http://twitter.com/DanElliottAP.