HARRISBURG — A dispute over Pennsylvania’s attempt to establish statewide zoning for Marcellus Shale drilling likely is headed to the state’s top court, after an appellate panel on Thursday overturned the new rules.

Judges on the Commonwealth Court ruled that Pennsylvania cannot require municipalities to allow drilling in areas where it would conflict with their zoning rules, siding with several towns challenging the five-month-old law.

That law enacted a sweeping set of changes for how the gas drilling industry operates within Pennsylvania. It created a per-well annual fee, updated dozens of regulations, and, most controversially, dictated which aspects of drilling can and cannot be regulated locally.

The decision grants a reprieve to townships that had about two weeks left to overhaul their ordinances before an injunction delaying that section of the new law was to expire.

In fact, Cranberry planned to hold a hearing Thursday on its revised ordinance.

“It’ll make that portion of the agenda very short,” said Cranberry manager Jerry Andree after the ruling.

That was the message in the challenge filed by municipal officials, who said the broad requirements for where gas wells and compressor stations must be allowed would inhibit their ability to protect the health and safety of residents.

The majority opinion, written by Judge Dan Pellegrini, agreed with the local officials’ concerns. He wrote that the required rule changes would alter the character of neighborhoods and make the existing municipal zoning plans irrational.

“If a municipality cannot constitutionally include allowing oil and gas operations, it is no more constitutional just because the Commonwealth requires that it be done,” the opinion states.