BARACK OBAMA has no more committed adversary than Scott Pruitt. The ambitious Republican attorney-general of Oklahoma has, since his election in 2010, filed legal challenges to pretty much everything Mr Obama’s administration has done: including its new immigration rules, the Affordable Care Act and laws or regulations on contraception, banking and measures to protect the Lesser Prairie Chicken. So it was inevitable that Oklahoma would lead the charge of Republican and energy-rich states against the Clean Power Plan (CPP), Mr Obama’s effort to cut pollution from fossil-fuel power stations, which was published in the federal register on October 23rd. Mr Pruitt, who calls the plan “constitutionally infirm”, promptly sued—as have 26 states in all.

Under the terms of the plan, the Environmental Protection Agency (EPA) has given each state an emissions-reduction target to meet by 2030, and considerable leeway over how to achieve this. The states can, for example, measure their progress in terms of tonnes of avoided emissions, an approach which lends itself to the creation of the sort of cap-and-trade scheme America has used to mitigate other forms of air pollution for decades. Or they can focus on reducing the carbon intensity of their electricity generation, which would be costlier for most states early on, but would not put an overall limit on their emissions. Yet Mr Pruitt, who tried to sue the EPA over an earlier version of the plan, is unimpressed.

The plan, he says, trespasses on states’ rights by “trying to co-opt state officers to carry out federal policy and federal will”. Legislation, which Mr Obama would have preferred but could find no support for in Congress, is the only way to settle that conflict, he argues. “Just because Congress has not provided the means by which you want to do this doesn’t mean you can make it up as you go along.”

The legal fight, which will be waged at first in the appeals court of Washington, DC, is going to be messy. Besides those filed by the states, around 20 suits against the CPP have been filed by private firms, mostly big energy users and producers, and more are expected. A dozen, mostly-Democrat-run, states are expected to file petitions in support of the plan. Assuming it proceeds to the Supreme Court, it is unlikely to be settled before 2017, by which time it is possible that America will have a Republican president, who might scrap the plan. The litigants are therefore trying to buy themselves time by asking the courts to stay, as well as scrap, the plan—ostensibly on the basis that being forced to take the first steps towards compliance would do them “irreparable damage”.

This illustrates, first, how divisive and compromised Mr Obama’s recourse to executive action is, on this and other issues. It necessitates much slower progress than legislative reform could. America would ideally reduce all its carbon emissions; not, as under the CPP, only those from a portion of its electricity generation, which is in turn responsible for only a third of its total emissions. It leaves an important change vulnerable to the whim of judges. And it chases politics—which Mr Obama’s pen may circumvent but never escape—into a murky realm of lawyers, lobbyists and furtive political rivalries, where it is hard for voters to follow. Politics and murk are both evident in the different ways state governments have responded to the CPP, which go beyond the usual party divide. They fit into three broad categories. There are supportive states, which typically have cap-and-trade regimes already in place, and include several—such as Massachusetts and Maryland—with Republican governors. There are also states fiercely resistant to the plan, for ideological, economic or political reasons. Oklahoma’s governor, Mary Fallin, a climate-change denier (she considers prayer the most effective way to mitigate drought), issued an executive order forbidding any state official from complying.

Mr Pruitt is under similar pressure from Oklahoma’s natural gas lobby. Last year he was exposed in the New York Times for having sent a letter of complaint to the EPA under his own name, though it had been written by an energy company. The Republican governors of Louisiana, Ohio and Wisconsin all came out against the plan, at least partly because all were then vying for their party’s presidential nomination.

There are also many states divided on the issue: including Pennsylvania, where the Democratic governor is keen, but is having to negotiate traps set by the state’s Republican-dominated legislature. In Colorado, a Democratic governor is supportive; the state’s Republican attorney-general is meanwhile suing the EPA. The same is happening in Michigan, though there both these officials are Republican. “The best way to protect Michigan”, says Valerie Brader, head of the state’s energy agency, “is to come up with a state plan—to take decisions in Michigan, not leave them to the bureaucrats in DC.” The state’s attorney-general, Bill Schuette, who scored a rare victory against the EPA in July with a petition to dilute its rules on mercury pollution, is suing nonetheless.

Those differences illustrate a second fact about this scrap between the states and the feds. Despite the legal action, the number of outright rejectionist states is falling, and a quiet pragmatism spreading. In March Mitch McConnell, a powerful Republican senator from Kentucky, wrote to the states urging them to “just say no” to the plan; half a dozen, including Oklahoma and Texas, took up the challenge. Yet even they may be reconsidering. Only the day before Mr Pruitt filed his suit, Oklahoma’s energy secretary, Michael Teague, hinted that the state may produce a compliance plan after all.

Mr Pruitt denies that any shift is taking place: “Nothing has changed and nothing is going to change.” Yet even Oklahoma has realised that the cost of complying with a plan that goes with the grain of long-standing trends in America’s energy mix (principally, the falling gas price and pre-existing environmental controls) looks manageable. The costs of failing to comply, which would include suffering the humiliation of having an off-the-peg plan foisted onto the state from Washington, look steep by comparison. Despite the shouting, in short, the plan is already working.