The energy industry and policy makers in Pennsylvania, the heart of the nation's gas drilling boom, are thinking about their next moves after the state's highest court threw out significant portions of a law that limited the power of cities and counties to regulate the industry.

The state supreme court voted 4-2 on Thursday to strike down portions of a 2012 law that had been crafted by governor Tom Corbett and his industry-friendly allies in the legislature.

Republican leaders in the general assembly said the decision raised more questions than it answered and could damage the growing industry. They said they were not sure, for example, what the ruling would mean for the millions in impact fees being collected under the law.

Pennsylvania has over the past five years seen a boom in drilling and related industries rushing to exploit the deposits in the rock formation known as the Marcellus Shale, which lies deep underneath several eastern states.

The high court's decision comes as the energy industry is increasingly able to harvest oil and gas from those previously unreachable formations and, as a result, is bumping up against suburban and urban expectations of land use in states including Texas, Colorado and Ohio, where a similar legal challenge is under way.

The court majority said the law violated the state constitution, although they issued different opinions about why.

Seven municipalities had challenged the law that grew out of the state's need to modernize 20-year-old drilling laws to account for a Marcellus Shale drilling boom made possible by innovations in technology, most notably horizontal drilling and hydraulic fracturing. The process, popularly called fracking, has drawn widespread criticism from environmentalists and many residents living near drilling operations.

"Few could seriously dispute how remarkable a revolution is worked by this legislation upon the existing zoning regimen in Pennsylvania, including residential zones," wrote chief justice Ron Castille. He said the law's rules represented an unprecedented "displacement of prior planning, and derivative expectations, regarding land use, zoning, and enjoyment of property."

After the industry began descending on the Marcellus Shale in earnest in 2008, state supreme court decisions expanded the legal gray area surrounding the extent of municipal authority over the operation and location of oil and gas wells, critics of the decisions say. Some companies complained that municipalities, mostly in southwestern Pennsylvania, had tried to use zoning rules to unreasonably limit drilling.

As a result, many in the industry made it a top priority to secure a law that eliminated any municipal authority over how drilling companies could operate. Corbett took office in 2011 and backed the industry, believing that a 1984 state law had intended to do that anyway.

Colorado and Ohio have recently passed such laws. In New York, where state officials essentially put MarcellusShale drilling on hold, state courts are currently deciding whether local governments have the right to ban the industry from operating within their borders.

The law restricted local municipalities' ability to control where companies may place rigs, waste pits, pipelines and compressor and processing stations. The new zoning rules never went into effect because of a court order. A narrowly divided lower court struck them down in 2012, but Corbett appealed, saying lawmakers have clear authority to override local zoning.

Among the objectionable provisions cited by the lawsuit were requirements that drilling, waste pits and pipelines be allowed in every zoning district, including residential, as long as certain buffers were observed.

"We must not allow today's ruling to send a negative message to job creators and families who depend on the energy industry," Corbett said, adding he will continue to work to help the energy industry thrive. Republican leaders said they were unsure whether the decision invalidated impact fees that have generated hundreds of millions of dollars.

The municipalities argued the zoning restrictions ran counter to objectives of protecting the environment, health and safety of people who live there, and three of the six justices agreed. A fourth justice ruled that the law violated the municipalities' constitutional rights to due process to carry out community planning.

Justice J Michael Eakin said he would have upheld the law. He had concerns about the power the majority gave to the state's thousands of local entities at the expense of the Legislature.

"Giving standing to some 2,500 sets of local officials to sue the sovereign based on alleged violations of individual constitutional rights is misguided, and will have precedential repercussions — I fear we will soon face a tide of mischief that will flow from such an ill-advised notion," Eakin said.