(Bloomberg) -- Polly is a 10-year-old black-and-white Holstein cow, the oldest in a herd of about 300 on the Bar-Way Farm in Deerfield, Mass. Together they produce 2,000 gallons of milk each day. They also make enough poop to fill about two garbage trucks. The farm makes money off of both.

In 2014, Bar-Way began working with Vanguard Renewables to install a biodigester, which uses specialized bacteria to convert organic material—for example, cow poop—into biogas, a versatile fuel. Once it’s purified, this biomethane, also known as renewable natural gas (RNG), is chemically identical to the main ingredient in the fossil-based natural gas that comes out of your stove or heats your water.

“My grandfather always told me that to be successful, you’ve got to use every asset you have to its fullest,” says Peter Melnik, whose family has owned Bar-Way Farm Inc. for 101 years. He won’t disclose how much he’s profited from the arrangement, but he will say it’s made the business “that much more viable.”

“Without a doubt, small family farming in the United States is incredibly tough,” he adds.

So is pumping natural gas, at least these days. Under intense pressure from investors, customers, and climate activists, three interstate gas pipelines worth about $10 billion were canceled, choking off Appalachian producers’ access to new Northeast and Southeast customers. More than 30 cities have banned gas in new buildings since July 2019.

“It’s gotten to the point they need a proactive decarbonization strategy,” says Jigar Shah, co-founder of clean energy financier Generate Capital Inc., one of the largest RNG owners in the country. “Natural gas producers now believe their growth prospects are more limited—to the degree that some people said we should be planning for the obsolescence of the natural gas utility.”

That’s where renewable natural gas is supposed to come in. Bovine waste is typically stored in vast open lagoons that emit methane—a greenhouse gas more than 80 times as potent as carbon dioxide over 20 years— making agricultural waste the single biggest contributor to the country’s total methane emissions from human activity. Both biogas and fossil natural gas are mostly methane, and though they burn more cleanly than the megapolluter coal, they still emit carbon dioxide. But by diverting cow poop into biodigesters in the process of making RNG, gas companies argue, the effect is a net climate win. Virginia-based utility giant Dominion Energy Inc. claims that supplying only 4% of its customers with biogas would be enough to offset the emission from its entire gas system.

That’s the type of math that irks Matt Vespa, an attorney for the nonprofit climate litigation group Earthjustice. “Just 4% of the gas needs to be renewable gas, and then all of the sudden you have 100% clean energy,” he says, “requires some shoddy assumptions”—for instance, that all the methane coming out of all those lagoons is inevitable in factory farming. But there are plenty of other ways to solve this problem that don’t extend our reliance on polluting fuels, Vespa says.

Earthjustice is far from the only climate organization ringing the alarm bells about RNG. Mark Kresowik, a deputy director of the Sierra Club’s Beyond Coal campaign, says RNG is a costly distraction that will only slow the energy industry’s transition away from hydrocarbons. (The Sierra Club has received funding from Bloomberg Philanthropies, the charitable organization created by Michael R. Bloomberg, founder and owner of Bloomberg News parent company Bloomberg LP.) “This is the last gasp of the gas industry. They know that electrification is superior,” Kresowik says. “If you go down that dead-end route, it increases the cost to consumers in the long run.”

That said, getting rid of gas won’t be easy. It’s enjoyed unprecedented growth over the past decade as the boom in shale oil and gas production made costs plummet. Today gas accounts for about a third of America’s total energy consumption, and it’s projected to rise to 40% this year, data from the U.S. Energy Information Administration show.

Nationwide, RNG could be used to displace 13% of total U.S. gas demand by 2040, according to a study commissioned by the American Gas Foundation last year, along with EIA data. Generate Capital’s Shah, who keeps a map of all viable U.S. RNG spots, says that cap is likely closer to 3% of U.S. gas demand. Still, that’s a sizable market. “People have a hard time understanding what 3% is,” but that’s enough to put RNG on par with where solar is today, he says.

Over the years, RNG has had an uneasy relationship with the fossil fuel industry, much as solar and wind have clashed with traditional utilities. It’s also a tougher sell as an investment: A typical RNG project costs about $17 million, but can top out as high as $100 million, according to industry lobbying group RNG Coalition. That’s compared to the $6 to $8.5 million price tag for an Appalachian gas well, which can also pump many times more gas in a day than a digester can produce, according to BloombergNEF. The name “renewable natural gas” itself is a marketing term, coined a decade ago to play off the name recognition of its fossil fuel twin.

But the name also points to what makes RNG many gas companies’ lifeline of choice: They can use their existing infrastructure to deliver it. “The more you deploy renewables, the more you need the gas grid,” says Jonathan Peress, senior director of regulatory affairs with Sempra Energy’s SoCalGas, the largest U.S. gas utility, who was formerly senior director of energy markets and utility regulation at the Environmental Defense Fund, an advocacy group.

SoCalGas has been campaigning the state to embrace RNG amid a push to electrify buildings. So far the effort appears to be paying off. The California Public Utilities Commission is considering a rule that would require the state’s gas utilities to procure a certain percentage of RNG. SoCalGas is also pushing for an RNG credit for both residential and commercial customers, and it’s announced plans to replace 5% of its gas supply with RNG by 2022 and 20% by 2030.

California is by far the biggest market for RNG, but others are coming up. Over the summer, Oregon finalized rules that will allow utilities to supply as much as 30% of gas customers with RNG by 2050, and several other states are considering paying fees to those adding RNG to the grid, similar to existing credits for wind and solar power. Dominion Energy announced it will invest as much as $2 billion in RNG over the next decade, in part through partnerships with Vanguard Renewables and pork-producing giant Smithfield Foods Inc. Utility owner Duke Energy Corp. made its first investment in the renewable gas sector by acquiring a minority stake in SustainRNG in July.

Melnik started looking into biodigesters more than a decade ago with other Massachusetts farmers as a way to diversify their income and make their operations more sustainable. He spent more than five years researching digesters, traveling to plants in Germany and across the U.S., to figure out the right technology to use, then how to pay for it and permit it. It was through the financing process that he came across Vanguard.

Each week, Melnik adds about 175 tons of manure, mixed with about 15 to 20 trucks’ worth of food waste from 19 Whole Foods Market stores, a Cabot Creamery plant, New England Natural Bakers, Tree House Brewing, the MGM Springfield casino, and Hood ice cream. What’s left behind is a liquid fertilizer, which can then be further processed to create fluffy dry bedding for the barn. Polly, the grande dame of the herd, had most of her joint pain disappear once Melnik subbed in the biodigester bedding for the hardwood chips she used to sleep on. She’s now one of the farm’s top milk producers. Extracting the methane eliminates almost all of the odor, so neighbors no longer complain about the scent.

The farm has drawn visitors from the Massachusetts Institute of Technology; utility representatives; national, state, and local regulatory officials; and businessmen from Japan to learn about the process, according to Vanguard Chief Executive Officer John Hanselman. The company currently runs biodigesters on five Massachusetts farms, including Bar-Way, and is in the final stages of setting up another one in Vermont; yet another one planned for upstate New York is in the permitting stage.

“Every farm that we worked with and met with, they all want to be good stewards of the land—they understand climate change better than anybody,” says Hanselman, who’s also working on projects in Georgia and Texas.

The thing with the bedding, though, is just a happy accident. “We knew we would be able to get the energy out, we knew we would be able to recycle food waste, but we didn’t know how valuable the bedding material is,” Hanselman says. “It’s like unintended consequences.”

©2020 Bloomberg L.P.