Donald Trump and Xi Jinping met at the G20 Summit to discuss US-China trade (Reuters)

US President Donald Trump said Saturday he was ready for a "historic" deal with China as he kicked off a hotly awaited meeting with China's Xi Jinping, with the world watching to see if they can strike a deal over their long-running trade war.

After a first day dominated by public shows of bonhomie, all eyes at the G20 turned to a pivotal showdown between the two rivals that has huge implications for the global economy.

The meeting kicked off in a positive tone, with Trump saying: "It would be historic if we could do a fair trade deal... We are totally open to it."

For his part, Xi said that "dialogue" was better than confrontation after both sides had slapped tit-for-tat tariffs on each other's goods.

Even before Donald Trump sat down with his Chinese counterpart, the US president grabbed the headlines with a surprise tweet inviting Kim Jong Un to meet for a handshake at the demilitarised zone between North and South Korea.

Trump has said he expects a "productive" meeting but has also warned he is prepared to slap tariffs on all Chinese imports if no deal can be struck on the sidelines of the G20.

Trump had earlier confirmed that the leaders would discuss Chinese telecoms firm Huawei, which Washington has banned over security concerns. Beijing reportedly wants the restrictions lifted as part of any trade truce.

Experts believe the most that will be agreed is a truce and a pledge to keep talking, although markets are not ruling out a complete collapse or a surprise breakthrough given the US president's mercurial nature.

The first tete-a-tete between the leaders of the world's top two economies since the last G20 in December has cast a long shadow over this year's gathering in Osaka, where differences over climate change have also been laid bare.

China's state-run Xinhua news agency said the meeting was a "unique opportunity for the two sides to find new common ground in easing trade tensions and bring the troubled ties back onto the right track".

However, the commentary also warned the US "needs to place itself on an equal footing with China" and "accommodate China's legitimate concerns".

Economists say that a lengthy trade war could be crippling for the global economy at a time when headwinds including increased geopolitical tensions and Brexit are blowing hard.

On Friday, the European Union and the South American trade bloc Mercosur sealed a blockbuster trade deal after 20 years of talks, with European Commission President Jean-Claude Juncker hailing it as a "strong message" in support of "rules-based trade."

Heatwave

Trade is far from the only contentious issue on the table, with climate change proving another major sticking point.

Japan is seeking consensus between EU leaders who want strong action and an American administration committed to withdrawing from the Paris climate agreement.

But diplomatic sources said Washington was trying to win countries over to its side and Japanese officials acknowledged they faced a diplomatic uphill battle.

By Saturday morning, almost no language on climate change had been agreed and doubts lingered over whether a final statement would even see the light of day.

A diplomatic source said it had been a "difficult" night, with the American negotiator pushing a "very tough position" and a group including France standing united against watering down the climate language in the final statement.

Trump has dominated the headlines from the summit, and once again caught observers by surprise by tweeting early Saturday that he was open to meeting Kim while in South Korea this weekend.

"If Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)!," he wrote.

Several experts, however, said the focus on Trump and the talks with China struck at the heart of the G20 format, created to craft a united global response to the Lehman Brothers crisis.

"With much of the fate of the global economy and the likely direction of markets hanging on the outcome of this pivotal Trump-Xi meeting, we think things will get worse before they get better," said ING Economics.

And the focus on bilateral meetings on the sidelines of the summit once again sparked doubts about the future of the gathering, experts said.

"The G20 was created as a forum for cooperation and the question may well be 'have we reached the point where it can no longer serve that purpose'," Thomas Bernes from the Centre for International Governance Innovation told AFP.