More than 70 German police officers have been injured in clashes with protesters in Hamburg ahead of the G20 summit.

Police used water cannons, batons and pepper spray to disperse the demonstrators as US President Donald Trump, British Prime Minister Theresa May and other leaders from the world's leading economic powers were arriving for the two-day gathering.

The protests have tarnished the start of a meeting German Chancellor Angela Merkel hopes will cement her role as a stateswoman as she seeks re-election in September.

Seventy six police officers were injured throughout the evening, with three requiring treatment in hospital, police said.

The pilots of a police helicopter sustained eye injuries when laser pointers were directed at them, police said.

Protesters damaged cars, set other objects ablaze and threw bottles in roving clashes that lasted until midnight.

Ms Merkel, who is campaigning for a fourth term, can ill afford images of chaos and disharmony. The summit, which starts in full tomorrow, is a chance for her to polish her diplomatic credentials but would be disastrous if marred by violence.

She met Mr Trump for an hour Thursday evening, but less than an hour later police clashed with the demonstrators near the summit venue.

A Reuters eyewitness saw at least one protester with blood on his face being treated. 

Ms Merkel has taken a high-risk gamble by choosing to hold the summit in the northern port city of Hamburg, partly to show the world that big protests are tolerated in a healthy democracy.

Before meeting Mr Trump, she struck a consensual tone, holding out hope for agreement on the divisive issue of climate policy and pledging to broker compromises.

She pledged to represent German and European interests at the summit, but added: "On the other hand, as hosts we - and I - will do all we can to find compromises."

What is the G20?

Mr Trump faces a testy confrontation at the summit with leaders of the other big Group of 20 economies after deciding last month to pull the United States out of the 2015 Paris climate deal.

Agreement could yet be found on climate, Ms Merkel indicated.

"There are various options, which can be discussed. We know that the United States have withdrawn. All others ... or as far as I know, many, many others stand by this agreement," she said.

As the leaders began holding informal meetings, thousands of protesters from around Europe, who say the G20 has failed to solve many of the issues threatening world peace, poured into Hamburg to join the main demonstration.

Police expected around 100,000 protesters in the port city, some 8,000 of whom are deemed by security forces to be ready to commit violence. Up to 20,000 police officers are on hand.

As summit host, Ms Merkel must seek consensus among the G20 leaders not only on the divisive issue of climate policy but also on trade - an area fraught with risk as Mr Trump pursues his 'America First' agenda.

Indonesian finance minister Sri Mulyani Indrawati said Ms Merkel must be careful not to allow acrimony to undermine the summit.

She said: "There is quite a delicate balance that Angela Merkel will have to navigate in a way, because it is not clear that being confrontational won't just create even more of a credibility problem for G20 cooperation."

Earlier, Ms Merkel said she was committed to an open international trading system, despite fears of US protectionism under the Trump administration.

"We're united in our will to strengthen multilateral relations at the G20 summit ... We need an open society, especially open trade flows," she said.

She and Mr Trump discussed G20 themes, North Korea, the Middle East, and the conflict in eastern Ukraine, a German government spokesman said. Turkey's Tayyip Erdogan is among other leaders Ms Merkel was to meet.

Mr Trump, who in Poland called again on NATO partners to spend more on defence and said he would confront the threat from North Korea, is also due to hold his first face-to-face meeting with Russian President Vladimir Putin on the sidelines of the summit.

Their meeting will be closely watched at a time when mutual ties remain strained by US allegations of Russian election hacking, Syria, Ukraine and a US row over Trump associates' links to Moscow.

Ahead of the meeting, Mr Putin threw his weight behind the Paris accord.

"We see the Paris Agreement as a secure basis for long-term climate regulation founded on international law and we want to make a comprehensive contribution to its implementation," he told German business daily Handelsblatt.