By extracting and selling vast amounts of fossil fuels, ExxonMobil, Chevron, BP, Shell, and ConocoPhillips contributed significantly to climate change—and profited immensely by doing so. Should they now be forced to pay for the damage?

A federal judge said no on Thursday, dismissing a January lawsuit brought by the city of New York, which is particularly vulnerable to sea-level rise and extreme weather. Mayor Bill de Blasio’s administration had argued that the oil giants should help cover the $20 billion cost of constructing levees and sea walls, raising infrastructure, and waterproofing buildings. “Climate change is here and is harming New York City,” the lawsuit said. “This egregious state of affairs is no accident.”

U.S. District Judge John Keenan appeared sympathetic to these claims. In his Thursday opinion, he agreed that the oil companies helped cause global warming—and that they had tried to hide their responsibility. “Despite their early knowledge of climate change risks, Defendants extensively promoted fossil fuels for pervasive use, while denying or downplaying these threats,” Keenan wrote. “Defendants engaged in an overt public relations campaign intended to cast doubt on climate science.”

But Keenan ultimately decided that problems caused by climate change “are not for the judiciary to ameliorate.” Greenhouse gas emissions from the oil companies occur all over the world, not just in New York. Thus, he reasoned, a federal court is not the correct place to decide what companies operating in foreign countries must do.

To litigate such an action for injuries from foreign greenhouse gas emissions in federal court would severely infringe upon the foreign-policy decisions that are squarely within the purview of the political branches of the U.S. Government,” Keenan wrote. “Global warming and solutions thereto must be addressed by the two other branches of government.”

Keenan’s decision was widely seen as a blow to the growing movement to hold polluters legally accountable for their carbon emissions. As ThinkProgress noted, “The ruling comes less than a month after a judge in California dismissed two similar climate lawsuits from San Francisco and Oakland for the same reason. In both instances, the judges said that climate policies must be set by Congress or the executive branch and not legislated in the courtroom.”

The oil companies involved also hailed the case’s outcome. “Judge Keenan’s decision reaffirms our view that climate change is a complex societal challenge that requires sound governmental policy and is not an issue for the courts,” Shell said in a statement.

But this is not the end for climate liability lawsuits—not even close, said Richard Wiles, executive director of the Center for Climate Integrity. The group supports climate lawsuits seeking to hold polluters financially accountable for their emissions. “New York is an anomaly,” he said. “I don’t think it’s indicative of how the rest of these cases are going end up.”

Wiles thinks these cases—New York, San Francisco, and Oakland—were dismissed because of two solvable failures. One is that they were argued in federal court, when they should have been brought and decided in state and local courts. “These cases are just simply about who’s going to pay for sea walls and other adaptation measures: taxpayers or polluters,” he said. “They’re simple nuisance cases that should be tried in state court.”

Wiles also thinks judges are fundamentally misunderstanding what these cities are asking for—not a widespread political solution to climate change, but monetary damages. “They’re saying the companies created a product they knew would cause a problem, tried to hide that knowledge, continued selling the product, and then the problem occurred,” he said. “They’re not asking the companies to curtail emissions, or stop sales of the product, or even for regulations. They’re saying, pay for our sea-walls.”

In an interview with Grist, Columbia University’s Sabin Center for Climate Change Law agreed that Keenan’s decision doesn’t doom future climate liability lawsuits. “No other court is bound by this decision. It’s as simple as that,” he said. “Each judge and each panel of appellate judges is going to look at these issues independently until it gets resolved by some higher court.”

Until that happens, the lawsuits will keep coming. On Friday, the city of Baltimore filed its own lawsuit against “more than two dozen oil and gas companies that do business in the city, seeking to hold them financially responsible for their contributions to global climate change,” The Baltimore Sun reported. This one was filed in county court.