Along with his fellow climate-denial zealots in the Trump administration, EPA Administrator Scott Pruitt appears hell-bent on rolling back virtually every limit on greenhouse gas emissions he can get his hands on.

And while the administration’s dismantling of these measures is an environmental setback in the short term, the potential silver lining is that in the long term, the result may be precisely the opposite of what Pruitt & Co. intend.

While (quite literally) the rest of the world acknowledges that climate change is (again, literally) an existential threat, Congress continues to ignore the crisis. And now the executive branch is moving aggressively to scrap almost all previous efforts to reduce emissions. Like nature, policy abhors a vacuum, and we have seen some reaction already in the form of increased state regulatory efforts. Virginia is preparing to join the Regional Greenhouse Gas Initiative, the nine-state cap-and-trade system for power plant emissions, for instance, and Phil Murphy, New Jersey’s incoming Democratic governor, has promised to do likewise.

But there is another player waiting in the wings to step in to deal with the policy mess the Trump administration has created: the courts. Judges have done this before — think of civil rights, when Washington’s failure to tackle the problem of racial inequality in education led ultimately to Brown v. Board of Education — a sweeping intervention belatedly supplemented by Congress a decade later by the Civil Rights Act of 1964.

Washington’s climate policy failure may inspire similar a judicial move. Indeed, two new types of cases are beginning to wend their way through the system, both of which have the potential for dramatic impacts extending far beyond the wrangling over the legality of each particular EPA action (or inaction).

(The enviros have won the opening rounds in those fights: EPA was judicially shot down after it attempted to declare by fiat that certain Obama-era rules would not go into effect — including a new methane-emissions standard for oil and gas production. But Pruitt has hired Bill Wehrum, who has been busy litigating for industry against the Obama climate measures, as his assistant administrator for air, precisely to oversee their formal rollback. Environmental groups have limited tools to stop that formal process.)

The first line of legal attack against the Trump administration

Last year a group of children sued the government in federal court in Oregon (Juliana v. United States), claiming that they had a constitutional right to a climate capable of supporting human life, and that the government has a “trustee” responsibility to maintain the atmosphere free of “substantial impairment.” Their goal is to get the government to draft, and then execute, a comprehensive plan to dramatically reduce US emissions using the full panoply of federal authority.

The government’s response to the suit was, in part, to describe its “strong” and “substantial” efforts to tackle the problem via various regulatory measures, and to urge the court to therefore “decline Plaintiff’s invitation to short-circuit” this process. But District Court Judge Ann Aiken did not buy it. Refusing to defer to the government (the outcome you might expect), she held that the case could go forward, and in doing so, noted, “Federal courts too often have been cautious and overly deferential in the arena of environmental law, and the world has suffered for it.”

This week, Monday, the Ninth Circuit Court of Appeals will hear argument on that decision. Pruitt has been targeting almost all previous efforts to reduce emissions, including vehicle tailpipe standards and emissions limits at coal- and gas-fired power plants. None of the developments since Judge Aiken’s decision are likely to persuade the Ninth Circuit that she got it wrong.

Nor is the Ninth Circuit the only court in which the Trump administration’s climate rollbacks will be an issue. On November 6, Pennsylvania’s Clean Air Council filed a similar case in federal court in Philadelphia (Clean Air Council v. United States), alleging that the government has violated its constitutional duty to maintain a stable climate system, and violated its trust responsibility to preserve natural resources — including the atmosphere. A solid 16 pages of the complaint describe the administration’s war on climate science and its reversal of the Obama administration’s (unfortunately modest) climate efforts. The plaintiffs argue that these actions “increase the clear and present danger of climate change.”

Ultimately, of course, the Juliana plaintiffs would have to convince the Supreme Court. And while they’d have a steeply uphill battle if the high court were asked to vote today, the dynamic will change as the climate problems get worse, and as the record grows richer as lower courts review the facts and weigh the legal issues.

The constitutional claim that would demand a particular climate policy remains an extreme long shot, but courts have been sympathetic to the view that the government has a “public trust” duty with respect to natural resources. Five years from now, the Juliana plaintiffs might well have a chance of swaying five justices.

