New York City Mayor Bill de Blasio said Thursday the city must “renounce fossil fuels fully,” including banning fossil fuel connections in new construction by 2030 at the latest, decarbonizing the city’s pension fund investments, and transitioning away from cars.

By banning fossil fuel hookups, New York will be “literally ensuring that our only choice is renewable energy,” de Blasio said in his 2021 state of the city address, according to a transcript.

The pledge follows a commitment by the city’s largest pension funds, which hold an estimated $4 billion in securities, to pull their money out of fossil fuel investments within five years.

“We started by taking the billions of dollars in New York City pension fund investments and taking them away from fossil fuel...