“HISTORY will judge today’s effort as pivotal,” said Barack Obama on September 3rd as he and Xi Jinping, the Chinese president, formally committed their countries to last year's Paris climate agreement in the southeastern city of Hangzhou. The deal, negotiated by 187 countries, aims to limit global warming to less than 2°C above pre-industrial temperatures. Its joint ratification by America and China, the world’s biggest polluters, heralds a new era of global cooperation on efforts to cut climate-changing emissions. It also gives a major push towards bringing the pact into force by end of the year, when Mr Obama will still be president. That is far earlier than was originally thought possible. China’s legislature rubber-stamped approval on Xi Jinping’s say-so; Mr Obama intends to put the agreement into effect without consulting the Senate. Mr Obama argues that the agreement is not a treaty, but an executive action, and so does not require approval. Overall, 55 countries representing 55% of global emissions must ratify the agreement for it to go into effect. Now, thanks to China and America, 26 countries covering almost 40% of emissions have done so (the two together release about 39% of global emissions each year).

In 2014, Mr Obama and Mr Xi jointly announced policies which in turn shaped their pledges. America offered most: a cut in emissions of 26-28% by 2025 (as measured against 2005 levels) while China said that its emissions would peak before 2030. The country has a habit of under-promising and over-delivering on environmental targets (China's emissions may already have peaked thanks to slowing growth). Nevertheless, the new alliance paved the way for success in Paris.

Almost seven years ago, tensions between China and America helped ensure the failure of earlier climate negotiations in Copenhagen. So too did an insistence upon a pre-set policy goal. Having countries sign up only to what they thought they could manage made agreement in Paris possible—but guaranteed the deal’s weakness. The pledges made by countries would be expected to result in global warming of about 3C. Yet, the agreement was more robust than expected, and mechanisms are in place within it to encourage countries to ramp up their efforts every few years.

The fact that America and China have ratified the deal could make it tricky for any future president to ignore America’s international climate commitments. Donald Trump, the Republican nominee, who dismisses the “global warming hoax” has sworn that he will “cancel” and renegotiate the Paris agreement if he wins the White House in November. That could now be more difficult.

If the agreement takes effect while Mr Obama is still president it will also bolster his environmental legacy. Since he took office, solar electricity generation in America has increased 30-fold and that from wind has more than tripled—helped by his extension of related tax credits. He became the first sitting president to visit America’s Arctic regions and oversaw the Environmental Protection Agency’s attempts to introduce the Clean Power Plan (CPP). This aims to work with states to curb emissions from power plants in a manner equivalent to taking 80m cars off the road by 2030. Few remember botched efforts to introduce a carbon-trading scheme back in 2010.

Currently on hold after a Supreme Court ruling in February, the CPP may not succeed either. Industry groups and more than 20 mostly Republican-led states have mounted robust legal challenges. Public attitudes to global warming still spilt along party lines and the topic has been discussed little on the campaign trail. But according to polling by the Pew Research Centre, a think-tank, half of Republicans questioned support limits on greenhouse gas emissions. Mr Trump should take note. Such nascent environmentalism might become Mr Obama’s greatest environmental legacy.