Donald Trump toured the Forbidden City with Chinese leader Xi Jinping on Wednesday as the US president began the crucial leg of an Asian trip intended to build a global front against North Korea's nuclear threats.
After warning the North's "cruel dictatorship" in a speech in Seoul against testing the United States, Trump and First Lady Melania Trump were met by Xi and his wife Peng Liyuan for tea at the former imperial palace.
The genial gathering will be followed on Thursday by a full day of thorny talks, with Trump looking to prod Xi into doing more to squeeze North Korea economically and to address China's massive trade surplus with the United States.
The Trump administration sees Beijing as the key to controlling Pyongyang, which depends on China for its economic survival and for 90 percent of its trade.
Earlier, Trump congratulated Xi on his reappointment as China's Communist Party chief, tweeting: "I very much look forward to meeting with President Xi who is just off his great political victory."
Trump's use of the term "political victory" for the outcome of last month's Communist Party congress was seen by analysts as a conciliatory move before tough talks.
"He's laying it on thick to put Xi in a good mood because he will have unpleasant things to tell him," said Jean-Pierre Cabestan, China politics specialist at Hong Kong Baptist University.
Xi has prepared an extravagant "state visit-plus" for Trump, who was greeted by children waving US and Chinese flags at the airport. He was treated to a Peking Opera performance at the Forbidden City.
- Tweet inside Great Firewall -
Xi said during the Forbidden City tour that he expected Trump's visit to yield "positive and important" results.
Trump later posted his first messages on Twitter since arriving China, breaking through the country's "Great Firewall" which blocks the social media website.
"THANK YOU for the beautiful welcome China! @FLOTUS Melania and I will never forget it!" wrote Trump, who also posted an AFP photo of his visit.
He also tweeted another warning against North Korea, saying Pyongyang "has interpreted America's past restraint as weakness. This would be a fatal miscalculation. Do not underestimate us. AND DO NOT TRY US."
In addition to discussing North Korea, Trump plans to prod Xi over trade but the two leaders are also expected to oversee the signing of $20 billion in deals between US and Chinese companies.
- North Korean cult -
Hours earlier, in an address to the South Korean parliament, Trump gave a preview of what he will ask Beijing to do regarding North Korea.
"You cannot support, you cannot supply, you cannot accept," he said, urging China and Russia to fully implement UN sanctions, downgrade diplomatic relations and sever all trade and technology ties.
A senior White House official said China is doing "much more than it's ever done in the past" but it could try harder to curb trade at the border with North Korea.
"There are still some financial links that exist that should not under those (UN) resolutions... We're going to work closely with the Chinese to identify that activity and end it," the official said.
Trump will also decide at the end of his Asian tour next Monday whether to re-designate North Korea as a "state-sponsor of terrorism", the White House said.
In his speech, Trump painted a dark picture of North Korea as "a country ruled as a cult".
"At the centre of this military cult is a deranged belief in the leader's destiny to rule as parent protector over a conquered Korean peninsula and an enslaved Korean people."
South Korean lawmakers applauded as the US president, whose tour of Asia has been dominated by the nuclear-armed North, vowed not to be intimidated and warned Pyongyang it should not test American resolve.
The North carried out its sixth, and most powerful, nuclear test in September, and has fired dozens of missiles in recent months.
Two have overflown Japan -- which Trump visited at the start of his Asian tour -- and Pyongyang says it can mount a nuclear warhead on a rocket to bring the US mainland within range.
"We will not permit America or our allies to be blackmailed or attacked," Trump said.
But Trump made overtures to leader Kim Jong-Un, who has overseen rapid advances in North Korea's weapons technology.
In what he said was a direct message to the young leader, Trump told him: "North Korea is not the paradise your grandfather envisioned. It is a hell that no person deserves."
"Yet despite every crime you have committed against God and man, we will offer a path towards a much better future."
It would have to begin, though, with the North stopping ballistic missile development, Trump said, and "complete verifiable and total denuclearisation".