As the summit drew to a close, German Chancellor Angela Merkel said she still deplored Mr Trump’s position on the Paris accord but she was “gratified” the other 19 nations opposed its renegotiation.

Where do we go from here?

“I think it’s very clear that we could not reach consensus, but the differences were not papered over, they were clearly stated,” Mrs Merkel told reporters.

She said she did not share the view of UK Prime Minister Theresa May that Washington could decide to return to the climate agreement.

But Mrs May reiterated her belief that the US could rejoin the accord in her news conference on Saturday.

And French President Emmanuel Macron also remained hopeful of persuading Mr Trump to change his mind, saying: “I never despair of convincing him because I think it’s my duty.”

He announced that Paris would host another summit on 12 December to make further progress on the climate agreement and to address financing.

Why have there been street battles in Hamburg?

There have been large protests on the streets of Hamburg, with demonstrators and armed police clashing into the early hours of Saturday.

Demonstrators – who were protesting against the presence of Mr Trump and Mr Putin, climate change and global wealth inequalities – set fire to vehicles and barricades, threw rocks at officers and looted shops.

What else happened at the summit?

He also confirmed he would visit the UK, but said the details had still to be worked out.

Media captionWho had the dominant handshake and who couldn’t maintain eye contact?

On Friday, the US president used his first meeting with Russian President Vladimir Putin on the sidelines of the G20 to discuss the alleged Russian hacking of last year’s US presidential election.

President Putin said on Saturday he believed President Trump had accepted his assurances that Moscow had not interfered in the vote.

He said he had established a working relationship with his US counterpart and a ceasefire in southern Syria – agreed between the US, Russia and Jordan on Friday – was a result of America becoming more pragmatic.