NEW YORK (AP) — New York City sued five major oil companies, claiming they have contributed to global warming, on the same day officials announced they will sell off billions in fossil fuel investments from the city’s pension funds.

Mayor Bill de Blasio said the city would be seeking billions of dollars in the lawsuit to recoup money spent for resiliency efforts related to climate change.

“We’re bringing the fight against climate change straight to the fossil fuel companies that knew about its effects and intentionally misled the public to protect their profits,” the Democratic mayor said in a statement. “As climate change continues to worsen, it’s up to the fossil fuel companies whose greed put us in this position to shoulder the cost of making New York safer and more resilient.”

The city alleges the fossil fuel industry was aware for decades that burning fuel was impacting climate change.

The defendants in the city’s federal lawsuit are BP, Chevron, ConocoPhillips, Exxon Mobil and Royal Dutch Shell.

Curtis Smith, a Shell spokesman, said the company believes “climate change is a complex societal challenge that should be addressed through sound government policy and cultural change to drive low-carbon choices for businesses and consumers, not by the courts.”

BP declined comment, and the other three companies did not immediately comment.

San Francisco, Oakland, and Santa Cruz, California, have filed similar lawsuits against oil companies.

Also Wednesday, De Blasio and Comptroller Scott Stringer said they intend to divest the city’s five pension funds of roughly $5 billion in fossil fuel investments out of its total of $189 billion. They say the divestment is the largest of any municipality in the U.S. to date.

“Safeguarding the retirement of our city’s police officers, teachers and firefighters is our top priority, and we believe that their financial future is linked to the sustainability of the planet,” Stringer said.

Clara Vondrich of the DivestInvest campaign says the city joins a movement that started about six years ago. She says hundreds of institutional investors managing assets of over $5.5 trillion have taken their money out of fossil fuel investments.

Last month, Democratic New York Gov. Andrew Cuomo announced plans to have the state pension funds also divest from fossil fuel investments. He and state Comptroller Thomas DiNapoli are creating an advisory committee to examine the way to proceed with divestment.

In November, Norway’s central bank urged the Norwegian government to consider divesting oil and gas company shares held in the $1 trillion oil fund.

Vondrich said other cities and entities divesting of fossil fuel interests have included Washington, D.C., Berlin and Cape Town; insurance companies Swiss Re, Axa and Allianz; and educational institutions such as the University of Oxford in Great Britain, Stanford University in California and Trinity College in Ireland.

Philanthropies have included the Wallace Global Fund and the Rockefeller Brothers Fund, notable because the late John D. Rockefeller grew his wealth as an oil baron.

“The Rockefeller Brothers Fund is proud to stand alongside Mayor de Blasio and Comptroller Stringer in their historic commitment to divest the NYC pension funds from fossil fuels,” Stephen Heintz, president of the Rockefeller Brothers Fund said in a statement.

Brian Youngberg, a senior energy analyst at Edward Jones Investments, noted such divestment is not entirely altruistic. Fossil fuel securities are underperforming and officials say the outlook for fossil fuel investments continues to be negative.

Kyle Isakower, vice president of the American Petroleum Institute, has previously said that divestment is a “tactic of misinformed activists” that is “incompatible with job creation, affordable energy, and economic prosperity.”