ALBANY – Localities may use zoning ordinances to restrict or ban oil and gas production—including the controversial method of extracting natural gas known as “fracking”­—without violating state mining laws, a divided state Court of Appeals ruled Monday.

The 5-2 court decided that bans against fracking, or hydraulic fracturing, enacted by Dryden in Tompkins County and Middlefield in Otsego County are not barred by the “supersession” clause contained in §23-0303(2) of the state Environmental Conservation Law. The statute holds that the state law shall “supersede all local laws or ordinances relating to the regulation of the oil, gas and solution mining industries.”