Climate change is going to cost the US billions of dollars because of extreme weather, health problems, and more — and New York City wants fossil fuel companies to help pay for it. So the city is suing BP, Chevron, ConocoPhillips, ExxonMobil, and Royal Dutch Shell, the Associated Press reports.

Mayor Bill de Blasio announced the lawsuit today, pointing to dangers New Yorkers could face as climate change continues — like rising sea levels, hotter temperatures, more severe rain and snowfall, and increased flooding. “Sandy taught us how destructive weather events exacerbated by climate change can be,” a statement from the mayor’s office says. The mayor also announced plans to rid the city’s $189 billion pension funds of fossil fuel investments.

To prepare for a warmer world, New York City is already shoring up coastal, water, and sewer infrastructure and developing programs to keep the public healthy. But the price tag for this effort is around $20 billion, according to the mayor’s office. And the city wants oil companies to pitch in — accusing the industry of knowing the harms of fossil fuels even as companies profited from them.

“They deliberately engaged in a campaign of deception and denial about global warming and its impacts,” the statement says. A recent study showed that oil company ExxonMobil sowed doubt about human-caused climate change, even as its own scientific papers and internal documents acknowledged the problem.

New York City’s lawsuit follows others leveled against fossil fuel companies by seven California communities, including the cities of Oakland and San Francisco and San Mateo County. But Exxon is punching back: on Monday, the oil company petitioned a Texas court for permission to depose government officials and a lawyer involved in the California lawsuits, Inside Climate News reports.

In response to NYC’s lawsuit, ExxonMobil spokesman Scott Silvestri says the company has “made good faith attempts to address climate change,” AP reports. Spokespeople for both Exxon and Shell agreed that lawsuits aren’t the answer, according to AP.

But for environmental groups, it’s time for fossil fuel companies to pay up. “We all learned in kindergarten that when you make a mess, you apologize and help clean it up,” says Ken Adams, coordinating counsel for the Center for Climate Integrity, in a statement. “These lawsuits are simply insisting that Exxon and its four co-defendants, who have earned trillions of dollars of profits from fossil fuel products, pay their fair share of the cost of dealing with the damage they knew full well their products would cause.”