Meanwhile, suits in state courts seek compensation for the costs of adapting to climate change

While Juliana and Clean Air Council seek a serious and comprehensive government regulatory effort, another set of cases seek to effect change by going after a different set of actors: corporations contributing to global warming. Local governments along the California coast have filed five cases under the centuries-old “public nuisance” doctrine. Here, the plaintiffs seek to get the fossil-fuel industry to help pay for the expense of adapting to sea-level rise caused by climate change.

Importantly, these nuisance cases are in state court, which means they will likely avoid this Supreme Court, which has zero interest in holding corporations accountable for their environmental externalities. Importantly, at bottom these cases are about property — not complex constitutional jurisprudence or abstruse concepts like the public trust doctrine. Judges are extremely familiar with property; the root of the common law could be summed up as, “You did something that damaged my property and so now you have to pay for it.”

If and when those claims reach the California Supreme Court — they are currently locked in jurisdictional wrangling — the Trump administration’s actions will not make those judges any more inclined to leave this issue to the fools in Washington.

Thus, ironically, the Trump climate agenda, by making judges sympathetic to arguments that might have seem far-fetched a while ago, may help save the planet after all. That’s the good news. The bad news is that, from a national policy perspective, it will do so in the least efficient way imaginable.

Climate policy is no different than most other national issues. The best solution is tailored congressional legislation. The second-best solution is a regulatory program using existing agencies and legal authority.

Intervention by the courts isn’t a great way to make policy, but it may be all we’ve got

The third-best solution, by far, is leaving this to whichever state and federal judges are randomly assigned to these cases, to rule on the specific claims raised by a given set of plaintiffs against whichever defendants they’ve sued, and awarding whatever relief is appropriate for the particular facts, legal claims, and parties are in their courtroom. (Full disclosure: I’ve written an amicus brief on the public trust doctrine in Juliana, and have been consulting with lawyers working on the nuisance cases.)

But that third-best option may be the only avenue now open. Back in 2007, when the Supreme Court held that CO2 was a pollutant that could be regulated under the Clean Air Act, Republicans bemoaned the “regulatory train wreck” that would come from just EPA Clean Air Act regulation. And that was a single agency using its authority under one statute. Trump’s election put that effort on hold, but the day may come when those Republicans wish they could rewind time and accept that train wreck.

Consider the range and complexity of the legal attacks on those who refuse to act to ameliorate global warming. Judge Aiken is being asked to order the entire federal government to come up with a plan to phase out fossil fuel use; the Pennsylvania case asks for an order ending the regulatory rollbacks.

Two of the California cases assert a single claim in an effort to make five oil companies pay for San Francisco’s and Oakland’s cost of building seawalls and other infrastructure made necessary by to sea level rise, while the other three California cases assert eight separate legal grounds for why some three dozen fossil fuel defendants should not only pay their adaptation costs, but punitive damages as well.

Additional local government cases — both in California and elsewhere — are in the works. Each state, and each state’s laws, represents a separate opportunity to establish liability, improving the likelihood of success somewhere. And entire states are contemplating the same sort of cases against the fossil fuel companies that they brought against the tobacco industry. (The suits would analogize the costs of adapting to a changing climate to the increased health care costs that they were forced to bear due to smoking.)

In other words, with the government unwilling to deal with climate issues, lots of clever lawyers are busy thinking up new and exciting ways to screw with the fossil fuel companies.

There you have it: The Trump administration’s climate policy (for want of a better word), may precipitate a judicial reaction eventually leading to greater restrictions on fossil fuels than anything contemplated under the regulatory program Scott Pruitt inherited. And if that happens, it will achieve this in a far more fragmented, ad hoc, uncoordinated — and thus significantly more expensive — manner than any such regulatory program.

Unintended consequences, indeed.

David Bookbinder is the chief counsel at the Niskanen Center, a libertarian think tank in Washington, DC.

The Big Idea is Vox’s home for smart discussion of the most important issues and ideas in politics, science, and culture — typically by outside contributors. If you have an idea for a piece, pitch us at thebigidea@vox.com.