Americans are paying a fearsome price for global warming. The federal government’s National Oceanographic and Atmospheric Administration reported earlier this week that the three powerful Atlantic hurricanes of 2017 — Harvey, Irma and Maria — cost Americans $265 billion, and massive Western forest fires another $18 billion. Scientists have shown that human-induced climate change has greatly increased the frequency and intensity of such disasters.

This week, New York City showed bold leadership with decisive action for climate safety and justice.

The oil companies have known for decades that their product is dangerous for the planet, but they relentlessly hid the evidence, stoking confusion rather than solutions. Through individual company efforts to support climate denialism and confusion, and through relentless and reckless lobbying by the US Chamber of Commerce and the American Petroleum Institute, the companies launched a full-blown assault on climate science to stop or delay the shift to renewable energy.

Big Oil bought the Republican Congress with massive campaign donations. Republican senators led the witless Donald Trump to pull out of the Paris Agreement.

There are alternatives to runaway climate change. North America has vast reserves of wind, solar, hydro, geothermal and other zero-carbon energy to power the United States, Canada, and Mexico. New York can go green and electric by midcentury through electric vehicles, electricity-powered public transit, and electric heat pumps for buildings, powered by electricity from wind, solar and hydroelectric power.

The city has produced a road map to reduce emissions by 80% by 2050. Based on the rapid progress of zero-carbon energy systems and smart cities, I believe that a 100% reduction — full decarbonization — is likely to be feasible and advisable, well before 2050.

Despite these effective and economical options, the retrograde coal, oil and gas producers are trying to stop the transition to clean and safe energy. They are willfully and knowingly imposing vast damages on the public to continue their destructive activities, by promoting more drilling for fossil energy, opposing climate change policies such as the Obama administration’s Clean Power Plan, and pretending that natural gas is an “environmentally friendly” energy source when in fact the world urgently needs to move to zero-carbon energy.

New Yorkers alone are paying tens of billions of dollars to rebuild from Hurricane Sandy and to protect against rising sea levels. Mayor Bill de Blasio and other city leaders are saying that enough is enough: enough lies, enough CO2 and methane emissions, enough massive flooding, and enough corporate greed. It’s time for the industry to clean up and pay up for the damages from its misdeeds.

The city announced two important steps this week. The first is divestment — selling the investments in fossil fuel companies that are in the city’s $189 billion pension funds.

Fossil fuel is a lousy investment in the 21st century. The scientific evidence is clear. To meet the limits on global warming set in Paris, we have to decarbonize the energy system by midcentury at the latest. Even if we do, we still will face high costs for generations to come from the climate change that has already occurred. Yet we still have the chance to head off a catastrophic rise in warming that could lead to several meters of sea level rise and other disasters to health and safety.

By divesting, New York joins other investors who have gotten rid of fossil fuel investments in sending a powerful message to the major oil companies: Transition out of your world-threatening activities. It’s past time to stop drilling for more oil and gas when the world already has in proven reserves much more than could ever safely be used, and invest instead in wind, solar, hydro and other low-carbon energy sources. The world will have to “strand” some large portion of the coal, oil and gas reserves already discovered. There is certainly no need to develop new, high-cost oil and gas fields in Alaska, the Arctic or coastal waters.

The second step is a lawsuit calling for five major oil companies — BP, Chevron, ConocoPhillips, Exxon Mobil and Royal Dutch Shell — to compensate New York for damages from climate change. By bringing the lawsuit, the city joins a growing wave of climate litigation that attempts to hold the fossil-fuel industry accountable in court. Two recent advances in knowledge make such lawsuits both timely and powerful.

First, careful researchers have collected data showing the contributions by specific oil companies to the world’s overall CO2 and methane emissions. Those data demonstrate the large share of emissions due to oil and gas production by the major companies after 1980 — that is, during the period when the companies already knew or should have known of the great dangers caused by their products.

Second, climate science can now offer an assessment of the damages that can reasonably be attributed to the companies’ products. The attribution is generally stated in the form of a probability or a frequency, for example, that a particular massive flood surge was twice as likely, or 10 times as likely, because of global warming.

This is the same kind of assessment we make when we say that a particular case of lung cancer was most likely caused by smoking even though the cancer may have occurred without smoking. Courts often assess liability on the basis of such probabilities.

No doubt the oil companies will fight back with huge teams of lawyers and lobbyists. The lawsuits are an uphill battle. But the world’s people will be rooting for New York and other plaintiffs in this important effort. How much better it would be if the companies honestly acknowledged their wrongs and declared to the world that they are prepared to work for, and partly pay for, realistic solutions for climate safety.