The rising global threat posed by Pyongyang is likely to see conflicts over climate and trade take a back seat.
The rising global threat posed by Pyongyang is likely to see conflicts over climate and trade take a back seat as regional neighbours China, Japan and South Korea gather with Trump and Russian strongman Vladimir Putin in Hamburg.
"Testing an ICBM represents a new escalation of the threat to the United States, our allies and partners, the region, and the world," US Secretary of State Rex Tillerson said, confirming North Korea now possessed a weapon capable of reaching US territory.
Russia and China condemned Tuesday's test and the European Union may consider additional sanctions.
All eyes will be on Trump, who had vowed North Korea's goal of possessing an ICBM "won't happen" and has repeatedly pressed China to rein in its truculent neighbour.
In the most anticipated moment of the G20, Trump will meet Putin, the ex-KGB agent accused of having aided, with hackers and fake news, the surprise rise of the property tycoon into the White House.
The moment they shake hands is sure to see "an Olympian level of macho posturing between these two leaders, who both understand the importance of symbolism and the perception of being tough," said Derek Chollet of the German Marshall Fund of the United States.
Trump ruffled other leaders at a G7 meeting in Italy in May and has steered the economic and military superpower on an isolationist "America First" course.
His counterparts are bracing for fresh surprises after Trump stunned the world by pulling out of the 2015 Paris climate pact, questioned long-standing NATO allegiances and dismissed free trade principles.
Trouble is also brewing at the conference table at a time when the West and Europe are deeply divided, the post-Cold War order is fraying and China and Russia are asserting themselves on the global stage.
"There is a danger that the summit will lead to polarisation between the US and other countries" on climate change and other issues, warned Oxford Analytics economist Adam Slater.
Trade wars loom as Trump has demanded Germany and China reduce their huge surpluses and threatened other countries with punitive measures in battles over steel, natural gas and hormone-treated beef.
The year's gathering of the Group of 20 big industrialised and emerging economies, the biggest diplomatic event outside the UN, will also provide a stage for other world leaders muscling for power and regional influence.
Chinese President Xi Jinping will meet regional rival Japan's Prime Minister Shinzo Abe, at a time when both are worried about North Korea.
Also looming over the summit will be the bloody conflict in Syria and the frozen one in Ukraine -- both involving Russia -- as well as the struggle for Mideast dominance between Saudi Arabia and Iran.
Then there is Turkey's President Recep Tayyip Erdogan, whose crackdown on alleged coup plotters, civil society and Kurds after a 2016 putsch attempt has poisoned relations with Germany.
Trump, before the summit, will meet leaders from ex-communist eastern European nations, including Hungary's authoritarian Viktor Orban -- threatening to deepen a new east-west split in the EU, which is facing Brexit and still recovering from divisions over the debt crisis.
The US president will on Thursday meet the summit host, German Chancellor Angela Merkel, the longest-serving leader and, aside from Britain's Theresa May, the only woman in the club.
Merkel, hailed by some as the "new leader of the free world", advocates an internationalist approach to global issues -- but her G20 motto, "Shaping an Interconnected World", contrasts sharply with Trump's go-it-alone approach.
The chancellor -- a green energy champion who has allowed more than a million mostly Muslim refugees into Germany since 2015 -- said last week that "the differences are obvious and it would be dishonest to try to cover that up. That I won't do."
In Hamburg, she must walk a fine line between trying to build a 19-1 front against Trump on key issues and preventing even further damage to transatlantic ties, while seeking common ground for at least a watered-down G20 final communique.
Some 20,000 police will guard the leaders against anti-capitalist protesters who have greeted them with the combative slogan "G20 - Welcome to Hell".
Up to 100,000 protesters are expected, a diverse group of environmentalists, peace and anti-poverty activists, united in the belief that the global elite is failing to solve the pressing global problems.
"We think that they all deserve our protest and our resistance from the streets," said one left-wing activist, Georg Ismael, 25.
"We are demonstrating against the G20 because we don't think that they represent the interests of humanity."