Mayor Bill de Blasio’s recent declaration of war on Big Oil for its contribution to climate change inspired, as is often the case with this mayor, some skepticism that he was once again seizing a big issue to propel himself into the national spotlight. Some also suggested that if he truly cared about the carbon emissions that cause global warming, he would mothball at least part of the fleet of SUVs that ferry him around the city.

All partly true, perhaps, but Mr. de Blasio’s decision to confront some of the world’s biggest polluters is possibly transformative and certainly timely. It comes just when the Trump administration is moving in the opposite direction, opening up America’s coastal waters to drilling and removing regulatory obstacles to oil exploration, and generally giving fossil fuel companies pretty much what they want. It follows a year of extreme weather events, including three major hurricanes, that collectively caused $306 billion in damage — the most expensive year on record for natural disasters in this country. And it comes as climate scientists are growing increasingly confident about linking these events, or at least their severity, to global warming.

The mayor’s attack is two-pronged. First, he intends to divest the city’s $189 billion pension fund of an estimated $5 billion invested in fossil fuel companies. This puts the city on the same page as a number of other cities, New York State and many colleges, where the divestment movement first took root.

Second, of potentially more consequence, he announced that the city was suing five big oil companies — ExxonMobil, Chevron, BP, Royal Dutch Shell and Conoco Phillips — to hold them accountable for emissions that have helped drive up global temperatures and to force the companies to fork over billions of dollars in damages to help cope with the effects of climate change, steps like fortifying coastal protections against flooding and upgrading sewer systems.