The tiny township of Dryden, N.Y., knew it was taking on big corporations when it passed a zoning law prohibiting gas drilling within town limits. And Dryden has won the first round with a New York state court’s decision that local governments can ban drilling despite state laws that say they can’t, according to ProPublica.

Environmental advocates say the ruling by New York State Supreme Court Justice Phillip Rumsey could set a precedent for how local governments can regulate fracking, a process that uses pressurized water, sand and other chemicals to extract gas from deep underground. The process has stirred controversy as a possible environmental hazard.

Drilling companies have leased 22,000 acres for drilling in Dryden. When the town board prohibited gas drilling, Denver-based Anschutz Exploration Corp. sued, arguing that New York state laws regulating oil and gas drilling supersede municipal rules.

Dryden officials said they were trying to protect the town’s residents. That argument apparently prevailed with Rumsey, who ruled that state laws were not intended “to encourage the maximum ultimate recovery of oil and gas regardless of other considerations, or to preempt local zoning authority,” according to ProPublica.

The case mirrors similar conflicts. Local governments have long controlled land use through zoning laws, but drilling companies argue that the state should make decisions about developing natural resources like oil and gas, rather than a patchwork of local ordinances. States have generally deferred the issue to the courts.

Anschutz could appeal the decision in the Dryden case, though the company has not decided if it will do so. Meanwhile, environmental advocates hailed the ruling. “The argument is simple,” Eric Goldstein, a senior attorney for the Natural Resources Defense Council in New York, told ProPublica. “New York state laws shouldn’t override the authority of local governments to protect their constituents.”