By Ben Blanchard and Joyce Lee
BEIJING/SEOUL (Reuters) - North Korea's leader Kim Jong Un pledged his commitment to denuclearization and to meet U.S. officials, China said on Wednesday after his meeting with President Xi Jinping, who promised China would uphold friendship with its isolated neighbor.
After two days of speculation, China and North Korea both confirmed that Kim had traveled to Beijing and met Xi during what China called an unofficial visit from Sunday to Wednesday.
The visit was Kim's first known trip outside North Korea since he assumed power in 2011 and is believed by analysts to serve as preparation for upcoming summits with South Korea and the United States.
U.S. President Donald Trump wrote on Twitter he had received a message from Xi on Tuesday night that his meeting with Kim "went very well" and that Kim looked forward to meeting the U.S. president.
"Look forward to our meeting!" Trump wrote, while adding: "In the meantime, and unfortunately, maximum sanctions and pressure must be maintained at all cost!"
The White House said on Tuesday that North Korea's denuclearization pledge was evidence that the U.S.-led pressure campaign to force North Korea to abandon its nuclear weapons was working.
"For years and through many administrations, everyone said that peace and the denuclearization of the Korean Peninsula was not even a small possibility," Trump tweeted on Wednesday. "Now there is a good chance that Kim Jong Un will do what is right for his people and for humanity."
Earlier this month, Trump, who has exchanged bellicose threats with Kim in the past year, surprised the world by agreeing to meet the North Korean leader to discuss the crisis over Pyongyang's development of nuclear weapons capable of hitting the United States.
North Korea's official media has made no mention of Kim's pledge to denuclearize or the anticipated meeting with Trump, which is planned for some time in May.
China has traditionally been secretive North Korea's closest ally but ties have been frayed by Kim's nuclear weapons program and Beijing's backing of tough U.N. sanctions in response.
China's Foreign Ministry cited Kim in a lengthy statement as telling Xi the situation on the Korean peninsula was starting to improve because North Korea had taken the initiative to ease tensions and put forward proposals for talks.
"It is our consistent stand to be committed to denuclearization on the peninsula, in accordance with the will of late President Kim Il Sung and late General Secretary Kim Jong Il," Kim Jong Un said, according to the ministry.
North Korea was willing to talk with the United States and hold a summit between the countries, it quoted him as saying.
"The issue of denuclearization of the Korean peninsula can be resolved, if South Korea and the United States respond to our efforts with goodwill, create an atmosphere of peace and stability while taking progressive and synchronous measures for the realization of peace," Kim said.
Kim Jong Un's predecessors, grandfather Kim Il Sung and father Kim Jong Il, both promised not to pursue nuclear weapons but secretly maintained programs to develop them, culminating in the North's first nuclear test in 2006 under Kim Jong Il.
North Korea has said in previous, failed talks aimed at dismantling its nuclear program it could consider giving up its arsenal if the United States removed its troops from South Korea and withdrew its so-called nuclear umbrella of deterrence from South Korea and Japan.
Many analysts and former negotiators believe this still constitutes North Korea's stance and remain deeply skeptical Kim is willing to give up the weapons his family has been developing for decades.
"Kim Jong Un has finally echoed the unconvincing line of his father that denuclearization is the 'will' of Kim Il Sung," said Daniel Russel, who served as the top U.S. diplomat for Asia until last April.
"While that's better than his outright rejection of denuclearization to date, it's not very persuasive in light of his actions and his caveats about the need for the U.S. to first create the right 'atmosphere,'” Russel said in an email.
Widely read Chinese state-run newspaper the Global Times said the Kim-Xi meeting proved naysayers wrong about Beijing-Pyongyang relations.
"China and North Korea maintaining their friendly relations provides a positive force for the whole region and promotes strategic stability in northeast Asia," it said in an editorial.
Kim's appearance in Beijing involved almost all the trappings of a state visit, complete with an honor guard and banquet at Beijing's Great Hall of the People.
Kim and Xi also met at the Diaoyutai State Guest House, where Kim Il Sung planted a tree in 1959 that still stands.
State television showed pictures of the two men chatting and Kim's wife, Ri Sol Ju, getting a warm welcome from Xi's wife, Peng Liyuan.
Analysts said the meeting strengthened North Korea's position ahead of any meeting with Trump by aligning Beijing and Pyongyang while reassuring China it was not being sidelined in any negotiations.
"It seems that North Korea is not ready to deal with the United States without support and help from its longtime ally China," said Han Suk-hee, professor of Chinese Studies at South Korea's Yonsei University.
A top Chinese diplomat, Politburo member Yang Jiechi, will brief South Korean President Moon Jae-in about the about the Beijing talks in Seoul on Thursday, the South Korean presidency said.
North Korea's official news agency said Kim told a banquet hosted by Xi that his visit was intended to "maintain our great friendship and continue and develop our bilateral ties at a time of rapid developments on the Korean peninsula".
It said Xi had accepted an invitation "with pleasure" to visit North Korea.
China made no mention of Xi accepting an invitation, but Foreign Ministry spokesman Lu Kang pointed to a line in their statement citing Xi as saying he is willing to maintain regular communications with North Korea via visits and exchanges of envoys and messages.
"I have to say that China and North Korea have a tradition of high-level mutual visits," Lu told a daily news briefing.
China had largely sat on the sidelines as North Korea improved relations with South Korea recently, raising worries in Beijing that it was no longer a central player in the North Korean issue, reinforced by Trump's announcement of his proposed meeting with Kim.
"China is North Korea's lifeline, so the notion, from a Chinese perspective, that Kim Jong Un could have had these other two meetings before meeting with Xi Jinping, I think the Chinese just thought that is not going to happen," said Paul Haenle, director of Beijing's Carnegie–Tsinghua Center and White House representative to North Korea denuclearization talks from 2007-2009.
(Additional reporting by Christine Kim and Soyoung Kim in SEOUL, David Stanway and John Ruwitch in SHANGHAI and Ayesha Rascoe, Lisa Lambert and David Brunnstrom in WASHINGTON; Writing by Lincoln Feast; Editing by Paul Tait, Robert Birsel and Jonathan Oatis)