North Korea lauded its ties with historic ally China on Friday as Xi Jinping wrapped up a highly symbolic two-day visit to his nuclear-armed neighbour, with both countries facing deadlock in their negotiations with US President Donald Trump.
Kim Jong Un told the Chinese president that his visit was an opportunity to demonstrate "the immutability and invincibility of the DPRK-China friendship before the world", the KCNA news agency reported, using the abbreviation of North Korea's official name.
At a time when "serious and complicated changes are happening in international and regional situations", KCNA said, the two leaders agreed to "promote close strategic communication" and develop their "common interests".
Pyongyang pulled out all the stops to welcome Xi, the first Chinese president to visit in 14 years -- a period in which Pyongyang has carried out five nuclear tests and launched missiles capable of reaching the entire US mainland.
China always prefers stability in its neighbourhood and the North's nuclear provocations strained the relationship between the Cold War allies, with Beijing backing UN sanctions on Pyongyang and Kim not visiting to pay his respects for more than six years after inheriting power.
But as he embarked on a flurry of diplomacy last year, Kim ensured that Xi -- whose country is the North's key diplomatic supporter and main provider of trade and aid -- was the first head of state he met.
Kim travelled to China three more times to meet Xi, and Pyongyang has been increasingly keen for the Chinese president to reciprocate.
Analysts say Xi, who flew back to China on Friday, intended to use the trip as a way of signalling to Trump his influence with Kim, a week before the G20 summit in Japan.
The world's top two economies are embroiled in protracted trade war and their leaders are expected to meet in Osaka.
Similarly, nuclear negotiations between the North and the US are also deadlocked, after the second summit between Kim and Trump broke up in Hanoi in February with the two unable to reach a deal on sanctions relief and what the North might give up in return.
But North Korean media did not carry comments by Kim reported by Chinese state broadcaster CCTV, which quoted him as saying that he was "willing to be patient" in the talks with the US, but wanted "the parties concerned" to meet him halfway.
Xi told him that China "positively evaluated" the North's efforts, CCTV said.
Jeung Young-tae, director of the Institute of North Korean Studies in Seoul, said the summit amounted to China giving Kim strong backing in the process.
"Xi is saying that he will help Kim resist pressure from the US and calling on Kim to stick to his demands," he told AFP.
Pyongyang has repeatedly called for Washington to adopt "a new method of calculation" for the negotiations, and Hong Min, a senior researcher at the South's state-run Korea Institute for National Unification said Xi's support gave Kim a "political and diplomatic opening to resume talks with the US again".
North Korean authorities deployed tens of thousands of citizens to line the streets to welcome Xi, with KCNA saying they expressed their "friendly affection" for Chinese citizens who have "shared joys and sorrows" with them in the pursuit of socialism.
Kim and Xi rode together through the streets of Pyongyang in an open-topped limousine, and on Thursday evening Xi and his entourage were treated to a special performance of the North's Mass Games.
It featured several scenes of Chinese-Korean history, including their soldiers fighting together in the Korean War, while the ever-changing backdrop -- made up of thousands of children turning the pages of coloured books -- displayed slogans of friendship and thanks, and portraits of both Xi and Kim.
Songs in the show included "I love thee, China", and the Rodong Sinmun newspaper, the mouthpiece of the North's ruling party, carried front-page pictures of Kim and his wife Ri Sol Ju welcoming Xi.
Beijing sent millions of troops known as "Chinese People's Volunteers" to save the North from defeat during the Korean War, and Mao Zedong described their relations as "close as lips and teeth".
Nowadays Beijing sees the North as a strategic buffer, preventing the possibility of US troops on its borders -- 28,500 are stationed in the South.
Before leaving on Friday, Xi paid tribute to the Chinese dead in the conflict at the Friendship Tower monument in Pyongyang, which hundreds of workers and soldiers renovated ahead of his trip.
"To remember the martyrs," he wrote in the visitors' book, Xinhua news agency reported. "The China-DPRK friendship lasts from generation to generation."
North Korean leader Kim Jong Un (R) shaking hands with Chinese President Xi Jinping upon his arrival at Pyongyang international airport in Pyongyang. June 20, 2019.