By Andy Sharp, Bloomberg News–

Kim Jong Un is willing to talk with U.S. President Donald Trump about giving up his nuclear weapons, China said, after the North Korean leader made a surprise visit to Beijing to patch up ties with his neighbor.

Kim expressed an openness to U.S. talks during meetings with Chinese President Xi Jinping, the official Xinhua News Agency said Wednesday, in what was his first foreign trip since taking power in 2011. North Korean state media reports also confirmed Kim’s visit — and his return to Pyongyang — without mentioning denuclearization or the potential Trump summit.

“North Korea sees an opportunity with these summits to message to the world that it’s not isolated and that it has diplomatic options,” Mintaro Oba, a former U.S. State Department official who worked on North Korean issues, said by email. “The Kim-Xi summit is the latest step in that game.”

Kim’s clandestine visit — Chinese officials refused for two days to confirm reports of his motorcade and train movements — shakes up the diplomatic landscape ahead of a potential meeting by the end of May with Trump. Chinese media reports included Kim’s first public remarks indicating he’d discuss his nuclear arsenal with Trump, who has upended decades of U.S. policy by agreeing to meet the North Korean leader without a clear disarmament plan.

“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.

Bloomberg News first reported Kim’s arrival in the Chinese capital Monday.

Kim also shored up his alliance with China, which has been strained since he came to power and executed his uncle, who was a key communications channel with Beijing. His missile and nuclear tests have exasperated China, which supported Trump’s “maximum pressure” campaign against Kim’s weapons program.

While China remains a key ally of Pyongyang and an economic lifeline for the isolated regime, their leaders hadn’t met since Kim’s ailing father visited in 2011.

Japanese Prime Minister Shinzo Abe, who’s expected to see Trump in the U.S. next month, told parliament in Tokyo Wednesday that it was important to maintain sanctions on the regime while pursuing substantive talks.

In this photo provided Wednesday, March 28, 2018, by China's Xinhua News Agency, North Korean leader Kim Jong Un, left, and Chinese President Xi Jinping shake hands in Beijing, China. The Chinese government confirmed Wednesday that North Korea's reclusive leader Kim went to Beijing and met with Chinese President Xi in his first known trip to a foreign country since he took power in 2011. The official Xinhua News Agency said Kim made an unofficial visit to China from Sunday to Wednesday.(Ju Peng/Xinhua via AP)© The Associated Press In this photo provided Wednesday, March 28, 2018, by China’s Xinhua News Agency, North Korean leader Kim Jong Un, left, and Chinese President Xi Jinping shake hands in Beijing, China. The Chinese government confirmed…

White House Press Secretary Sarah Huckabee Sanders said that Chinese officials had briefed the U.S. about Kim’s visit. “We see this development as further evidence that our campaign of maximum pressure is creating the appropriate atmosphere for dialogue with North Korea,” Sanders said in a statement.

The confirmation of Kim’s talks in Beijing helped reduce demand for haven assets, weakening the yen. The news had little impact on Asian equity markets, which fell after a selloff in technology shares spooked investors.

What does Kim Jong Un’s China visit mean for the summit with Trump? Bloomberg’s Stephen Engle reports.

Trump’s summit decision risked sidelining China from the discussion, and may have acted as an impetus for Xi to meet with Kim.

Xi pledged support for “Comrade Chairman” Kim and North Korea’s “peaceful development.” He described the relationship between their predecessors as “the precious wealth of both sides” that must be sustained.

North Korea Defies the World With Nuclear Ambitions: QuickTake

“This is a strategic choice and the only right choice both sides have made based on history and reality, the international and regional structure and the general situation of China-DPRK ties,” Xi said, referring to North Korea’s formal name. “This should not and will not change because of any single event at a particular time.”

Kim invited Xi to visit North Korea “at a convenient time” and the invitation was accepted “with pleasure,” the official Korean Central News Agency said.

A man watches a television news report about a suspected visit to China by North Korean leader Kim Jong Un, at a railway station in Seoul on March 27, 2018.© JUNG YEON-JE/AFP/Getty Images A man watches a television news report about a suspected visit to China by North Korean leader Kim Jong Un, at a railway station in Seoul on March 27, 2018.

The Beijing meeting comes amid a diplomatic flurry in Asia that has seen officials shuttling around various countries: Besides the potential summit with Trump, Kim’s due to have talks with South Korean President Moon Jae-in in April. Abe has indicated that he would like to have a summit.

Moon’s spokesman Yoon Young-chan said Kim’s meeting with Xi bodes well for the South Korean and U.S. summits. South Korea would know more after Chinese envoy Yang Jiechi visits on Thursday, Yoon added.

Xi’s move to preempt Trump by seeing Kim comes at a time of strain in China-U.S. ties. Xi has found himself preparing for a trade war with Trump, even after supporting United Nations sanctions to crimp the flow of energy and cash to Kim.

Trump has also indicated a greater willingness to challenge Chinese territorial claims in the South China Sea and upgrade ties with Taiwan, a democratically-ruled island that Beijing considers a province.

While China opposes North Korea’s nuclear weapons, it also doesn’t want to see Kim’s regime collapse or war break out on the Korean Peninsula. Any instability could lead to a refugee crisis or potentially U.S. troops on its border.

Dennis Wilder, a senior director for Asia at the National Security Council during the George W. Bush administration, said that China wanted to firm up its role in any negotiations.

“They’ve been kept out of this early period of this process,” Wilder said. “It was more a reminder to Kim, and a reminder to Washington, that you’d better keep us in the loop.”

–With assistance from Shinhye Kang Isabel Reynolds Kanga Kong Alex Wayne Peter Martin and Min Jeong Lee

To contact the reporter on this story: Andy Sharp in Tokyo at asharp5@bloomberg.net.

To contact the editors responsible for this story: Brendan Scott at bscott66@bloomberg.net, Ruth Pollard