In hosting North Korea’s leader Kim Jong-un on a surprise visit to Beijing, China’s President Xi Jinping has made clear to the United States that his country will be an integral part of the as-yet-to-be-scheduled and unprecedented negotiations between Mr Kim and President Donald Trump.

The meeting put a new coat of paint on the relationship between the two countries, which was believed to have soured somewhat as China backed UN sanctions against Pyongyang’s nuclear and missile programmes. The secret journey by Mr Kim, believed to be his first international trip since taking power in 2011, has allowed Mr Xi to ensure China’s interests are represented whether they are physically present for the negotiations or not.

“Xi Jinping wants to make sure he is fully informed of North Korea’s intentions, and ensure North Korea keeps China’s interests in mind as it prepares to talk with South Korea and the US,” Patricia Kim, the Stanton nuclear security fellow with the Council on Foreign Relations, told The Independent.

“China has been largely on the sidelines of the flurry of diplomatic outreaches between the US, North Korea and South Korea in the post-Olympic period, and inviting Kim to make his first foreign trip to Beijing was Xi’s way of reinserting China into the arena,” she continued.

The two-day visit also served Mr Kim’s interests, of course, reminding officials in Seoul and Washington that Mr Kim has some bargaining power.

“The United States is going to have to read it as a sign that they can’t kick North Korea around, that North Korea still has influence in Beijing,” Adam Mount, a senior fellow and director of the Defence Posture Project at the Federation of American Scientists, told The Independent.

North Korea Military Parade Show all 6 1 /6 North Korea Military Parade North Korea Military Parade In this image made from video released by KRT on Feb. 8, 2018, a military parade is held at Kim Il Sung Square in Pyongyang, Thursday, Feb. 8 2018, just one day before South Korea holds the opening ceremony for the Pyeongchang Winter Olympics. (KRT via AP Photo) AP North Korea Military Parade This screen grab taken from North Korea's KCTV on February 8, 2018 shows members of North Korea's military taking part in a parade, with missiles being displayed, in Kim Il Sung Square in Pyongyang. North Korea staged a military parade in Pyongyang on February 8 to mark the 70th anniversary of its armed forces, in a show of strength just a day before the Pyeongchang 2018 Winter Olympic Games open in the South. / AFP PHOTO / KCTV / KCTV / -----EDITORS NOTE --- RESTRICTED TO EDITORIAL USE - MANDATORY CREDIT "AFP PHOTO / KCTV" - NO MARKETING - NO ADVERTISING CAMPAIGNS - DISTRIBUTED AS A SERVICE TO CLIENTS - NO ARCHIVESKCTV/AFP/Getty Images AFP/Getty Images North Korea Military Parade In this image made from video released by KRT, North Korean soldiers march during a military parade in Pyongyang, Thursday, Feb. 8 2018. North Korea held a military parade and rally on Kim Il Sung Square on Thursday, just one day before South Korea holds the opening ceremony for the Pyeongchang Winter Olympics. (KRT via AP Photo) AP North Korea Military Parade In this image made from video released by KRT on Feb. 8, 2018, North Korean leader Kim Jong Un, right, inspects honor guards, along with his wife Ri Sol Ju, center, during a military parade in Pyongyang, Thursday, Feb. 8 2018. North Korea held a military parade and rally on Kim Il Sung Square on Thursday, just one day before South Korea holds the opening ceremony for the Pyeongchang Winter Olympics. (KRT via AP Photo) AP North Korea Military Parade In this image made from video released by KRT on Feb. 8, 2018, North Korean leader Kim Jong Un, center, watches the military parade in Pyongyang, Thursday, Feb. 8 2018. North Korea held a military parade and rally on Kim Il Sung Square on Thursday, just one day before South Korea holds the opening ceremony for the Pyeongchang Winter Olympics. (KRT via AP Photo) AP North Korea Military Parade This screen grab taken from North Korea's KCTV on February 8, 2018 shows North Korean leader Kim Jong Un speaking during a military parade in Kim Il Sung Square in Pyongyang. North Korea staged a military parade in Pyongyang on February 8 to mark the 70th anniversary of its armed forces, in a show of strength just a day before the Pyeongchang 2018 Winter Olympic Games open in the South. / AFP PHOTO / KCTV / KCTV / -----EDITORS NOTE --- RESTRICTED TO EDITORIAL USE - MANDATORY CREDIT "AFP PHOTO / KCTV" - NO MARKETING - NO ADVERTISING CAMPAIGNS - DISTRIBUTED AS A SERVICE TO CLIENTS - NO ARCHIVESKCTV/AFP/Getty Images AFP/Getty Images

The White House has called Mr Kim’s China visit – especially the fact that the North Korean leader travelled outside of his country for potentially the first time since taking power – a “positive sign” for the upcoming talks between the US and North Korea, and proof that the American diplomatic offensive is working.

President Donald Trump has helped orchestrate a strong international response to North Korea’s repeated nuclear missile tests, including sanctions approved by the United Nations and honoured by China, and that is paying off, White House press secretary Sarah Huckabee Sanders said on Wednesday.

“We’re going to be cautiously optimistic,” Ms Sanders told reporters.

Following news of the trip, Mr Trump tweeted that he is looking forward to meeting Mr Kim.

“For years and through many administrations, everyone said that peace and he denuclearisation of the Korean peninsula was not even a small possibility,” Mr Trump wrote. “Now there is a good chance that Kim Jong Un will do what is right for his people and for humanity. Look forward to our meeting!”

South Korea has cautioned they were not involved in the efforts to bring Mr Kim to Beijing, and that it added a new layer of complexity to the situation. Perhaps with that in mind, state media has labelled the visit by Mr Kim as “unofficial”.

“What is happening now is beyond what the [government] was predicting, and [Seoul] will need to keep an eye on the situation with all possibilities in mind,” senior presidential press secretary Yoon Young-chan told reporters.