New York became the largest American city to sue Big Oil, demanding that ExxonMobil, Chevron (CVX), BP (BP), Royal Dutch Shell and ConocoPhillips (COP) pay for the cost of protecting the city from the “existential threat” of climate change.

The city on Wednesday also announced a goal to divest its $189 billion pension system from fossil fuel reserve owners within five years. New York said that would make it the first major U.S. pension plan to complete such an exit.

The lawsuit, claims the city “already has suffered damage from climate change,” including coastal erosion and tidal flooding. It said the city faces “imminent threats to its property, its infrastructure and the health and safety of its residents.”

The lawsuit cited recently-uncovered documents about what oil companies knew about the threat from climate change. A recent Harvard study concluded that Exxon (XOM“misled the public” for more than 40 years. Exxon has rejected the claims.