DENVER ― Environmental activists here were dealt a blow Monday when the Colorado Supreme Court ruled against a closely watched case that would have required the state to prioritize health and environmental concerns in oil and gas permitting.

But with a newly Democratic legislature and governor in the state promising to take another look at the fracking debate, environmentalists are optimistic that they can pursue a successful strategy in the statehouse.

“This decision really validates everything that we’ve been saying, that this state is not prioritizing public health and safety, and that regulations are not sufficient,” said Anne Lee Foster of Colorado Rising, a group opposed to the hydraulic fracturing drilling technique known as fracking. “We’ve shown that this is a real issue impacting Coloradans every day, and we’re going to keep fighting until the end.”

“It’s in the hands of the legislators now,” she added.

Monday’s decision caps a five-year legal fight brought by six youth activists from Boulder County. The activists, led by Xiuhtezcatl Martinez, filed a petition with the state’s oil and gas regulatory body in 2013 asking that new permits be suspended until a comprehensive scientific study could show that new activity would be safe. When the petition was denied, the activists sued and ultimately won a favorable decision in the Martinez case in the state’s Appeals Court last spring.

But Monday’s Supreme Court ruling overturns that interpretation, leaving existing policy in place. The state, the court found, was right to continue to interpret permits by weighing “cost-effectiveness and technical feasibility” against adverse effects on health and the environmental.

The case was closely watched along Colorado’s Front Range, where the fracking boom has put wells near playgrounds, parks and schools (Extraction Oil and Gas infamously installed a fracking site just 1,360 feet from the largely minority Bella Romero Academy in Greeley.) Concerns about worsening air quality and health effects, such as increased cancer risks, have led to lawsuits and community actions, including an unsuccessful ballot measure in November to increase well setbacks, requiring that they be located at least 2,500 feet from occupied buildings.

Helen H. Richardson via Getty Images Anti-fracking protesters in Colorado rally earlier this month for a moratorium on new oil and gas wells.

The advent of hydraulic fracturing ― which involves shooting pressurized liquid into shale formations ― in the early 2000s allowed companies to reach untapped reservoirs of oil and gas. Colorado now has more than 56,000 active oil and gas wells, producing more than 1.7 million cubic feet of natural gas, the sixth most in the country.

The oil and gas industry applauded the Martinez case decision. The ruling “will continue to allow for development, while also protecting our environment,” Dan Haley, president and CEO of the Colorado Oil & Gas Association, said in a statement.

“Those who filed this lawsuit have said they want to ban oil and natural gas development in Colorado, so we’re happy to see the Supreme Court strike down this extreme effort and shortsighted agenda,” he added.

But the relief may not last long. A blue wave in the November midterm elections hit Colorado especially hard, installing Democratic majorities in the statehouse and throughout the administration. New Democratic Gov. Jared Polis campaigned on giving communities a larger voice in fracking decisions, a promise he reiterated in his State of the State address last week.

“It’s time for us to take meaningful action to address the conflicts between oil-and-gas drilling operators and the neighborhoods that they impact,” Polis said. “We will work to make sure that every community has clean air and water. And this is a vital quality-of-life issue for Colorado families.”

In a statement Monday, Polis said that he was disappointed in the court’s ruling and that it “only highlights the need to work with the Legislature and the Colorado Oil & Gas Conservation Commission to more safely develop our state’s natural resources and protect our citizens from harm.”

Polis had previously pushed a number of anti-fracking ballot measures, including a 2,000-foot setback (while running for governor this year, Polis did not endorse the larger setback) and an environmental bill of rights. In a compromise with then-Gov. John Hickenlooper in 2014 that took the measures off the ballot, Polis helped create a task force to weigh local control and environmental impacts.

Communities in every corner of our state want to know that their health and safety are being prioritized when it comes to oil and gas operations. Democratic State House Speaker KC Becker

Activist groups like Colorado Rising have asked Polis for a moratorium on new drilling, which is unlikely to happen, but they say they’re encouraged that Democrats could reinvigorate that debate. Democrats have discussed a number of potential bills that would codify the demands of the Martinez case or give local communities more power to say no to drilling (a state Supreme Court decision in 2016 barred townships and counties from passing fracking bans). As with the 2014 commission, any new debate is likely to be closely watched by states like Texas and Pennsylvania, which are dealing with their own fracking booms.

State House Speaker KC Becker, a Democrat from Boulder, said that the court ruling “puts the decision back into the hands of lawmakers to take action, and we are committed to addressing this concern in this legislative session.”

“Communities in every corner of our state want to know that their health and safety are being prioritized when it comes to oil and gas operations,” she added.

In an interview, Martinez, now 18, said the court ruling reaffirmed that newly elected Democrats needed to listen to community concerns. “If these politicians don’t recognize their responsibility to work with us and the people affected by this crisis, we’ll vote you out,” he said.

Even though Colorado politicians have usually been hesitant to regulate the lucrative fossil-fuel industry, Martinez said the rising tide of health concerns should elevate the debate.

“It’s getting fucking personal. It’s coming into Boulder County, where my family lives, where my little brother and my little sister go to school,” Martinez said. “This isn’t about the environment and air and water; this is about the health of our people and protecting what we love.