Japan’s prime minister, Shinzo Abe, may have described the G20 summit as a success on Saturday afternoon, but the two days that the leaders of the world’s 20 richest economies spent in the rainy-season humidity of Osaka also magnified deep and potentially unbridgeable divides on everything from climate change to the future of western liberalism.

The G20 nations, Abe said, “have a responsibility to squarely face global problems and to come up with solutions through frank dialogue”. Their communique, which had looked in doubt 24 hours earlier as the EU and the US sparred over how to describe the climate crisis, went some way towards meeting his demands.

Vladimir Putin and Shinzo Abe Photograph: Mikhail Klimentyev/AP

Their compromise enabled 19 of the 20 leaders to reaffirm their commitment to the Paris agreement, but left enough room for Washington to attempt to justify its increasing isolation from the global effort to reduce greenhouse gas emissions with a reference to the harm it would inflict on “American workers and taxpayers”.

The “frank dialogue” Abe craved proved more problematic, however.

The opening day of the summit was overshadowed by the China-US trade war, the presence of Saudi Arabia’s crown prince, Mohammad bin Salman, and for British audiences at least, Theresa May’s confrontation with Vladimir Putin over the Salisbury novichok poisonings.

Theresa May did not attempt to mask her discomfort while shaking hands with Vladimir Putin. Photograph: Reuters

Putin had already angered Donald Tusk, among others, by declaring in a Financial Times interview published at the start of the summit that liberalism was obsolete.

It was a theme he returned to on Saturday evening, when he claimed that immigration had infringed on other people’s rights, and attributed Trump’s 2016 election victory to disenchantment with mainstream liberal ideals.

“The liberal idea has started eating itself,” Putin told reporters in Osaka. “Millions of people live their lives, and those who propagate those ideas are separate from them. People live in their own country, according to their own traditions, why should it happen to them?”

But as the G20 leaders headed home, there was also cause for cautious optimism.

Trump and the Chinese president, Xi Jinping, stepped back from the trade war precipice – at least for now – during their highly anticipated meeting, while all but one of the G20 leaders decided not to cross French president Emmanuel Macron’s “red line” on the climate crisis and included a reference to their “irreversible” obligations under the Paris agreement. There was also a commitment to stop adding to plastic waste pollution of the world’s oceans by 2050.

Inevitably, it was left to Donald Trump to take some of the sheen off Japan’s first G20 summit with a Saturday morning tweet that set off speculation he was about to meet North Korea’s leader, Kim Jong-un, along the heavily armed peninsula that has divided the Korean peninsula for 55 years.

Trump proposed that he and Kim leader meet at the demilitarised zone [DMZ] to shake hands and “say hello” during his visit to South Korea on Sunday.

After some very important meetings, including my meeting with President Xi of China, I will be leaving Japan for South Korea (with President Moon). While there, if Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)! — Donald J. Trump (@realDonaldTrump) June 28, 2019

North Korea described the offer as very interesting, but said it had yet to receive an official invitation.

“I am of the view that if the [North Korea-US] meetings take place on the division line, as is intended by President Trump, it would serve as another meaningful occasion in further deepening the personal relations between the two leaders and advancing the bilateral relations,” North Korea’s KCNA news agency quoted the country’s first vice foreign minister, Choe Son-hui, as saying.

Trump told reporters: “We’ll be there and I just put out a feeler because I don’t know where he is right now. He may not be in North Korea. If he’s there, we’ll see each other for two minutes, that’s all we can, but that will be fine.”

He said he would have no problem stepping into North Korea if he met Kim for a handshake and to “say hello”.

Trump stepping over the line of demarcation separating North and South Korea would be hugely symbolic, echoing a similar gesture made by the South Korean president, Moon Jae-in – with Kim’s encouragement – when they met at the DMZ last year.

“Sure I would, I would. I’d feel very comfortable doing that. I’d have no problem,” Trump said, adding that he believed Kim followed his Twitter account. “I guess he does because we got a call very quickly,” he said.

If Kim accepts the invitation it will be the leaders’ first meeting since their denuclearisation summit in Hanoi in February ended without an agreement.

Some North Korea watchers interpreted Choe’s comments as a sign that the meeting will go ahead. Commenting on the KCNA reports, John Delury, a North Korea expert at Yonsei University in Seoul, tweeted: “Not to put too fine a point on it, but this is North Korean for ‘yes’”.

The South’s presidential Blue House said nothing had been confirmed at this point and added: “Our position, which hopes for a dialogue between the US and North Korea to take place, remains unchanged.”

Trump and Kim have met twice, first in Singapore last June and again in Hanoi in February. Neither summit has produced a comprehensive agreement that would see North Korea abandon its nuclear weapons program in exchange for sanctions relief.

But a photo opportunity on the DMZ, no matter how symbolic, is unlikely to go far in resolving their differences on denuclearisation, according to Scott Seaman, director of Eurasia Group Asia.

“For talks to have real legs, either Kim must credibly commit to denuclearisation or Trump must credibly agree to allow Kim to keep some of his nuclear weapons,” Seaman said. “Without a shared end goal, creating a viable roadmap to reaching it will remain impossible.”

Donald Trump announced that the US would not impose further tariffs on China. Photograph: Kevin Lamarque/Reuters

Hours after making his impromptu overture to Kim – and months after their denuclearisation summit in Hanoi ended in failure – Trump emerged from a meeting with Xi to declare that US trade negotiations with China were “right back on track”.

He said the US would not impose further tariffs in an ongoing trade war that other world leaders had said could threaten the global economy, and added that the world’s two biggest economies would restart negotiations on a trade deal.

The US president told a press conference that he and his Chinese counterpart had had a “great meeting”.

“We will continue to negotiate, and I promise that at least for the time being we won’t be adding additional [tariffs] … We’re going to work with China to see if we can make a deal. China will consult with us and will be buying a tremendous amount of food and agricultural products, and they’re going to start doing that almost immediately.”

Trump had said at the start of the meeting that he was open to a “historic fair trade deal” with China. “We are totally open to it,” he told Xi, who called for “cooperation and dialogue” instead of confrontation.

Trump added: “We want to do some things that will even it up with respect to trade. We were very close but something happened where it slipped up a little bit,” in a reference to the failure of previous talks.

In their declaration, the G20 leaders avoided criticism of Trump-style protectionism but committed themselves to realising “free, fair and non-discriminatory” trade and to “keep our markets open”.