New York City officials have announced the city is hitting out against the fossil fuel industry in two ways: a lawsuit against a number of large oil and gas companies and a promise to divest city’s funds from the industry.

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

The Mayor’s Office said in a statement that the cost of the so-called “resiliency” programme which includes improvements to aging “physical infrastructure, like coastal protections, upgraded water and sewer infrastructure, and heat mitigation, but also public health campaigns, for example to help protect residents from the effects of extreme heat” could cost the city upwards of $20bn in the near future.

City residents have repeatedly called for improvements to the subway system as well.

"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,” said Mr De Blasio.

The defendants in the city's federal lawsuit are BP, Chevron, ConocoPhillips, Exxon Mobil and Royal Dutch Shell who, according to the Union of Concerned Scientists account for eight per cent of global sea level rise - a pressing issue for the island of Manhattan.

A BP spokesman declined comment. A Shell spokesman said climate change is a complex issue that should not be addressed by the courts. The other three did not immediately comment.

Some of the oil companies being sued by New York City over claims they contributed to global warming have disputed the allegation.

Climate change might be worse than thought after scientists find major mistake in water temperature readings

"Reducing greenhouse gas emissions is a global issue and requires global participation and actions," said Exxon Mobil's Scott Silvestri. "Lawsuits of this kind — filed by trial attorneys against an industry that provides products we all rely upon to power the economy and enable our domestic life — simply do not do that."

Chevron spokesman Braden Reddall said the lawsuit had not merit and that the litigation will do nothing to address climate change. Curtis Smith, a Shell spokesman, said the courts are not the venue to address climate change.

New York's lawsuit, filed in federal court follows similar litigation filed by San Francisco, Oakland, and Santa Cruz, California.

The lawsuit, filed in the US District Court, followed the city's announcement that it plans to divest its pension funds from fossil fuel companies to the tune of $5bn.

The total investments in the pension fund is currently $189bn.

According to the Mayor’s office, it is the largest divestment away from fossil fuels committed to by any sub-national government in the US.

10 photographs to show to anyone who doesn't believe in climate change Show all 10 1 /10 10 photographs to show to anyone who doesn't believe in climate change 10 photographs to show to anyone who doesn't believe in climate change A group of emperor penguins face a crack in the sea ice, near McMurdo Station, Antarctica Kira Morris 10 photographs to show to anyone who doesn't believe in climate change Floods destroyed eight bridges and ruined crops such as wheat, maize and peas in the Karimabad valley in northern Pakistan, a mountainous region with many glaciers. In many parts of the world, glaciers have been in retreat, creating dangerously large lakes that can cause devastating flooding when the banks break. Climate change can also increase rainfall in some areas, while bringing drought to others. Hira Ali 10 photographs to show to anyone who doesn't believe in climate change Smoke – filled with the carbon that is driving climate change – drifts across a field in Colombia. Sandra Rondon 10 photographs to show to anyone who doesn't believe in climate change Amid a flood in Islampur, Jamalpur, Bangladesh, a woman on a raft searches for somewhere dry to take shelter. Bangladesh is one of the most vulnerable places in the world to sea level rise, which is expected to make tens of millions of people homeless by 2050. Probal Rashid 10 photographs to show to anyone who doesn't believe in climate change Sindh province in Pakistan has experienced a grim mix of two consequences of climate change. “Because of climate change either we have floods or not enough water to irrigate our crop and feed our animals,” says the photographer. “Picture clearly indicates that the extreme drought makes wide cracks in clay. Crops are very difficult to grow.” Rizwan Dharejo 10 photographs to show to anyone who doesn't believe in climate change Hanna Petursdottir examines a cave inside the Svinafellsjokull glacier in Iceland, which she said had been growing rapidly. Since 2000, the size of glaciers on Iceland has reduced by 12 per cent. Tom Schifanella 10 photographs to show to anyone who doesn't believe in climate change A river once flowed along the depression in the dry earth of this part of Bangladesh, but it has disappeared amid rising temperatures. Abrar Hossain 10 photographs to show to anyone who doesn't believe in climate change A shepherd moves his herd as he looks for green pasture near the village of Sirohi in Rajasthan, northern India. The region has been badly affected by heatwaves and drought, making local people nervous about further predicted increases in temperature. Riddhima Singh Bhati 10 photographs to show to anyone who doesn't believe in climate change A factory in China is shrouded by a haze of air pollution. The World Health Organisation has warned such pollution, much of which is from the fossil fuels that cause climate change, is a “public health emergency”. Leung Ka Wa 10 photographs to show to anyone who doesn't believe in climate change Water levels in reservoirs, like this one in Gers, France, have been getting perilously low in areas across the world affected by drought, forcing authorities to introduce water restrictions. Mahtuf Ikhsan

"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,” city Comptroller Scott Stringer said in a statement.

The decision came on the heels of the state of New York deciding to divest its pension fund from fossil fuels as well. Governor Andrew Cuomo made the announcement last month.

Environmental activist Bill McKibben of 350.org called the actions by the city "one of a handful of the most important developments" in the past 30 years.

"The mightiest city on the planet has now sort of walked into a real fight with the richest and most irresponsible industry on the planet," he said.

Several environmental advocacy and green energy groups also had praise for the decision by the Big Apple.

However, senior vice president and general counsel of the National Association of Manufacturers Linda Kelly felt otherwise, saying the lawsuit is just a political maneuver on the part of Mr De Blasio.

"Ironically, this attack on energy manufacturers comes at a time that New Yorkers have depended on natural gas and heating oil to carry them through the recent extreme cold," she told the Associated Press.

Ms Kelly said: "The mayor's announcement may raise his profile, but it will do nothing to address climate change and will ultimately fail."

Peter Frumhoff, director of science and policy and chief climate scientist at the Union of Concerned Scientists argued in a statement that “for decades, fossil fuel companies have spent millions to deceive the public about the harms of their products and block policies that could have limited the impacts that communities in New York City, California, and across the world are facing.”

“Taxpayers and impacted communities are right to demand that major fossil fuel companies...pay their fair share," Mr Frumhoff said.