North Korea’s Kim Jong Un met Xi Jinping on a surprise visit to China

(CNN) -- North Korean leader Kim Jong Un met with the Chinese President on a surprise trip to Beijing this week, state media in both countries confirmed Wednesday, his first visit abroad since he took power in 2011.

Kim traveled to the Chinese capital because he felt he had responsibility to personally inform President Xi Jinping of the rapid diplomatic developments on the Korean Peninsula in recent weeks, according to China's state-run Xinhua news agency. Kim also called for a "new era" in bilateral relations in a letter to Xi.

Analysts said the visit was a courtesy call aimed at shoring up Pyongyang's relationship with China, its traditional ally and major trading partner, which had soured in recent years.

It also marks Kim's dramatic emergence as a world player equal in stature to leaders like Xi.

"We're seeing a carefully crafted North Korean strategy on diplomacy unfold on the world stage, starting with Beijing," said Jean Lee, an analyst at the Hyundai Motor-Korea Foundation Center for Korean History and Public Policy at The Wilson Center

"North Korea is an adept player of the game of 'divide and conquer.' He has been very savvy at giving each of the key players in the region — South Korea, the United States and now China — something special as part of this diplomatic push."

The young North Korean leader is set to attend a summit with South Korean President Moon Jae-in next month, and US President Donald Trump has also accepted an invitation to meet Kim face-to-face.

White House credits 'maximum pressure'

Images broadcast on Chinese state television CCTV showed Kim and his wife, Ri Sol Ju, meeting with Xi Jinping and other Chinese officials during the trip.

State media quoted Kim as saying that he is committed to the denuclearization of the Korean Peninsula, a key Chinese goal.

"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, according to Xinhua.

As well as Xi, Kim held talks with his deputies, including Li Keqiang, the Chinese premier, and Wang Qishan, the Chinese vice president who is considered one of Xi's closest confidantes.

The trip took place from March 25 to 28, with Kim and his wife traveling by train and spending two nights in Beijing. Rumors first surfaced about a potential visit by a high-level North Korean representative Monday night in Beijing, when pictures of what appeared to be the Kim family train surfaced online.

The White House said in a statement that the Chinese government briefed them on the meeting Tuesday.

"We see this development as further evidence that our campaign of maximum pressure is creating the appropriate atmosphere for dialogue with North Korea," White House Press Secretary Sarah Sanders said.

Kim: 'New era'

Xi and his wife, Peng Liyuan, also held a welcome banquet for their visitors. Kim told his hosts that he chose China as his first overseas destination as leader to show "his will to carry forward the tradition of DPRK-China friendship, and how he valued the friendship between the two countries."

"In this spring full of happiness and hopes, I believe my first meeting with General Secretary Xi Jinping will yield abundant fruits of DPRK-China friendship, and facilitate peace and stability on the Korean Peninsula," said Kim.

Xi said Beijing is willing to work with North Korea to "promote long-term healthy and stable development of China-DPRK relations, benefit the two countries and two peoples, and make new contribution to regional peace, stability and development," Xi said.

North Korea's state-run Korean Central News Agency (KCNA) also confirmed the visit, saying Kim was "accorded cordial hospitality with utmost sincerity to him in token of warm comradely friendship and friendly feelings during his China visit."

In a letter published in KCNA, Kim said that his meeting with Xi would help move the "traditionally friendly relations between North Korea and China forward to be more suitable to the demands in the new era."

KCNA also reported that Xi accepted an invitation to visit North Korea "at a convenient time."