ALBANY, N.Y. (AP) — A state judge invalidated Binghamton's two-year moratorium on natural gas drilling, marking the first time a local law that would ban or delay hydraulic fracturing in New York has been struck down.

State Supreme Court Justice Ferris D. Lebous became the latest New York judge to weigh in on local bans or moratoriums Tuesday, ruling that the city law approved December 2011 failed to meet the standards of a properly enacted moratorium. Lebous said the city never established that there was a "dire emergency" regarding a practice that is still not allowed in New York.

"There can be no showing of dire need since the New York state Department of Environmental Conservation has not published the new regulations that are required before any natural gas exploration or drilling can occur in this state," Lebous wrote.

Gov. Andrew Cuomo's administration is considering whether to allow natural gas drilling using hydraulic fracturing, or fracking, a process involving the injection of wells with chemically treated water that is denounced by many environmentalists.

As the DEC review continues, more than 30 upstate municipalities have passed bans on gas drilling and more than 80 have enacted moratoriums. The laws enacted by towns sitting atop the gas-rich Marcellus Shale formation are typically in response to fears that fracking could contaminate water supplies, though the energy industry says the process has been used safely for years.

Local bans in Dryden and Middlefield have already passed muster with state courts. Lebous referred to those two previous court decisions as "well-reasoned" and focused his decision on Binghamton's actions. Despite the loss for Binghamton, about 130 miles southwest of Albany, environmentalists said the ruling reaffirms the legal right for local bans. Lawyers for environmental groups said they don't believe this ruling would imperil the other local bans.

"Almost all of the decision is very fact specific and limited to Binghamton, which had a very unique law," said Helen Slottje, an attorney with the Community Environmental Defense Council, which represented the city.

Binghamton Mayor Matthew Ryan said Wednesday an appeal is likely. He said the city could try to pass a similar law that would not run afoul of the court.

City officials had argued the law was not a moratorium but an emergency action to protect its water. But Lebous ruled it was a moratorium and held the city to that strict legal standard.

The lawsuit was bought by a group of plaintiffs who claimed the law could harm their business or prevent them from obtaining natural gas leases.

"You've got to follow the letter of the law," said Kenneth S. Kamlet, a lawyer for the plaintiffs. "The city of Binghamton didn't play by the rules, and they had to pay the piper."

Also on HuffPost:

Loading Slideshow...
  • State Lawmakers And Environmental Activists Express Opposition To Hydro Fracking

    NEW YORK, NY - JANUARY 11: Opponents of hydraulic fracturing in New York state attend a news conference and rally against hydraulic fracturing, also known as fracking, on January 11, 2012 in New York City. The event, which was held on the steps of City Hall, called for an end to the controversial gas drilling method as environmental groups increasingly warn about contamination of the state's aquifers that could poison its drinking water. (Photo by Spencer Platt/Getty Images)

  • State Lawmakers And Environmental Activists Express Opposition To Hydro Fracking

    NEW YORK, NY - JANUARY 11: Eric Weltman of Food & Water Watch attends a news conference and rally against hydraulic fracturing, also known as fracking, in New York State on January 11, 2012 in New York City. The event, which was held on the steps of City Hall, called for an end to the controversial gas drilling method as environmental groups increasingly warn about contamination of the state's aquifers that could poison its drinking water. (Photo by Spencer Platt/Getty Images)

  • Department Of Environmental Conservation Holds Hydro Fracking Hearing

    NEW YORK, NY - NOVEMBER 30: Opponents and supporters of gas-drilling, or fracking, walk into the last of four public hearings on proposed fracking regulations in upstate New York on November 30, 2011 in New York City. Fracking, a process that injects millions of gallons of chemical mixed water into a well in order to release gas, has become a contentious issue in New York as critics of the process belive it contaminates drinking water among other hazards. NewYork City gets much of its drinking water from upstate reservoirs. If the regulations are approved, drilling in the upstate New York Marcellus Shale could begin next year. (Photo by Spencer Platt/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Engineers on the drilling platform of the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Engineers at work on the drilling platform of the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: General views of the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Engineers look at the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: A lump of shale rock on display at the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Engineers on the drilling platform of the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Engineers at work on the drilling platform of the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: Drill heads on display at the entrance to the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Cuadrilla Shale Fracking Plant

    PRESTON, LANCASHIRE - OCTOBER 07: An engineer displays a lump of shale rock at the Cuadrilla shale fracking facility on October 7, 2012 in Preston, Lancashire. The controversial method of extracting gas by pumping high pressure water and chemicals into shale formations deep underground has been blamed for two minor earthquakes in the surrounding region. Environmental campaigners are calling for a halt to the drilling of what Cuadrilla believe could be significant reserves of natural gas. (Photo by Matthew Lloyd/Getty Images)

  • Hydraulic Fracturing Prevention Press Conference

    NEW YORK, NY - APRIL 25: Actor/director Mark Ruffalo (C) speaks at the Hydraulic Fracturing prevention press conference urging the protection of the drinking water source of 15 million Americans at Foley Square on April 25, 2011 in New York City. (Photo by D Dipasupil/Getty Images)

  • Hydraulic Fracturing Prevention Press Conference

    NEW YORK, NY - APRIL 25: (L-R) Actor/director Mark Ruffalo, Denise Katzman, Wenonah Hauter, and Water Defense co-founder/campaign director Claire Sandberg attend the Hydraulic Fracturing prevention press conference urging the protection of the drinking water source of 15 million Americans at Foley Square on April 25, 2011 in New York City. (Photo by D Dipasupil/Getty Images)

  • Josh Fox on Obama, the EPA, and House Republicans Who Had Him Arrested

    HuffPost Green Editor Joanna Zelman talks to Josh Fox, director of the documentary 'Gasland,' about hydro-fracking, the EPA, and the House Republicans who had him arrested during a Congressional hearing.

  • Game Changer in Green: Mark Ruffalo

    The expertise and the grassroots zeal Mark Ruffalo has brought to the issue of fracking is changing the game in green.