“These billion dollar companies don’t need bailouts, they need to compete with other energy companies on a level playing field,” said one postcard-size mailer.

A small disclosure on the mailers revealed that they had, in fact, not come from a group of self-organized Pennsylvanians. The mailers were funded and shipped by the American Petroleum Institute, the lobbying champion for oil and natural-gas companies in national politics. The return address on the mailers was one of the group’s offices in downtown Washington, D.C.

Three years ago, after Donald Trump’s election, climate activists and environmental leaders turned their attention to state and local politics. They have stacked up real victories since. In December, a bipartisan group of 24 governors declared that their states were “still in” the Paris Agreement on climate change. And Democrats in New York, New Jersey, and Washington State have passed major bills aimed at eliminating carbon pollution from their local economies.

But climate activists have not been alone in switching focus to local politics: The oil industry has also pivoted. In the past few years, the American Petroleum Institute (API) and its allies have activated at the local level, fighting against—and occasionally beating back—climate-friendly policies in at least 16 different states. This surge of local activism has succeeded in slowing the growth of electric-vehicle sales and zero-carbon energy, experts say.

Perhaps most surprising, the industry has not only focused on the states, but also actually borrowed tactics and ideas from climate activists. The API’s local campaign is designed around a concept—dubbed the social license to operate—that was first invented by risk analysts in the mining industry but that was popularized, more recently, by far-left climate groups such as 350.org. The idea is a name for American society’s invisible permission slip to the fossil-fuel industry: the unwritten contract that allows companies to frack, drill, build pipelines, run oil refineries, and sell carbon-intensive fuels.

Since the mid-2010s, climate activists have focused on yanking that social license away. Now, the oil industry is pouring resources into an effort to retain it. Its activities “are having a tangible impact in preventing zero-carbon electricity and zero-carbon electric vehicles from getting adopted,” Josh Freed, the senior vice president of energy policy at Third Way, a nonpartisan think tank on the center-left, told me.

In a statement, Bethany Aronhalt, a spokesperson for API, said that the oil and gas industry supported “new approaches, policies, and technological innovation to address the risks of climate change.” She listed a few policies—including the USE IT Act, a bipartisan Senate bill—that have won API’s endorsement. The USE IT Act would increase federal support both for capturing carbon from the atmosphere and for using that carbon to make fossil-fuel extraction more efficient.