US President Donald Trump once said there was "love" between him and North Korean leader Kim Jong Un, but Xi Jinping is intruding into the relationship to remind them that China is an indispensable chaperone in their nuclear dance.
With his first trip to Pyongyang as president, Xi took another big step to patching up his tattered relations with Kim, whose nuclear tests prompted Beijing to join UN sanctions against its longtime ally.
Xi's two-day visit, which ended Friday, will also serve the Chinese leader in his complicated relationship with Trump, as they prepare to hold talks on their trade war at the G20 summit in Japan next week.
Months after Trump declared that he and Kim had fallen "in love", their nuclear talks faltered as their second summit in Vietnam in February ended without an agreement.
Trump has also repeatedly called Xi his "friend", but their own negotiations to end the US-China tariffs war broke down last month.
With Trump's relationship with Kim on the rocks, Xi has found an opening.
More From This Section
After the North Korean leader travelled to China four times in the past year, Xi has finally reciprocated, declaring in North Korea's official newspaper that the friendship between their nations was "irreplaceable".
Kim gave Xi a lavish welcome, inviting him to the "Mass Games", an epic music and dance show in a packed stadium that featured the song "I love you China" and a giant portrait of Xi.
"(Xi) wants to use his visit to Pyongyang to demonstrate to President Trump that China's role on the Korean Peninsula is indispensable," said Bonnie Glaser, senior adviser for Asia at the Center for Strategic and International Studies in Washington.
"And if Xi can persuade Kim to resume talks with the US, he hopes that Trump will ease up pressure on trade," Glaser told AFP.
Glaser noted that Trump himself made the link between a trade deal and China helping with North Korea.
But Trump has also seen Xi as a potentially negative influence on Kim, calling him a "world-class poker player" last year, as he noted a change of attitude by the North Korean leader after meeting the Chinese president.
In talks on Thursday, Xi told Kim that he was "willing to strengthen coordination and cooperation" with North Korea and other parties, and play a "positive and constructive role" in achieving denuclearisation of the Korean Peninsula, according to Chinese state media.
Ahn Chan-il, a North Korean defector and researcher in Seoul, said Xi is using North Korea as leverage in his own confrontation with the United States.
"Xi and North Korea... are saying the Beijing-Pyongyang alliance forged in blood will not be affected by Trump, regardless of any economic incentives to effect a change," he said.
China, which fought alongside the North in the Korean War, remains Pyongyang's main diplomatic and economic backer despite tensions over the nuclear issue.
Lu Chao, a North Korean expert at China's Liaoning academy of social sciences, said Beijing "will certainly play a major role in mediating the return of the DPRK and the United States to the negotiating table."