BEIJING/TOKYO -- North Korean leader Kim Jong Un met with Chinese President Xi Jinping in Beijing earlier this week and discussed the denuclearization of the Korean Peninsula, China's state-owned Xinhua News Agency reported on Wednesday.

"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 was quoted as saying, referring to his father and grandfather, who previously ruled North Korea. He argued that the North's efforts to ease tensions and seek peace talks are bearing fruit.

The North Korean leader reportedly said he is willing to engage in dialogue with the U.S. and hold a summit with President Donald Trump. "The issue of denuclearization of the Korean Peninsula can be resolved if South Korea and the United States respond to our efforts with goodwill, [and] create an atmosphere of peace and stability while taking progressive and synchronous measures for the realization of peace," Kim told Xi, according to Xinhua.

Trump accepted an invitation to meet with Kim by the end of May, while Kim is scheduled to sit down with South Korean President Moon Jae-in at the end of April.

Xi told Kim that China's goals are denuclearizing the peninsula, safeguarding peace and stability, and solving problems through dialogue and consultation.

Kim invited Xi to visit North Korea, and the Chinese leader accepted the offer, according to the Korean Central News Agency. The North's official mouthpiece also quoted Xi as saying that China would play a constructive role in the nuclear standoff between the U.S. and North Korea.

Officials in Washington said China briefed Trump about Kim's visit on Tuesday. "The United States remains in close contact with our allies South Korea and Japan," the White House said in a statement on Wednesday. "We see this development as further evidence that our campaign of maximum pressure is creating the appropriate atmosphere for dialogue with North Korea."

Kim made the trip to Beijing with his wife, Ri Sol Ju, and was greeted by Xi and his wife, Peng Liyuan, according to Xinhua. The visit was an "unofficial" one, lasting from Sunday to Wednesday, the Chinese state media said. The talks took place at China's invitation.

In addition to their discussions at the Great Hall of the People, the two leaders attended a series of events, including a reception, and were joined by Chinese Vice President Wang Qishan and Premier Li Keqiang, among others.

This marks Kim's first trip abroad since he became North Korea's leader in December 2011, following the death of his father, who had made his last visit to China in May 2011. Kim has not met with Chinese leaders publicly in his own country since October 2015, when Liu Yunshan, then a member of the Politburo, visited the North. Kim reportedly said the visit demonstrates Pyongyang's desire to carry on the tradition of bilateral friendship.

A motorcade believed to be carrying North Korean leader Kim Jong Un enters the Beijing Railway Station on March 27. © Kyodo

Roads near the Diaoyutai State Guesthouse in Beijing were blocked off for a motorcade Tuesday morning. The motorcade -- which drove by at high speed, led by about a dozen police motorcycles -- appeared to be roughly the same size as the one in which Trump traveled on his visit to China in November.

Police officers warned onlookers not to take pictures.

Kim left Beijing later on Tuesday aboard a special train.

Bilateral relations deteriorated after North Korea conducted its third nuclear test in February 2013 over Chinese objections. Jang Song Thaek, Kim Jong Un's uncle and a key go-between with China, was executed as a traitor the following December. Relations cooled even further in recent years, with North Korean media openly criticizing Beijing and China backing United Nations sanctions on Pyongyang.

Yet observers say both stand to benefit from stronger ties.

China has used its access to the North to parry American pressure on economic and trade issues. But Kim's scheduled meetings with Moon and Trump could diminish China's role in future negotiations. Beijing may be eager to show the world that it wants to remain involved in resolving the crisis on its doorstep.

North Korea continues to face military and economic pressure from the U.S. even after Trump agreed to meet with Kim. A complete break with China likely would weaken the North's position ahead of the encounter with Trump. On the other hand, if Kim refuses to abandon nuclear weapons, better ties with Beijing would give North Korea more wiggle room under what would likely be tighter U.S. pressure.