It’s a well-worn idea that bitcoin is helping to trash the planet, throwing fuel on an already burning world while providing value to very few people. By one recent estimate, the energy used to keep the network going, a process known as mining, is enough to power Hungary. But now a Montana county in the heart of crypto-mining territory is taking matters into its own hands, invoking a local climate emergency in a bid to make bitcoin greener.

Missoula County’s strategy rests in the powerful, often-invisible realm of local zoning enforcement. A resolution approved unanimously by county commissioners Thursday, requires new cryptocurrency mining operations to offset their energy use by funding or building new renewable projects. It comes in advance of a resolution that would commit the Missoula area to 100 percent clean electricity by 2030.

“We looked at the potential for new bitcoin mining and saw that we’re never going to meet these goals if mining happens in the way it’s been happening,” says Josh Slotnick, who sits on the board of commissioners. “The use is so extreme it dwarfs everything else in our county.” Mining currently uses as much energy as one-third of the county’s households, or roughly 40,000 people, and directly employs 19 workers.

The people behind Missoula’s only bitcoin mining operation say they don’t buy the county’s logic. The mine, owned by a Canadian company called Hyperblock and located in a former lumber mill in the small town of Bonner, wouldn’t fall under the new rules, which apply only to new operations. But Jason Vaughan, the facility’s manager, says it’s no secret that the company has been planning to grow. “They say that it’s not directed at Hyperblock, but it sure feels like that,” he says. “We’re knee-deep in the process of expanding, and now they’re trying to change the rules on us.” Vaughan says it’s possible that Hyperblock has spent enough planning its expansion that it will be exempt from the resolution. If not, Vaughan says, the company would explore its options for challenging the zoning rules.

Hyperblock’s interest in Bonner reflects the shifting landscape of bitcoin mining, which rewards machines with cryptocurrency for validating transactions. Once idly performed by home computers, mining became increasingly competitive as bitcoin’s value grew. Over time, PCs gave way to mining farms that use large numbers of expensive, specialized chips and require tremendous amounts of energy---not just to power the chips themselves but also to power cooling systems that prevent them from overheating. Two years ago, as the price of bitcoin soared, mining companies flocked to areas with cheap energy, cool weather, and empty spaces to fill with mining rigs. Bearing the promise of high-tech jobs, many chose shrinking industrial towns in places like upstate New York and the Pacific Northwest.

Those forces are what brought Hyperblock to Montana in the first place---and why it has survived against uncertain odds. While other mining operations crashed this winter along with cryptocurrency prices (at a certain point, the crypto rewards are not enough to pay the monthly power bill), Vaughan says the Bonner mill’s location and access to cheap hydroelectric power helped it weather the storm. Now it’s benefiting from less competition---when other miners drop out, the process gets easier for the survivors---and looking to expand. Hyperblock, he says, is being punished for its responsible stewardship. “They’re putting up this propaganda that we’re contributing to global warming, and yet we’ve been buying power from the Kerr Dam,” he says. “They’re still going after us even though we’re doing things right.”

LEARN MORE The WIRED Guide to Bitcoin

Slotnick says that’s not good enough. The Bonner mine’s energy needs, he says, simply push the county’s other businesses and homes into using unclean fuels, especially coal. In any case, he adds, the measure isn’t about targeting any specific business. Two other mining farms recently opened operations in nearby counties, and officials had heard about crypto-mining firms looking to move into one of the county’s other empty mills. Slotnick notes that for now, the new zoning is temporary, though he hopes it will eventually be made permanent and perhaps will be adapted to expand its reach to other high-energy industries.