Kim Jong Un's train left Beijing on Wednesday after the North Korean leader visited his key ally on a trip seen as a strategy session ahead of his expected summit with Donald Trump.
Kim arrived in Beijing on Tuesday for his fourth visit to Pyongyang's sole major diplomatic friend, meeting President Xi Jinping and reportedly visiting a factory.
The North Korean leader's motorcade was spotted entering the Beijing central railway station on Wednesday afternoon, and the train departed shortly after on a day-long ride back to the northeast border, according to AFP journalists.
The unannounced trip was largely shrouded in secrecy. Beyond confirming his presence in Beijing, no details have been provided by either North Korea or China on his schedule, with no coverage in state media even in the nightly news broadcast hours after the train's departure.
Kim met for one hour with Chinese President Xi Jinping on Tuesday -- believed to be the North Korean leader's birthday -- and the two later dined with their wives at Beijing's Great Hall of the People, according to South Korea's Yonhap news agency.
"Chairman Kim Jong Un's visit to China was at the invitation of President Xi Jinping, of course President Xi would hold meetings and talks with him," Chinese foreign ministry spokesman Lu Kang said at a regular press briefing, adding that more details would be released later.
Tuesday's meeting focused on Kim's expected meeting with Trump, according to Yonhap.
In a New Year speech, Kim warned that Pyongyang may change its approach to nuclear talks if Washington persists with sanctions.
Relations between China and North Korea had deteriorated in recent years over Pyongyang's nuclear activities, but Kim has made sure to keep Xi informed about his dealings with the United States and South Korea as ties appear to have warmed.
"In order to resist the high pressure of the US, he must communicate with Xi in advance to see what steps he can take to deal with Trump," Beijing-based independent political commentator Hua Po told AFP.
"Kim needs the support of Xi so as to ask the US to make substantial steps, such as providing assistance to North Korea and normalising relations with North Korea."
Kim chose China for his maiden official trip abroad last year before holding meetings with South Korean President Moon Jae-in and Trump.
The American leader said Sunday that the United States and North Korea are negotiating the location of their next summit.
Discussions between the US and North Korea over Pyongyang's nuclear arsenal have stalled since Kim and Trump's high-profile summit in Singapore in June where they issued a vaguely worded declaration about denuclearisation.
The US insists that UN sanctions must remain in place until North Korea gives up its weapons, while Pyongyang wants them immediately eased. China also wants the sanctions to be relaxed.
- 'Turning point' -
But Chinese officials also likely want to impress on Kim -- who has so far pursued only limited reforms to his statist economy -- the benefits the giant Communist country has enjoyed in its transformation from impoverished nation to economic powerhouse.
Yonhap, citing unidentified sources, reported that Kim toured a factory operated by medicine firm Tongrentang for about half an hour in an economic zone in the Chinese capital.
He then went to the Beijing Hotel, where he was expected to have lunch with Xi before his departure.
"For North Korea itself, 2019 is his strategic turning point. If he wants to shift his focus to the development of the economy, he needs China's cooperation," said Lu Chao, a North Korea expert at China's Liaoning Academy of Social Sciences.
In the New Year speech, Kim focused on North Korea's moribund economy, saying that improving people's lives was his top priority and tackling energy shortages was an urgent task.
Beijing-based analyst Hua said changes in the economic model will affect politics, "which poses new challenges to his control over the country."
"For this point, he must ask for advice from China."
The visit coincided with negotiations between US and Chinese officials in Beijing to resolve a bruising trade war between the world's two biggest economies.
Some analysts say China could use its cooperation on the North Korean issue as a bargaining chip in the US trade talks.
But Hua said Kim's visit would have a "limited" effect on the trade negotiations.
"The Sino-US trade negotiations are a matter between China and the US," he said. "The weight of North Korea is limited and cannot play a decisive role."