The Group of 20 meeting in Hamburg ended with leaders failing to paper over the cracks on climate change or sideline fears of a looming trade war on steel.

While leaders of the world’s largest economies reiterated their commitment to free trade – a victory over Donald Trump’s “America First” protectionism – they left the US leader isolated “19 against one” on climate change, five weeks after the US withdrew from the Paris agreement.

German chancellor Angela Merkel, as host and facing re-election in September, was anxious to make the best of the outcome.

“We can achieve more together than by acting alone and this was the spirit that guided us in working through our agenda,” she said after the meeting of leaders representing two-thirds of the world’s population.

After two days and nights of continuous talks, the G20 presented dissenting conclusions for the first time. Some 19 members – from Germany and Britain to China and Indonesia – said they “take note” note of the US withdrawal from a Paris agreement they viewed as “irreversible” and reiterated their own determination to move “swiftly” to full implementation.

Trump administration concerns were isolated in the communique text: a line insisting that a push for lower carbon dioxide emissions must not undermine economic growth or energy security and offering US assistance to countries seeking to use fossil fuels “more cleanly and efficiently”.

Protectionism

The other bone of contention in Hamburg was global trade. Despite Trump administration campaign rhetoric, and a G20 group that is far more heterogeneous than the G7, the final agreement commits to “keep markets open”, restates opposition to protectionism and embraces a “rules-based international trading system” of “reciprocal and mutually advantageous trade and investment frameworks”.

However, in a nod to US concerns on a glut of Chinese steel, the final agreement recognised “legitimate trade defence instruments” and demanded “concrete policy solutions” by November from a G20 sub-body set up last year to examine steel market imbalances.

Departing German officials were happy they had continued to bind the Trump administration to the pillars of rules-based global trade – for now at least.

On international tax, the G20 in Hamburg reasserted their commitment to implementation of action against base erosion and profit shifting (Beps) and said they would consider “defensive measures” against enabling countries listed in a September 2017 report.

Finally, the German G20 hosts secured a further commitment from member states to the UN’s 2030 sustainable development agenda.

Despite the climate dissent with Washington, many delegations noted an interest from the Trump team in a wording that kept a “back door open” for Washington to the Paris agreement.

While Ms Merkel said she did not share that optimism “at this time”, French president Emmanuel Macron agreed with some negotiators’ cautious optimism and announced plans for another Paris climate conference in December.

British prime minister Theresa May, with an eye on Mr Trump’s promises of a “very, very big deal” for bilateral US-UK trade, backed the G20 trade line but said she pressed for World Trade Organisation to ensure global trade is “working effectively”.