For seven years, fracking roiled New York. Back in the summer of 2007, when the gas industry started knocking on doors in Delaware County, a faultline ran right through the home of Mark Dunau and Lisa Wujnovich.

In 2014, the state announced a ban, but that faultline still runs through local and national politics, and even through the Democratic presidential primary. Activists fear Hillary Clinton’s pragmatic approach is too soft on fracking, and support her rival Bernie Sanders’ call for a national ban. Clinton supporters, meanwhile, have begun to worry that opposition to fracking would weaken her in a general election.

For some, the issue has always been personal. At his organic vegetable farm in Hancock, New York, Dunau recalled his enthusiasm about leasing parts of his 50-acre lot to be fracked. In 2007, nobody knew much about fracking – the process of injecting fluid into shale rocks to fracture them and release natural gas – but a friend who was making money in the industry told him it was fine.

“Why am I giving up free money?” he figured.

His wife’s response, however, was swift: “Over my dead body.”

They ended up in the office of a mediator in nearby Oneonta, where Wujnovich explained that the industry violated her core values.

“I know Lisa,” Dunau says, “so I was like, ‘This will never work.’”

On the drive home, they hit two deer. They read it as a message from the land: they wouldn’t sign a lease.

Dunau dropped the issue to protect his marriage – his wife, a poet, has since penned verse comparing fracking to the rape of a daughter. (“Are you Marcellus Shale’s mother? I’ve got a deal you can’t refuse …”)

But he also did some research. By early 2008, when Dunau learned gas companies had refused to disclose chemicals that went into fracking fluid, he was convinced the practice wasn’t safe. His wife welcomed him to the club.

“For me, and for many women I knew, it was like: ‘Thou shalt not kill,’” she says. “It never had to be so cerebral with me. But with him, we had to go cerebral.”

Mark Dunau and Lisa Wujnovich pose for a portrait on their farm in Hancock, New York. Photograph: Brett Carlsen/The Guardian

The couple’s story can be seen as a microcosm of what happened around the state. After a flurry of lease-signing in 2007 and 2008, the government stepped in. By the fall of 2010, the assembly had approved a fracking moratorium. In 2014, after a re-election campaign in which his opponent ran to his left, governor Andrew Cuomo cited health risks and announced a complete ban.

The ban was perhaps not surprising in a state with environmental bona fidesdating back at least as far as Teddy Roosevelt. Just across the border, Pennsylvanians moved in the opposite direction.

Josh Fox, the film-maker behind the anti-fracking documentary Gasland, considers Western, Pennsylvania a case study in harm. He argues that environmental and health concerns aside – and he has many – fracking will give few people as much money as their land is actually worth, because it becomes useless once drained of its gas.

“The myth that this makes people richer is exactly that,” he says.

Fox isn’t alone. Cuomo’s ban enjoys a 55% approval rating, and the decision is even more liked by Democrats. But some in New York still feel left behind.

Chris Ostrowsky, a housing contractor who works in and around Binghamton, said that while he doesn’t see fracking as a cure-all for the area’s problems, he does think it would provide a much-needed “shot in the arm”.

“With everything, there’s a risk,” he said. “Get in a car, it could crash, but you don’t stop driving every day.”

Ostrowsky owns 85 acres in the city of Conklin, about 20 minutes south of Binghamton. He’s more worried about other things, like what he sees as the loss of godliness in American politics. He likes Donald Trump, he said, because he “does his own thing” and the “Make America Great Again” message resonates. It means a return to the era of Reagan.

“You can’t even go to the bathroom without standing next to someone of the opposite gender,” Ostrowsky says. “We’re becoming the minority,” he added. “If someone wants to be gay or a lesbian, fine. Just don’t make me accept it.”

Brant’s Dairy Farm, which partly leases to fracking. Photograph: Brett Carlsen/The Guardian

Others, like Aaron Price, a native of nearby Windsor and the director of a number of documentaries (one sponsored by the American Petroleum Institute) about the gas industry, still hope to reverse the fracking regulations. “People hoped it would be the next big thing. Instead, it was the next big delay.”

•••

Few who support the industry share his optimism two years into the ban. But the disenchantment described by Ostrowsky and others is being capitalized on by Trump – potentially dangerously for Democrats.

