A United States district judge dismissed a New York City lawsuit Thursday that would have held oil companies responsible for climate change, ruling that the issue should go instead to Congress and the executive branch.

Following the example of other major U.S. cities, New York's suit alleged that five oil companies, including Exxon Mobil and BP, played a major role in climate change and sought billions of dollars in return.

U.S. District Judge John Keenan tossed out the city's claims, citing provisions in the Clean Air Act that forbid the move, Bloomberg reports.

"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 decision.