New York’s cities and towns can block hydraulic fracturing within their borders, the state’s highest court ruled, dealing a blow to an industry awaiting Gov. Andrew Cuomo’s decision on whether to lift a 6-year-old statewide moratorium.

The case, closely watched by the energy industry, may invigorate local challenges to fracking in other states and convince the industry to stay out of New York even if Cuomo allows drilling. Pennsylvania’s highest court issued a similar ruling last year, striking down portions of a state law limiting localities’ ability to regulate drillers.

“This sends a really strong and clear message to the gas companies who have tried to buy their way into the state that these community concerns have to be addressed,” said Katherine Nadeau, policy director for Environmental Advocates of New York, an anti-fracking group. “This will empower more communities nationwide.”

The ruling may lead the oil and gas companies to further abandon efforts to extract gas in New York, said Thomas West, an attorney for Norse Energy, one of the companies in the case.

Unlimited Digital Access. $1 for 4 weeks.

“It’s going to have a real chilling effect on the investment in New York,” he said. “Most of the major companies are not going to see New York as open for business if they have to develop the resource around municipalities with bans.”

By a 5-2 vote, the Court of Appeals upheld the dismissal of lawsuits challenging bans in the upstate towns of Dryden and Middlefield. The towns engaged in a “reasonable exercise” of zoning authority when they banned oil and gas extraction and production, Judge Victoria Graffeo wrote.

The towns were within their rights to find that drilling “would permanently alter and adversely affect the deliberately cultivated small-town character of their communities,” she said.

The ruling is “one more nail in the coffin” for fracking in the state, said Brad Gill, executive director of the Independent Oil and Gas Association of New York. Chesapeake Energy Corp. and other firms that divested New York assets “could see the writing on the wall.”

Fracking, as hydraulic fracturing is known, is the creation of fractures in rocks and rock formations by injecting fluid into cracks. The larger fissures allow more oil and gas to flow out of the formation to be carried to the surface.

The process, used in states from North Dakota to Pennsylvania, has helped push U.S. natural-gas production to new highs in each of the past seven years, according to the U.S. Energy Information Administration. It has also come under attack from environmental advocates, who fear it may contaminate water supplies and destroy farmland.

Parts of New York sit above the Marcellus Shale, a rock formation that the Energy Information Administration estimates may hold enough gas to meet the demands of the U.S. market for almost six years. The state barred fracking in 2008 while studying the environmental effects of the drilling method, which is allowed in more than 30 states.