In this photo released Wednesday, March 28, 2018 by China's Xinhua News Agency, Chinese President Xi Jinping, second from right, and his wife Peng Liyuan, right, and North Korean leader Kim Jong Un, second from left, and his wife Ri Sol Ju, left, pose for a photo at the Great Hall of the People in Beijing. The Chinese government confirmed Wednesday that North Korea's reclusive leader Kim went to Beijing and met with Chinese President Xi in his first known trip to a foreign country since he took power in 2011. (Ju Peng/Xinhua via AP)

In this photo released Wednesday, March 28, 2018 by China's Xinhua News Agency, Chinese President Xi Jinping, second from right, and his wife Peng Liyuan, right, and North Korean leader Kim Jong Un, second from left, and his wife Ri Sol Ju, left, pose for a photo at the Great Hall of the People in Beijing. The Chinese government confirmed Wednesday that North Korea's reclusive leader Kim went to Beijing and met with Chinese President Xi in his first known trip to a foreign country since he took power in 2011. (Ju Peng/Xinhua via AP)

BEIJING (AP) — North Korea’s leader Kim Jong Un and his Chinese counterpart Xi Jinping sought to portray strong ties between the long-time allies despite a recent chill as both countries on Wednesday confirmed Kim’s secret trip to Beijing this week.

The visit highlights Beijing and Pyongyang’s efforts to better position themselves by showing they support each other ahead of Kim’s planned meetings with South Korean President Moon Jae-in and President Donald Trump in the coming weeks.

ADVERTISEMENT

Kim made the unofficial visit to China from Sunday to Wednesday at Xi’s invitation, China’s official Xinhua News Agency said, in what was in his first trip to a foreign country since he took power in 2011.

Xi held talks with Kim at the Great Hall of the People in Beijing and he and his wife Peng Liyuan hosted a banquet for Kim and his wife Ri Sol Ju, Xinhua said. They also watched an art performance together, the news agency said.

Official reports from both countries depicted in effusive terms warm ties between the two leaders in an effort to downplay recent tensions in relations over Kim’s development of nuclear weapons and long-range missiles.

North Korean leader Kim Jong Un made the unofficial visit to China from Sunday to Wednesday at Xi's invitation in what was in his first trip to a foreign country since he took power in 2011.

In these reports, “Kim reaffirms the traditional friendship between the two countries as if nothing had ever happened, when the relationship had plummeted to unprecedented lows,” said Bonnie Glaser, an Asia expert at the Center for Strategic and International Studies.

Ties in recent months have frayed as China supported tougher U.N. sanctions on North Korea and suspended imports of coal, iron ore, seafood and textiles. Pyongyang last year seemingly sought to humiliate Beijing by timing some of its missile tests for major global summits in China, while its state media accused Chinese state-controlled media of “going under the armpit of the U.S.” by criticizing the North.

Xi hailed Kim’s visit as embodying the importance with which the North Korean leader regarded ties with China.

“We speak highly of this visit,” Xi told Kim, according to Xinhua.

For China, the visit also reminds other countries that Beijing remains one of North Korea’s most important allies and is a player not to be sidelined in denuclearization talks. It also projects to the Chinese public that Xi is firmly in charge of steering Beijing’s relations with North Korea in a way that favors China’s interests.

“Here is Xi Jinping saying, ‘Don’t worry, everything is going to be great’,” Glaser said.

ADVERTISEMENT

Analysts say Kim would have felt a need to consult with his country’s traditional ally ahead of summits with Moon and Trump. China would also not want Kim’s first foreign meeting to be with someone other than Xi.

“China was getting concerned it could be left out of any initial political agreements that Moon and Kim or Trump and Kim could come to,” said Michael Kovrig, senior advisor for northeast Asia at the International Crisis Group.

“This is China asserting its regional hegemony and influence, saying: ‘Hey, you talk to me first.’”

Kim was described by Xinhua as saying that his country wants to transform ties with South Korea into “a relationship of reconciliation and cooperation.” The two Koreas are still technically at war because their 1950-53 war ended in an armistice, not a peace treaty.

Kim also said that North Korea is willing to hold a summit with the United States, according to Xinhua.

North Korea’s official Korean Central News Agency published Kim’s personal letter to Xi dated on Wednesday, where he expressed gratitude to the Chinese leadership for showing what he described as “heartwarming hospitality” during his “productive” visit.

Kim said that the first meeting between the leaders of the two countries will provide a “groundbreaking milestone” in developing mutual relations to “meet the demands of the new era.” Kim also said that he’s satisfied that the leaders confirmed their “unified opinions” on mutual issues.

“For the North Koreans, it is in their best interests to enter any meetings with Moon or Trump having shored up and repaired to a certain extent their relations with Beijing,” said Paul Haenle, director of the Carnegie-Tsinghua Center for Global Policy in Beijing.

KCNA said Kim also called for more meetings with Xi and other Chinese officials to deepen the ties between the countries and also asked Xi to visit North Korea at a time convenient for him, to which Xi “gladly accepted.”

The North’s diplomatic outreach this year follows a tenser 2017 when it conducted its most powerful nuclear test to date and tested three intercontinental ballistic missiles designed to target the U.S. mainland.

The developments are being interpreted as the North being desperate to break out of isolation and improve its economy after being squeezed by heavy sanctions.

“At least one of the things that Kim would want out of these meetings is a way forward to begin to ease those sanctions and support from China in that effort,” Glaser said.

China remains North Korea’s only major ally and chief provider of energy, aid and trade that keep the country’s broken economy afloat.

In a speech at a banquet in China, Kim described the traditional allies as inseparable “neighboring brothers” with a relationship molded by a “sacred mutual fight” to achieve socialist ideals, according to KCNA.

In addition to the trip being his first abroad as leader, his talk with Xi was his first meeting with a foreign head of state. Kim’s father, late North Korean leader Kim Jong Il, had visited China several times during his rule, lastly in May 2011, months before his death that December.

“It’s most proper that my first overseas trip would be the capital of the People’s Republic of China,” said Kim Jong Un, according to the North Korean agency. “It’s also one of my noble duties to value the North Korea-China friendship as I do my own life.”

___

Kim reported from Seoul, South Korea. Associated Press writer Foster Klug in Seoul contributed to this report.