New York Gov. Andrew Cuomo European Pressphoto Agency

The decision to prohibit hydraulic fracturing in New York state Wednesday exposed the deep divisions over the issue and highlighted the political tightrope Gov. Andrew Cuomo had to tiptoe across.

On one side were liberal environmental activists who were cheered by the Democratic governor’s move to prohibit the natural-gas extraction technique known as fracking.

“This is the best example of bold, visionary and courageous leadership by him in at least a decade,” said Robert F. Kennedy Jr. , a friend and former brother-in-law of Mr. Cuomo who sat on a state fracking advisory committee but said he hadn’t counseled him on the matter in about six months.

On the other were landowners and local officials along a stretch of New York bordering Pennsylvania known as the Southern Tier, an economically depressed region where some saw fracking as a lifeline.

When Conklin, N.Y., town supervisor Jim Finch heard the news, he began drawing up plans to secede from the state. “I’m serious,” said Mr. Finch, who oversees a town of some 5,000 people on the Susquehanna River just a few minutes’ drive from the Pennsylvania border. “New York City determines policy in the Southern Tier? That’s baloney.”

The decision to ban fracking in New York, pitting environmental and health concerns versus economic growth, will have long-term political consequences for Mr. Cuomo, political observers said,

The governor may have appeased some of his fiercest liberal critics who supported a primary challenge. But he has also incensed some officials and landowners in upstate New York, a part of the state Mr. Cuomo lost in the November election.

“All in all, it’s going to prove a controversial decision that creates blowback,” said Doug Muzzio, a political-science professor at the City University of New York. “It helps and it hurts.”

People on both sides of the issue had been pressuring Mr. Cuomo to make a decision on fracking since he took office in 2011. His predecessor, Gov. David A. Paterson, had imposed a moratorium, but the nation’s shale boom—especially across the border in Pennsylvania, where energy jobs were driving the economy—presented Mr. Cuomo with a quandary.

Mr. Cuomo delayed any decision, asking his Department of Health to study the matter in 2012 and then waiting until after the November election to announce what he would do. On Wednesday, Mr. Cuomo said he was taking the advice of his commissioners who cited health and safety concerns in their decision-making and said the economic benefits to drilling there were limited.

At a news conference Wednesday, Mr. Cuomo dismissed the notion that politics played any role in the decision or that the outcome had anything to do with trying to mend fences with liberals. “I don’t consider it a highly relevant factor to anything,” he said.

At several points, the governor emphasized that the issue was more emotionally charged than any he has confronted, including same-sex marriage and gun control. Mr. Cuomo was given no easy answers by public opinion, which has been split evenly on fracking.

The issue galvanized swaths of voters during Mr. Cuomo’s primary race earlier this year against Zephyr Teachout, a Fordham law professor who criticized Mr. Cuomo for being aligned on some issues with the GOP. Ms. Teachout won about 34% of the vote overall in the primary, claiming victory in nearly two dozen upstate counties, including Columbia, Delaware, and Dutchess, where fracking is a divisive issue.

Ms. Teachout claimed some credit for Mr. Cuomo’s decision. “We know he heard the campaign,” she said.

In the general election, Mr. Cuomo bested a Republican challenger with about 54% of the total vote, but the governor lost in several Southern Tier counties, the heart of pro-fracking advocacy. In Allegany County, Mr. Astorino captured more than 71% of the vote.

Mr. Cuomo, who is from New York City, has worked to build support outside his geographical base, investing in Buffalo and hosting tourism events upstate, making a point to shine attention on the region. But his decision on fracking could reverse some of the goodwill fostered.

Farmers had hoped leasing land to petroleum companies would bring a boon to parts of the state where the economy has been sluggish. Debbie Preston, the Broome County executive, said she was “very disappointed.”

The decision was also criticized by some state Republicans, with whom Mr. Cuomo is sometimes aligned. “Despite protests to the contrary, it appears that politics, not science, shaped this decision,” said Sen. Dean Skelos, a Long Island Republican.

But turning allies into enemies, and vice versa, is old-hat for Mr. Cuomo, said Mr. Muzzio, the Cuny professor. “This is consistent with the fact that you need bifocals to look at Andrew Cuomo,” he said. “People look at Andrew Cuomo like the visual gestalt switch. You see the old hag or the beautiful woman. You tend to see what you want to see.”

Corrections & Amplifications

An earlier version of this article incorrectly referred to Conklin, N.Y., town supervisor Jim Finch as Mr. Conklin on second reference.

Write to Mike Vilensky at mike.vilensky@dowjones.com and Erica Orden at erica.orden@wsj.com