A federal on Thursday dismissed New York City’s lawsuit seeking to make several major oil companies financially responsible for dealing with climate change, saying that the legal effort wasn’t permitted under the federal Clean Air Act.

U.S. District Judge John Keenan tossed out the suit against Exxon Mobil, Chevron, BP, Royal Dutch Shell and ConocoPhillips, ruling that Congress and the executive branch, not courts, must tackle the issue of climate change, Bloomberg reported.

"The immense and complicated problem of global warming requires a comprehensive solution that weighs the global benefits of fossil fuel use with the gravity of the impending harms," Keenan wrote in his ruling.

ADVERTISEMENT

The lawsuit filed in January sought to recoup billions of dollars from the oil companies that New York City alleged were spent helping contribute to climate change.

“The Mayor believes big polluters must be held accountable for their contributions to climate change and the damage it will cause New York City,” a spokesman for New York City Mayor Bill de Blasio Bill de BlasioOVERNIGHT ENERGY: California seeks to sell only electric cars by 2035 | EPA threatens to close New York City office after Trump threats to 'anarchist' cities | House energy package sparks criticism from left and right EPA threatens to close New York City office after Trump threats to 'anarchist' cities New Year's Eve in Times Square to be largely virtual amid pandemic MORE (D) said in a statement to Bloomberg on Thursday.

“We intend to appeal this decision and to keep fighting for New Yorkers who will bear the brunt of climate change.”

The oil companies largely hailed the decision in statements reported by Bloomberg.

Shell said in a statement that the ruling “reaffirms our view that climate change is a complex societal challenge that requires sound governmental policy and is not an issue for the courts.”

Exxon similarly said that climate change “should be addressed by policy makers and not by the courts.”

“Responsible leaders should engage in an honest conversation about the policy issues of climate change rather than filing lawsuits and vilifying the men and women who produce the reliable, affordable energy upon which we all depend,” Chevron’s statement read.

ConocoPhillips said that the company recognizes the role of humans in climate change, and that it continues "to manage and have successfully reduced greenhouse gas emissions in our operations and have integrated climate-related activities and goals into our business planning."

BP declined to comment on the ruling.