BEIJING (BLOOMBERG) - For much of the past year, China has repeatedly - sometimes with exasperation - called on the United States and North Korea to sit down and chat. Now the goal is to ensure they keep talking.
President Xi Jinping backed US President Donald Trump's surprise decision to meet with North Korean leader Kim Jong Un, saying a diplomatic solution is the best way to resolve the situation.
Mr Trump praised Mr Xi over the weekend, saying he has "helped us a lot" on North Korea. On Monday (March 12), Mr Xi is set to meet with a South Korean envoy who brokered the talks.
The detente eases one persistent headache for Mr Xi as he prepares for a potential trade war with the US and consolidates power in China, which formally scrapped presidential term limits on Sunday.
Yet, the high-stakes summit also creates more risk for China if the talks fail, particularly as Mr Trump has warned of military force to stop Mr Kim from threatening the US with a nuclear weapon.
"If the US finds that the negotiations are useless and North Korea hasn't taken any actual denuclearisation, then the US may adopt even more stringent sanctions or other extreme measures," said Mr Yang Xiyu, former director of the Chinese foreign ministry's Office on Korean Peninsula Issues.
"At that time, China and the US may face even greater conflict."
China has claimed credit for the shift towards dialogue, saying that both the US and North Korea had effectively adhered to its call to suspend provocations to reduce tensions.
As North Korea's biggest trading partner, China's support for increasingly tough sanctions over the past year has put pressure on Mr Kim's regime even while it stopped short of completely cutting off oil.
Still, there were concerns in Beijing that China would be would lose out in any negotiation between Mr Trump and Mr Kim.
Relations with North Korea have been frosty under Mr Xi, who has yet to meet with Mr Kim, and South Korea has played a key role in orchestrating talks.
The official People's Daily newspaper moved to dispel notions that China would be sidelined, saying over the weekend that there is no need to worry as "it will be impossible for anyone to solve the issue without China".
Beijing has sought to balance its desire for North Korea to get rid of its nuclear weapons with other goals, including avoiding war and chaos that could upend China's economy and social stability.
Some analysts speculate that China also does not want to see the two Koreas unite out of fear of having a US aligned country directly on its border, the International Crisis Group said in January.
"China will want to get involved and be able to somehow influence and shape the negotiations as they proceed," said Mr Paul Haenle, a former China director on the US National Security Council who served as a representative to the six-party talks and now heads the Carnegie-Tsinghua Centre in Beijing.
"Clearly what the Chinese want is a much more stable situation," Mr Haenle told Bloomberg TV.
"In the short term, they will get that if the talks continue and the missiles are not being tested and nuclear devices by the North are not tested and the American president is not using bellicose rhetoric and firing off provocative tweets."
Foreign Minister Wang Yi struck a cautious tone last week when discussing recent events with North Korea, including a planned summit between Kim and South Korean President Moon Jae In in April.
"Despite light at the end of the tunnel, the journey ahead won't be smooth," Mr Wang told reporters in his annual press conference.
"Now is a crucial moment for testing the sincerity of the parties. Every effort must be made for peace, and the opportunity must be seized."
The shift towards dialogue also allows Mr Xi to focus more on deleveraging the economy, reforming state enterprises and ensuring the Communist Party delivers on promises.
Eased tensions between the US and North Korea "relieves pressure on China as it can better promote domestic political and economic reforms", said Dr Ruan Zongze, a former top diplomat in Washington and vice-president of the China Institute of International Studies in Beijing. "China has very important domestic development tasks and does not want to be disturbed by other things."