North Korea’s leader Kim Jong-un made a second secret trip to China in less than two months to meet his counterpart Xi Jinping. It’s the latest sign that the one-time frayed relationship of the two communist allies is warming dramatically, amid a diplomatic flurry over the North’s nuclear program.

It is unprecedented for a North Korean leader to pay back-to-back visits to China. Photos from the May 7-8 meeting in the Chinese port city of Dalian suggested an air of kindred spirits, and showed the sorts of bonding moments dreamed of by the posters of many online dating profiles. Aside from talks, Kim and Xi attended a formal banquet, enjoyed a luncheon, sipped tea in a garden, and took a stroll on a beach amid the “lush mountains, blue seas and drifting clouds,” state news agency Xinhua said. Their bromance was featured at length on a Chinese state broadcaster, which showed them chatting, laughing, and generally appearing to be in a great mood.

The secret visit was made public by Chinese state media Tuesday (May 8), after the North Korean leader had returned to Pyongyang by plane. In March, Kim held talks with Xi in Beijing in his first known trip abroad since taking power in 2011, that time traveling by train. Their latest meeting follows Kim’s summit with South Korean president Moon Jae-in on April 27, and came just ahead of the visit of US secretary of state Mike Pompeo to North Korea to prepare for a potential summit with US president Donald Trump—and possibly secure the release of American detainees. Pompeo’s visit also came as Trump announced the US would exit the Iran nuclear deal and reinstate sanctions—a backtrack from the previous administration’s policy that North Korea is likely watching closely.

According to Xinhua, Xi said that “positive progress” has been made over the situation of the Korean Peninsula since he and Kim met for the first time. “I feel happy about it,” Xi said, adding that he supports North Korea’s vow to denuclearize and shift focus to economic growth.

Kim restated Pyongyang’s desire to abandon its nuclear program, “as long as relevant parties eliminate the hostile policy and security threats against North Korea,” according to paraphrased remarks reported by Xinhua. North Korean media, for their part, didn’t include such remarks in their reports on Kim’s meeting, the Guardian noted.

The relationship between North Korea and China had been noticeably cold since Kim came to power, as the North’s weapons testing became increasingly frequent over the past few years. That led China to sign on to harsher UN sanctions and impose its own restrictions on trade with its belligerent neighbor under American pressure. But the recent Kim-Xi meetings show China is angling to play a central role (paywall) in dealing with the North’s nuclear program, amid a flurry of bilateral diplomatic activities that involving the US, South Korea, and Japan.

Kim and Xi’s joyful walk on the beach, and the ability of China’s leader to summon Kim over the border twice, is a reminder that China is vital to whatever happens next—a message that is beneficial for both authoritarian leaders. China’s key concerns here are to prevent upheaval on its border, or a situation where it has a Korea with an American military presence as a direct neighbor.

Kim, meanwhile, probably intended for the Dalian meeting to signal that “China remains an ally of North Korea and thus will be there to support him should Trump set the price too high for a deal,” said Steve Tsang, who heads the China Institute at London’s School of Oriental and African Studies.