New York City Mayor Bill de Blasio didn’t mince words on his government’s position on oil and natural gas in a 2020 State of the City speech Thursday, proclaiming that the metropolis must “say goodbye to fossil fuels.”

Under a plan laid out by the de Blasio administration, the Big Apple would stop using all fossil fuels, including natural gas, in its “large building systems” by 2040, with government buildings the first to undergo the proposed overhaul.

The city also plans to issue an executive order stopping new fossil fuel infrastructure, including pipelines, power plant expansions and import terminals.

Further energy-related measures include efforts to expand wind, solar and hydroelectric power to meet the city’s electricity needs and converting the city’s fleet of vehicles to electric. By 2025, 4,000 vehicles are to be replaced or converted to electric under the plan.

“I know for a lot of us, and I was one of them, it was hard to take in the notion that we were just going to cancel everything that we’ve depended on for fossil fuels,” de Blasio said, according to a transcript of his address. “It kind of doesn’t make sense when you first hear it, but it’s something we have to do to survive. If we don’t break this addiction to fossil fuels, it will break us. We have to overcome it.

“And so, I’m announcing an executive order to end the creation of fossil fuel infrastructure in New York City once and for all.”

The de Blasio administration’s plan is consistent with the New York State government’s well-documented antagonism toward fossil fuel development, a regulatory climate that has repeatedly stalled or thwarted efforts to build out pipeline infrastructure in a region that has tended to experience supply constraints and volatility during peak winter heating demand.

Late last year, New York Gov. Andrew Cuomo’s administration and National Grid were at loggerheads after the utility issued a moratorium on new natural gas service, citing a supply shortage.

The mayor’s proposed energy overhaul comes just days after New York City utility Con Edison announced a new request for information soliciting “the best and most promising technologies available in clean energy.”

Con Edison said it’s “seeking innovative, new solutions that will help customers reduce reliance on natural gas for their heating and cooking needs; offset the need to build additional pipeline infrastructure; and help New York State achieve its clean energy goals.”