Hurricane Sandy ravaged the city in 2012 — and Mayor Bill de Blasio said Wednesday that oil companies are to blame.

"This was a tragedy that was wrought by the actions of the fossil fuel companies. Let's be clear: that's where it came from," de Blasio said.

Now he says they need to pay up; the city has sued the five biggest fossil fuel companies, arguing they owe New York billions of dollars in damages — money he said will be used to protect the city from future climate disasters. The mayor said oil companies intentionally misled the public about the links between their industry and climate change to protect their bottom lines.

"We are going after those who have profited," the mayor said. "And what a horrible disgusting way to profit in a way that has put so many people's lives in danger."

The city is suing BP, Chevron, ConocoPhillips, ExxonMobil, and Royal Dutch Shell. In a statement, Chevron called the lawsuit factually and legally meritless and said it will do nothing to address the serious issue of climate change.

"Reducing greenhouse gas emissions is a global issue that requires global engagement," Chevron said in a statement.

Other critics denounced the mayor's plan as opportunistic and argued the mayor was risking taxpayer dollars and worker pensions for political gains.

Environmental leaders, like activist and author Naomi Klein, applauded the city's moves.

"Not to overstate the case, but I actually think this could change the world," Klein said.

The city also plans to pull its pension investments from fossil fuel companies. Right now, it has about $5 billion invested in the industry.

At this point, divesting from the fossil fuel industry is just a goal. To make it a reality, the city needs support from the trustees of its five pension funds.

The trustees of the pension funds are expected to vote at the end of January on a resolution that would allow pension officials to explore divesting from the fossil fuel industry.