US President Donald Trump's position on climate change was termed "regrettable" by German Chancellor Angela Merkel in her closing remarks at the G20 summit but world leaders appeared to have struck a deal on trade policies.

In Hamburg on Saturday, Merkel said the two-day summit, marred by violent protests on the streets, achieved "good results in some areas" and cited a hard-won agreement on trade that included Trump and the United States.

But she said talks had been, at times, "difficult".

"One central focus was climate and energy and here it became clear what I had said ahead of the summit," Merkel said.

"Where there is no consensus, the disaccord must be mentioned. That's why there is the American position on the one hand. As you know, the United States has unfortunately left the climate accord, or rather they expressed the intention to do so."

The final statement in the G20 summit made clear that the other countries and the European Union unanimously supported the Paris climate agreement rejected by Trump.

READ MORE: G20 is desperately trying to save a failed world order

The 19 other leaders took note of the US decision to withdraw from the Paris climate accord and declared it "irreversible".

For its part, the US injected a contentious line saying that it would "endeavour to work closely with other countries to help them access and use fossil fuels more cleanly and efficiently".

Also at the summit, the trade deal struck by the US administration and international partners endorsed open markets, but acknowledged countries had a right to put up barriers to block unfair practices.

Less controversial issues

John Kirton, co-director of the G20 Research Group at the University of Toronto's Munk School of Global Affairs, called the summit a "very solid success".

He pointed to broad agreement on the agenda, much of it focusing on less controversial issues such as women's empowerment and promoting digitalisation.

Over the long term, the G20 implements 72 percent of its promises and has implemented 80 percent of them since last year's summit in Hangzhou, China, according to Kirton.

On the streets of Hamburg, however, protests continued on Saturday as small groups of hooded anti-capitalist Black Bloc fighters scuffled with German police at an otherwise peaceful march against the G20 summit.

At least 76 police officers and dozens of protesters have been injured in clashes in Hamburg ahead of the G20 summit https://t.co/DjdzCjR6rL pic.twitter.com/Buehftfurg — Al Jazeera English (@AJEnglish) July 7, 2017

After a night of rioting, in which shops were looted, cars were torched and objects were hurled, the city centre was in lockdown with luxury shops along the main streets barricaded up and many protected by security guards.

More than 50,000 people gathered for a "G20 - not welcome" demonstration in the port city. At one point, a group of about 120 people, some masked, kicked police and attacked them with flagpoles before running away.

Merkel met police and security forces after the summit to thank them and condemned the "unbridled brutality" of some of the protesters, but she was forced to answer tough questions about hosting the summit in Hamburg.