In March, a federal district court case led to an unexpected spectacle: a “tutorial” on climate science requested by the judge. Oakland and San Francisco had filed suit against several oil companies, alleging that they should help pay for the impacts of sea-level rise because they had intentionally misled the public about global warming. Judge William Alsup apparently wanted to make sure he understood the physics and chemistry of the situation before he weighed legal standards.

On Monday, Alsup granted the defendants’ motion to dismiss the case—a blow for Oakland, San Francisco, and other cities eyeing the outcome. “The issue is not over science,” Alsup writes in his decision, “All parties agree that fossil fuels have led to global warming and ocean rise and will continue to do so.”

Instead, the decision turns on legal precedents and Alsup’s unwillingness to overstep what he views as the judicial branch’s role.

The cities brought their case on the basis of a public nuisance, claiming that the oil companies’ actions had impacted a public right. Past cases have established that nuisance suits cannot be brought against emitters of greenhouse gases because the EPA has been tasked with regulating the impacts of these emissions. If the EPA’s regulations (or lack thereof) fail to protect you, your beef is with the agency rather than the emitter. The cities sought to sidestep this in a couple ways. First, they targeted the oil companies for selling fossil fuels rather than burning them. And second, they argued that the companies sold fossil fuels internationally (and wherever they’re burned, the impacts are global), taking the ball out of EPA’s court.

While Judge Alsup agreed to allow the case to go ahead along those lines, it was the nuisance claim he found problematic. The standards for nuisance require the actions to be “unreasonable,” differentiating fundamentally harmful things from useful activities with unintended consequences.

Because the use of fossil fuel energy has obviously produced benefits as well as harm, Alsup felt this necessitated a weighing of pros and cons—a tricky calculus. “Having reaped the benefit of that historic progress,” the decision reads, “would it really be fair to now ignore our own responsibility in the use of fossil fuels and place the blame for global warming on those who supplied what we demanded? Is it really fair, in light of those benefits, to say that the sale of fossil fuels was unreasonable?”

Alsup doesn’t answer those questions but explains that they’re a better fit for Congress than a courtroom. And that’s ultimately the thrust of the decision. Alsup cites precedent for courts steering clear of opening new legal pathways, deferring to the other branches of government. In this case, ruling against the oil companies would clearly expose them (and perhaps any other company involved in fuel sales) to a flood of liability. The fact that this would have international implications gave Alsup further pause.

The decision concludes, “The dangers raised in the complaints are very real. But those dangers are worldwide. Their causes are worldwide. The benefits of fossil fuels are worldwide. The problem deserves a solution on a more vast scale than can be supplied by a district judge or jury in a public nuisance case.”