China said on Wednesday that North Korean leader Kim Jong-un committed to denuclearisation on the peninsula during a meeting with President Xi Jinping, official news agency Xinhua reported. After days of speculation, China announced that Kim had visited Beijing to meet Xi during an “unofficial visit” from Sunday to Wednesday.

“It is our consistent stand to be committed to denuclearisation on the peninsula, in accordance with the will of late President Kim Il Sung and late General Secretary Kim Jong Il,” Kim said. Kim was accompanied by his wife Ri Sol Ju. This is his first known overseas trip since taking power in 2011. It is believed to be preparation for the summit between North and South Korea at the end of April. United States President Donald Trump has also accepted an invitation from Kim to meet him.

The relationship between North Korea and its key ally China has soured in recent years with Beijing showing its willingness to enforce United Nations sanctions imposed on Pyongyang over its missiles programmes.

Kim reportedly told Xi that the situation in the Korean peninsula is improving as North Korea has “taken the initiative to ease tensions and put forward proposals for peace talks”. He added, “The issue of denuclearisation 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 realisation of peace.”

Kim said the North Korean and Chinese people have “sacrificed lives and shed blood in their common struggles for decades, have experienced that their lives are inseparable, and realise how important regional peace and stability is for these two neighbours separated only by a river”, AFP reported, citing the North’s official news agency KCNA. He also reportedly promised to strengthen the relationship between the two countries.

Xi, in turn, promised that China would uphold its relationship with the isolated country. He told Kim that the friendship between the two countries should be passed on to future generations and developed better.

“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-North Korea ties,” Xi was quoted as saying by Xinhua. “This should not and will not change because of any single event at a particular time.”

Speculation about Kim’s China visit arose when Japan’s Kyodo News reported on Monday that a special train, which may have carried a high-ranking North Korean official, passed through the Chinese border city of Dandong. A car bearing the licence plate of the North Korean embassy was spotted at the Great Hall of the People, a Chinese government building used for official purposes, on Monday.

Moreover, severe traffic regulations had been imposed in Beijing, and restaurants around the Sino-Korean Friendship Bridge linking Dandong with the Sinuiju town in North Korea had suspended reservations for rooms facing the North Korean side, Kyodo News said.