The de Blasio administration has filed a federal lawsuit against a handful of major oil companies for their role in climate change and its impact on New York City — particularly in the wake of Superstorm Sandy, city officials said Wednesday.

That includes seeking reparations for damage and for the sky-high costs of building up the city’s resiliency for future mega-storms.

“The city seeks to shift the costs of protecting the city from climate change impacts back onto the companies that have done nearly all they could to create this existential threat,” reads the lawsuit, which was filed in the Southern District of New York.

It names as defendants BP, Chevron, ConocoPhillips, ExxonMobil and Royal Dutch Shell — which the court papers allege have produced more than 11 percent of the world’s carbon and methane pollution from industrial sources “since the dawn of the industrial revolution.”

As part of Mayor Bill de Blasio’s recent push on climate change action, his administration also is calling for the city’s pension funds to divest from fossil fuel companies over the next five years.

He’s being joined in that effort by pension fund board members Public Advocate Letitia James — who first called for divestment from the industry last month — and Comptroller Scott Stringer.