China’s Global Times government newspaper cited experts Sunday who credited “China’s mediation and encouragement” to North Korea for this weekend’s surprise meeting between President Donald Trump and communist dictator Kim Jong-un.

China’s Communist Party chairman Xi Jinping visited Pyongyang in June to give Kim assurances that China would support his rogue state amid the strictest sanctions North Korea has endured since its founding, which China allowed to pass through the U.N. General Assembly despite having veto power. Since the sanctions took hold in 2017, abundant evidence has surfaced that Chinese companies, which act only under the authority of the communist regime, have been helping Kim evade the sanctions and keep his economy afloat.

China is North Korea’s closest ally and largest trading partner.

Zheng Jiyong, an academic friendly to Beijing, told the Global Times that Xi Jinping helped give Trump the “confidence” necessary for the impromptu invite to Kim this weekend. Trump was on a state visit to South Korea following his attendance at the G20 summit in Osaka, Japan, when he invited Kim to meet at Panmunjom, a neutral village in the Korean Demilitarized Zone (DMZ), while he was in South Korea.

“Without China’s encouragement, Trump might not be so confident to propose such a meeting at the DMZ so soon, since he would not have been sure what Kim was thinking,” Zheng reportedly said, adding that the summit “proves that China’s mediation and encouragement are effective, and at least the friendly atmosphere of the region has been rebuilt successfully.”

The Global Times credited Trump’s meeting with Kim – and, relatedly, his crossing into North Korean territory, the first U.S. president in history to visit the country – for having “reduced pessimistic voices on North Korea-US negotiation after the Hanoi summit in February ended without reaching any agreement.”

The Hanoi summit, intended to help the two leaders build upon a promise to cooperate on denuclearization last year in Singapore, was scheduled to last for two days but ended after just one following President Trump’s decision to walk out. Trump told reporters that the North Koreans wanted sanctions relief but did not offer any material steps towards denuclearizing, a claim the North Koreans denied. A Pyongyang diplomat claimed that Kim had offered to shut down the Yongbyon Nuclear Scientific Research Site – where it is believed North Korea enriches its nuclear fuel – in exchange for sanctions relief. Trump has vowed no relief until North Korea’s illegal nuclear program is permanently history.

Since the summit, Kim has publicly accused Trump of acting in “bad faith” by walking out.

Given the vitriol in North Korean media against the United States since the Hanoi summit, Kim’s decision to meet Trump in Panjunmon came as a surprise.

In another column published Sunday, the Global Times effusively praised Trump for meeting with Kim.

“Trump is forthright. He is keen on and good at seeking attention and causing a sensation. Such methods applied to promoting peace and stability can produce great results and make certain breakthroughs,” the column read. “Trump is a master of building interpersonal relationships. It is a miracle that he was able to make a personal connection with Kim in the context of the serious North Korea-US confrontations. It acted to stabilize the situation and de-escalate the crisis.”

The Chinese Foreign Ministry applauded the summit, as well, but did not as effusively praise Trump.

“The friendly meeting between the leaders of the DPRK [North Korea], the US and the ROK deserves applause,” Foreign Ministry spokesman Geng Shuang told reporters on Monday. “This is a constructive meeting with positive outcomes. In particular, it is of important significance for the DPRK and the US to decide to restart their talks at the working level in the near term. China supports this.”

Geng also avoided giving full credit to Xi, but made a note of his involvement in North Korea’s foreign policy.

“President Xi Jinping’s successful visit to the DPRK recently has injected new impetus into the political settlement process of the Peninsula issue,” Geng said. “The interaction between the DPRK, the US and the ROK is in their common interests and meets the widespread aspiration of the international community. Under the current circumstances, we hope relevant parties will seize opportunities, meet each other halfway, explore effective ways to resolve each other’s concerns and promote new progress in the denuclearization and political settlement process of the Korean Peninsula.”

Xi was in Pyongyang, his first time in the capital, two weeks ago to meet with Kim. During that visit, he offered Kim “every possible support,” including responding to “security” concerns. Kim has made clear that he fears his government will be overthrown if he does not have an illegal nuclear weapons program to threaten the world with and his regime becomes increasingly belligerent when outsiders challenge its irredeemable human rights record or call for freedom for the North Korean people, which would require the fall of the Kim dynasty.

Follow Frances Martel on Facebook and Twitter.