North Korean leader Kim Jong Un angered historic ally Beijing in the past with his weapons tests, but relations have since improved, showing China remains a key diplomatic player as he cozies up to Donald Trump.
Trump and Kim are due to meet in Hanoi from February 27-28 -- their second face-to-face since a summit in Singapore in June that produced a vaguely worded agreement on denuclearisation.
Here is a look at how China continues to make its presence felt as the summit approaches.
Why did the Cold War allies have a falling out?
China has supported the Kim dynasty since the Korean War, but Pyongyang's nuclear programme has threatened Beijing's desire for stability in the region and strained the relationship between the Cold War allies.
Ties dropped to a low point in 2017 following a series of nuclear and ballistic missile tests, with China backing a raft of UN sanctions, including bans on North Korean exports of coal, iron and seafood.
"Previously China saw North Korea as a useful buffer against the US," said Zhao Tong, a nuclear policy expert at the Carnegie-Tsinghua Center for Global Policy in Beijing.
But Pyongyang's weapons testing has created headaches for Beijing, "and China felt North Korea was increasingly becoming a liability rather than an asset," he added.
Why have relations improved?
A turning point came when Kim travelled to Beijing to meet with President Xi Jinping last year -- the young leader's first foreign trip since he came to power.
Since then, the leaders have met three more times in China, though Xi has yet to act on invitations to visit North Korea.
A closer relationship with Beijing gives Pyongyang leverage over the US, analysts say. As North Korea's main trading partner and sole major ally, China's economic support and diplomatic backing are also crucial to Pyongyang in case talks with the US fall through.
"Kim may be working to play China and the United States off of each other -- in making frequent visits to Beijing, Kim is signalling to the Trump administration that he has other options," said Emily Weinstein, a research analyst at Pointe Bello.
But the improved ties should not be exaggerated, said Bonnie Glaser, a senior adviser at the Center for Strategic and International Studies.
"I believe that Kim recognises that he must show some deference to China, but he seeks to reduce his country's dependence on China and diversify its options," she said.
Is China worried about Trump and Kim's bromance?
Despite the frequent meetings, there appears to be little love lost between the Asian leaders.
Former US ambassador to China Max Baucus told the BBC in 2017 that Xi "does not like that man (Kim) at all", and analysts say their relationship is strategic rather than one based on trust.
In contrast, Kim and Trump have shifted from trading vicious personal attacks to a budding bromance, with the US president saying they "fell in love" upon exchanging a series of letters following their meeting in Singapore.
Personal chemistry aside, the prospect of closer ties between Washington and Pyongyang is worrying for Beijing, which wants to keep Pyongyang out of America's sphere of influence but also wants denuclearisation, analysts say.
"Beijing fears a fundamental shift that would result in the US having a better relationship with North Korea than China has," said Glaser, adding that this is an unlikely outcome in the near term.
"A Trump-Kim deal in which the US and North Korea keep talking and there is incremental progress toward the goal of denuclearisation is beneficial for China."
How has China kept its influence over North Korea?
China's influence is palpable as the summit approaches, with Kim making another trip to Beijing last month -- seen by analysts as a meeting to coordinate strategy with Xi.
Kim could meet with Xi again before the summit, as his train reportedly crossed into China late Saturday.
Though his presence on board the train was not confirmed, a long train ride across his giant neighbour to reach Vietnam is another symbol of China's unavoidable role in the diplomatic shuffle.
Beijing lent Kim a plane to travel to Singapore in June.
China called for easing sanctions on Pyongyang in September, undercutting US attempts to exert international pressure on Pyongyang to give up its weapons program.
"China has resumed some of the economic and trading relationship with North Korea and that has been very helpful for North Korea to survive under the very harsh international maximum pressure campaign led by the United States," said Zhao.