“LIKE ice water through the veins.” That is how a UN official, in Marrakesh for the UN climate summit that ended on November 18th, described the effect of Donald Trump’s electoral victory. Her trepidation was widely shared at the two-week event—and justified. In a tweet in 2012 Mr Trump called anthropogenic warming a “hoax”. On the campaign trail he said he would abolish America’s Environmental Protection Agency (EPA) and “cancel” the UN agreement to curb greenhouse-gas emissions adopted by 190-odd countries in Paris last year. But in an interview this week with the New York Times, he seemed to waver. Gathered in the ancient Berber city, representatives of those countries pondered whether America is about to forfeit the leadership on climate change it belatedly showed when Barack Obama helped bring about the Paris accord.

That deal, which came into force earlier this month, includes a commitment to limit the increase in the global average temperature to “well below” 2°C above pre-industrial levels. Given that the world has already warmed by approximately 1.2°C, this is hugely ambitious (see chart 1). With just a few weeks to go, this year looks likely to be the hottest on record.

Yet the measures the signatories vowed to adopt were comparatively modest. Most were self-proposed and voluntary cuts to their emissions of carbon dioxide, in particular those caused by deforestation and the burning of fossil fuels. Most developing countries, which produce around 65% of global carbon emissions, promised to restrict their emissions to levels that, assuming natural gas continues to substitute for coal and the cost of renewable energy continues to fall (see special report), may require no special efforts. India, the world’s third-biggest producer of greenhouse gases (see chart 2, pledged to increase its use of energy from renewable sources. Overall, though, its target is estimated to represent a rise of 90% compared with current emissions. By the summit’s close some of the Trump-fuelled anxiety had eased. That was in part because the talks demonstrated the value and durability of the Paris deal. As well as the overall target, it contains many useful provisions, on climate finance, technology sharing and the role of forests, for example. Over time, these could help countries make faster progress than now seems plausible. Past climate deals failed in part because they tried to impose mitigation targets on reluctant countries, rather than allowing each country to decide for itself what it thinks is achievable. The Paris agreement, by contrast, is sufficiently loose in its structure and modest in its aims to be able to withstand America, the world’s second-biggest carbon emitter, abandoning it.

American and other officials in Morocco downplayed that possibility. In a striking reversal of the two countries’ recent positions, Liu Zhenmin, China’s vice-foreign minister, coaxingly invited America not to shirk its environmental responsibilities; the UN’s early climate negotiations, he noted, had been supported by two Republican presidents, Ronald Reagan and George H.W. Bush. John Kerry, America’s secretary of state, said that, though he could not second-guess Mr Trump (who had no representative in Marrakesh), he had “learned that some issues look a little bit different when you’re actually in office compared to [during a] campaign”.

Mr Trump is indeed unpredictable. Since the election he has signalled a contempt for climate science by appointing a climate-change denier, Myron Ebell, to plan his takeover of the EPA, through which Mr Obama, in the absence of congressional support for environmental law-making, has issued much new green regulation. In the New York Times interview, however, Mr Trump suggested that he accepted the reality of anthropogenic warming and might not seek to withdraw from the Paris accord. He has now taken just about every position on climate change imaginable. As well as calling it a hoax—by the Chinese, with the aim of harming American manufacturing—he has said the world is warming but humans have nothing to do with it, that human activity plays a “minor” role in warming, donated money to a group lobbying for action to avert climate change and, in 2009, signed a public letter calling for cuts to America’s emissions, thereby creating “new energy jobs”.

Mr Trump’s view on climate change, it seems, is chiefly governed by what he thinks each audience wants to hear. That may be good news for the world. Public concern about global warming is rising in America; 64% of Americans say they are worried “a great deal” or “a fair amount” about it, and 71% say America should not withdraw from the Paris accord—including a majority of Republicans. As for scrapping the EPA, the share of Americans who like the breathable air and drinkable water the agency helps to safeguard is no doubt even higher. Mr Trump acknowledged this, too, in his recent interview: “Clean water, crystal-clean water, is vitally important.”

Abolishing the EPA, moreover, would require legislation that Democratic senators, though in the minority, could block. The main subsidies for wind- and solar-power generation, which made up two-thirds of new generating capacity last year, appear similarly beyond Mr Trump’s reach. They were extended last year by a Republican-controlled Congress; windy red states such as Kansas, Oklahoma and Texas are among their main beneficiaries.

Mr Trump could try to remove greenhouse gases from the EPA’s remit, though this would require the Supreme Court to reverse itself on a ruling from 2007. Or he could rescind environmental regulations brought in by Mr Obama, even if this would often be difficult. Many of these were mandated by legislation and have been tested by litigation, thereby accruing a legal standing of their own. For example, in order to get rid of a rule that curbs the amount of mercury and other toxic emissions from power plants, Mr Trump’s EPA boss would have to issue, in effect, a less exacting alternative, then defend it against legal challenges from environmental campaigners. That could take years.

But other rules are more vulnerable. They include a handful passed as executive orders—for example, one that mandates the energy-efficiency standards of federal agencies—which the new president could strike out. In addition, any regulation issued between Mr Trump’s election and his inauguration could be frozen, at least temporarily. Incoming administrations often threaten to revoke such “midnight regulations”, but rarely do so, to avoid the bother of having to replace them, as they must. But this could spell the end of Obama measures such as a rule issued on November 15th to control methane leakage from oil and gas operations on federal lands.

Emboldened by the prospect of a unified Republican government, Republican congressmen could get in on the act. Under a rarely used law, the Congressional Review Act, Congress can revoke any rule, with a majority vote, within 60 congressional working-days of its issuance. As Congress has not been terribly active in recent months, it could in theory scrap all regulations issued since mid-May.

Mr Obama’s most important environmental regulation is the Clean Power Plan, which seeks to limit carbon emissions from coal- and gas-fired power stations. It is considered crucial to America’s chances of fulfilling its commitment under the Paris accord to cut its emissions, by 2025, to 26-28% below their 2005 level. Mr Trump has promised to scrap the plan. It is currently stayed by the Supreme Court while a legal challenge by 27 states and some companies is mulled in the federal appeals court in Washington, DC. If that court rules against it, a Trump administration would not appeal. If it is upheld, its challengers would appeal to the Supreme Court, where the Trump administration might refuse to defend it. If it makes it through the Supreme Court, the Trump EPA could probably rescind and replace it.

But even this would not persuade many electricity companies or states to reverse the shift they are already making towards renewables and away from coal. The growth of renewables has helped cut America’s emissions from power generation by around a quarter since 2005. The main reason for that progress, an abundance of cheap shale gas, gives the lie to another piece of Trumpian bluster: the tycoon’s promise to pep up the coal industry.

America’s shale-gas revolution has made generating electricity from gas almost as cheap as generating it from coal (see chart 3). Once the costs of probable future environmental regulations are allowed for, new gas-fired power-stations look like better business than new coal-fired ones. This year is expected to be the first in which America generates more electricity from gas than from coal; 94 coal-fired power-stations closed last year and 41 more are expected to shut this year. Mr Trump has promised to make more public land available to miners; but access to coal reserves is not their problem. He probably could not intervene to reverse coal’s decline without actively handicapping renewables or natural gas. All in all, optimists think the environmental damage caused by a one-term Trump administration could be relatively limited. Whether they are right, however, will depend on how much he attempts. Perhaps the biggest risk is that, having already abandoned some more prominent campaign promises—for example to wall off Mexico and deport 11m undocumented migrants—he could view a bonfire of environmental regulation as a relatively low-cost way to placate his disappointed supporters. Slashing funding for “politicised” climate research, as one of his advisers has said is on the cards, might please them, too. Previous Republican presidents whose sympathies lay with the coal- and oil-men played by the rules, frets an environmental lawyer who fought them; perhaps Mr Trump will not. He could, for example, simply stop implementing environmental rules across the board, and let the legal battles rage. It seems unlikely. But so was his impending presidency.

Easy free-rider

The delegates in Marrakesh were comforted in part by a hope that Mr Trump would soon realise that withdrawing from the Paris deal would weaken his hand in every other international bargain he might wish to make. “If you renege on deals, you don’t get the one you want next time,” says James Cameron, the chairman of the Overseas Development Institute, a British think-tank. But if that calculation does not hold, progress under the Paris accord may not be as fast as it would otherwise have been.

Countries have until 2018 to work out how to tot up the results of their environmental efforts; in 2020 they will set themselves new, hopefully tougher, targets. This process would probably be less robust and more secretive without America’s involvement. Developing countries, whose unmet energy needs are still substantial, might find it easier to fudge their figures. And persuading other countries to raise their ambitions in four years’ time would be difficult with America standing idly by.

Not just leadership and motivation would be in shorter supply, but also money for green schemes. By 2020, $100bn a year is supposed to be available, most of it for cutting greenhouse-gas emissions and the rest for helping countries to adapt to climate change. Rich countries are supposed to pay almost all of it; the rest of them may balk if America fails to do its bit.

But some think large transfers from rich countries to poor ones are in any case becoming less important to international environmental efforts. Droughts, heatwaves and other extreme events are already more likely because of global warming, and the link between climate change and such disasters is becoming more widely accepted. Negotiations about paying for mitigation and adaptation efforts used to resemble talks between hostage-takers and those trying to free them, says Hal Harvey, an energy consultant: poor countries would demand money from rich ones in return for not exploiting their own ecosystems.

Now these countries are increasingly realising that they need to act to limit global warming for their own sakes, whether or not sweeteners are forthcoming. In Marrakesh 48 of the least-developed ones promised to supply their entire energy needs from renewable sources by 2050. Rachel Kyte, a UN energy official, says that many more are looking for help to set up energy-efficiency schemes and to work out how best to spend what money they have.

Slowing economic growth and falling demand for coal in China mean that it may already have passed the high point of emissions, about 15 years ahead of the date it promised under the Paris deal. By 2020 it plans to have tripled its solar capacity—already greater than that of any other country—to 143 gigawatts (GW); two years ago the world’s entire installed solar capacity came to 181GW. If this enables China to burn less coal, it will help tackle air pollution, a huge problem in its cities. According to research published last year, spending a day in Beijing does about the same harm to a person’s health as smoking 40 cigarettes.

Strenuous efforts by China to cut emissions would also mean vast domestic demand for clean-energy technology, which would help the country’s firms to consolidate their lead in supplying a fast-growing, and lucrative, global market. While Mr Trump occupied himself with a few unprofitable coal-mines, China could be taking a commanding lead in batteries, solar panels and wind turbines.

The cost of renewable energy has already come down a great deal in the past couple of years, and with greater economies of scale, will fall further. Even though government subsidies in some places, including Britain, are being chopped, renewable sources are making more commercial sense. In some places offshore wind energy costs just half as much as it did three years ago. And solar installations in the world’s sunniest spots now offer power at less than 3 cents per kilowatt-hour (kWh)—cheaper than even the most economical gas plants. “With solar so cheap you might think it is a communist plot, but you’re still going to put up the panels,” says Mr Harvey. The volatile price of fossil fuels also makes them less attractive when planning new generating capacity.

For India, too, cheaper renewable energy will be a boon. Around 300m of its people, mostly in rural areas, have no electricity supply; off-grid solar installations would be life-changing. India has pledged to install 175GW of renewable capacity by 2022, most of it solar. This would mean doubling solar capacity every 18 months or so; it is roughly on track to meet its goal.

According to Arunabha Ghosh of the Council on Energy, Environment and Water, a think-tank in Delhi, India’s plans will not be affected if America pulls out of the Paris deal since they are in the country’s own interests. Extreme weather events linked to climate change already result in huge distress and enormous bills: in the 12 months to April 2014 central and state governments spent $92bn after floods, droughts and other disasters.

Support for continued climate action has emerged from other surprising quarters. Saudi Arabia recently announced new efficiency schemes for energy and water, which will make it easier to cut huge subsidies to both and thereby put further downward pressure on demand. Indonesia is also cutting subsidies for fossil fuels; until recently these absorbed a bigger share of public spending than either health or education, says Erik Solheim, the head of the UN Environment Programme.

The dawn of a communist plot

The new climate crusader

Seven years ago, when climate talks in Copenhagen crashed and burned, Chinese intransigence was widely blamed. Its officials have not forgotten the experience. A chance to play the hero and rescue global environmental efforts would be appealing—though China surely wants America to stay involved. American and Chinese leadership has achieved unprecedented levels of international co-operation on climate in the past year. Though the deal struck in Paris was too modest, the hope that countries would increase their efforts over time was realistic.

That hope has been shaken by Mr Trump’s election, but not extinguished. The money governments and firms have already pumped into renewables and energy-efficiency programmes mean that progress will continue. Not everywhere will suffer the effects of climate change, from flooded streets and scorched fields to empty reservoirs and burning forests, equally. But even if Mr Trump reneges on America’s environmental promises, others will try to stop the worst of them.