The state media confirmed the visit only after Kim had returned to North Korea.
Kim Jong Un has surprised world leaders and just about everyone else by making his first known trip overseas as a statesman in a two-day visit to Beijing.
He used the appearance to publicly confirm he is willing to hold a summit with Mr. Trump and, according to Chinese media, vaguely committed to denuclearize under certain conditions. He said this was "in accordance with the will of late President Kim Il Sung and late General Secretary Kim Jong Il". Peace House lies south of the demarcation line that bisects Panmunjom, which means that Mr. Kim would become the first North Korean leader to set foot in the South since the Korean War.
"Both Kim and Xi Jinping needed to build a stable external environment to stabilize their respective regimes after they solidified their power at home", he said.
Xi underscored the importance of developing ties, saying it was "a strategic choice and the only right choice", according to Xinhua.
While the paper's seven-page coverage of the event marked the country's first official acknowledgement by the North Korean authorities, some locals had already begun spreading rumors of the visit after hearing from contacts in China during regular phone conversations, learning about the various clues indicating that Kim Jong Un had arrived in Beijing. Notably, it was also reported that Xi accepted Kim's invitation to visit Pyongyang in the near future.
"This year there have been promising changes in the situation on the Korean Peninsula, and we express our appreciation for the major efforts that North Korea has made in this regard", Xi said.
"When China supported global sanctions imposed against North Korea, some experts speculated that Beijing no longer considers Pyongyang its ally".
Relations between the two countries have been strained after Beijing beefed up United Nations sanctions by blocking essential supplies like oil and coal following pressure from Trump.
"Perhaps China made a decision to put huge pressure on President Kim, overcoming its fear of instability and potential regime change, to convince North Korea of China's massive economic influence", Mr Wolf said.
Two North Korean TV anchors alternated reading text reports about the meeting that was published hours earlier by the North's official Korean Central News Agency. I would be very cautious because. what North Korea expects out of this summit and what the USA expects may not be potentially aligned.
"It makes sense for North Korea to explain their positions and coordinate with China, their most important partner", said Andray Abrahamian, research fellow at Pacific Forum CSIS, in an interview with the BBC.
China briefed Mr Trump about the visit, and the communication included a personal message from Mr Xi to the U.S. president, the White House said in a statement.
The White House has said that the United States continues to move forward on the proposed summit meeting between the two leaders.
"Certainly, we would like to see this", Sanders said.