Campaigning in Albany on Thursday, the Manhattan businessman bemoaned the ban. While Pennsylvania was experiencing an economic boom fueled by gas drilling, he said, people in rural New York had been left behind.

“It’s a terrible situation, and New York is in deep trouble,” Trump told a local radio station. “As you know, we didn’t take advantage of our energy situation, and now it’s very late because the prices are so much lower.

People are literally in poverty. It’s just so incredible and we never took advantage Donald Trump, on New York's fracking ban

“And you look at Pennsylvania, right along the [state] line, they have machines all over the place and people driving around. You know the expression – they are driving in their Cadillacs. And on the other side of the line, which is just an artificial line, and people are literally in poverty. It’s just so incredible and we never took advantage.”

The lament over lost opportunity has appealed to the angry, disillusioned white people who have become Trump’s base, and may help him win the New York Republican primary.

On the Democratic side, the candidates are singing a very different tune. At a rally in Binghamton earlier this week, Bernie Sanders not only praised the ban – he also called for it to go national.

“What you have done is proof to the world,” he said, “that when people stand up and form a grassroots movement of environmentalists, public health advocates, farmers, working families and religious leaders, there is nothing that we cannot accomplish.”

At the debate in Brooklyn Thursday night, the Vermont senator drove the point home, attacking Clinton for her support of fracking and natural gas production while she served under Barack Obama.

“When you were secretary of state, you also worked hard to expand fracking all over the world,” he said.

When you were secretary of state you also worked hard to expand fracking all over the world Bernie Sanders, to Hillary Clinton

Clinton has sought to carve out an identity as a pragmatist, and argued that countries like China need natural gas to wean off coal and dirtier forms of energy.

For Wes Gillingham, cofounder of the environmental group Catskill Mountainkeeper, the Sanders campaign echoes the fight to ban fracking in New York.

“They said Bernie can’t win but he’s winning,” Gillingham said, “and he’s winning on the fracking issue, which years ago we were told we can’t win.”

Though many hoped Sanders and Clinton would find common ground here, they have clashed more than ever, and the issue threatens to divide Democrats at large. Green activists have vowed to bring thousands of protesters to the convention in Philadelphia to press for a nationwide ban.

Even if Sanders does not win the nomination, the primary fight could push Clinton far enough left on the issue to leave her exposed against Trump. He and other proponents of the fossil-fuel industry have already exploited the rift to remind voters about the potential wealth drawn from the earth.

•••

Mark Dunau isn’t particularly worried about the general election – yet. When I visited, he had recently returned from the Sanders rally in Binghamton. Despite his excitement, though, he said: “Should Bernie lose, there’s no doubt I’ll be voting for Hillary in the general.”

Dunau and Wujnovich live in a converted dairy barn, built in the 1800s. The area used to be full of such farms, but they said no one could survive as a dairy farmer anymore. The economy has worsened in the last 30 years: the number of bars and grocery stores have dwindled, and the diner where they celebrated their son’s first birthday is closed.

Just over the border in Pennsylvania, Keith Brant, 52, lives with his wife and four children. A fifth-generation farmer, on a farm established in 1867, he is doing what his neighbors deemed impossible: operating a profitable dairy farm. He agreed that making a living isn’t easy, noting that milk has sold at the same rate for years while the price of feed has gone up.

To supplement his meager income, Brant has leased his 600 acres to Southwest Gas. A pipeline runs past the back of his house, dividing his land, and three of the eight wells he signed off on are installed. It’s not a dream scenario, but he’s getting by, with each well providing an estimated $6,000 a month – some of which the gas company withdraws in fees he did not expect.

Keith Brant poses for a portrait in front of his farm. Photograph: Brett Carlsen/The Guardian

“I don’t want to get greedy, I just want to keep going,” he says.

A registered Republican who will be voting for Trump despite some reservations, he sometimes worries about water quality. But so far he hasn’t had any problems, and he’s happy that he can make money off his land – unlike neighbors across the state line.

Back in New York, Dunau estimates he has lost as much as $100,000 by not signing a fracking lease, which would have amounted to free money since the industry was never able to build anything in New York.

But, he adds, he has never looked back. He and Wujnovich are making a fine living selling produce, mostly cooking greens, to a handful of restaurants in Manhattan. While some extra money would be nice, there are things he cares about more.

“I’d rather be on the right side of history and I think I am,” he says. “Thanks to my all-seeing, all-knowing wife.”