BEIJING/DANDONG, China -- China extended an unusually warm welcome to North Korean leader Kim Jong Un on his four-day visit this week, even shutting down key roads in Beijing and a border city to smooth the way.
Beijing, North Korea's long-time ally, is determined not to get sidelined as the regime opens up to talks with Washington.
Kim is set to meet South Korean leader Moon Jae-in at the end of April ahead of a historic meeting with U.S. President Donald Trump scheduled for May, the first direct encounter between sitting leaders of the two countries.
The unexpected visit to China is the North Korean leader's first overseas trip since taking power and the Chinese leadership was at pains to provide a hospitable reception.
Kim was accompanied by a number of his top officials, including Workers' Party Central Committee Vice Chairmen Choe Ryong Hae and Kim Yong Chol as well as Foreign Minister Ri Yong Ho. Ri visited Sweden earlier in March to make preparations for a planned summit with the U.S.
To hold down the fort at home, the leader apparently left sister Kim Yo Jong, military politburo chief Kim Jong Gak, and Kim Yong Nam, president of the North's parliament.
Chinese President Xi Jinping enlisted three top foreign policy officials for the occasion. Vice President Wang Qishan, Politburo member Yang Jiechi and Foreign Minister Wang Yi were all involved in events attended by Kim Jong Un.
Kim reached Beijing on Monday afternoon. Kim and Xi held a meeting at the Great Hall of the People -- but not before posing to be photographed in front of their flags with ex-singer wives Ri Sol Ju and Peng Liyuan. The four later attended a banquet together.
It is exceedingly rare for a North Korean leader to travel abroad with his wife. Kim had also sent his sister to the Winter Olympics opening ceremony in South Korea this February and could be giving trusted family members a bigger diplomatic role.
On Tuesday morning, Kim took his motorcade to Zhongguancun, an area of Beijing often called China's Silicon Valley. He saw cutting-edge aerospace technology at the Chinese Academy of Sciences there before heading over to the Temple of Heaven, a UNESCO world heritage site.
The quartet then had lunch at the Diaoyutai State House. Xi and Peng even walked Kim and his wife to their car as they left, and the North Korean couple waved through their window. Kim's train departed Beijing that afternoon.
Xi had shared just one meal with Moon Jae-in when the South Korean president visited China in December. Although Kim did not receive quite the same welcome as U.S. President Donald Trump, who had dinner with Xi inside the Forbidden City, he was received warmly.
The Chinese public also took notice. Kim and his delegation crossed the border into the Chinese city of Dandong on a special train Sunday night. By the next morning, residents near the tracks had begun posting that the sanpangzi -- an online nickname for Kim that literally means "fat third son" -- had arrived. Trains were delayed across northeastern China that day.
Roadblocks for Kim's trip snarled traffic in Beijing, with the city issuing a warning about its air quality from Monday through Wednesday. Locals complained that the North Korean leader had brought traffic jams and smog.
The border region was also on high alert. "The local government told us it would take all of our rooms" for Tuesday, the day before Kim returned home, a source at a Dandong hotel said. All its rooms, known for sprawling views of North Korea across the Yalu River, were dark that night. Other hotels in the area also said they had no vacancies. Public safety officers were believed to be watching the area from unlit rooms.
Meanwhile, North Korean nationals in Dandong seemed to face significant scrutiny. Two middle-aged men were seen ranting in Korean at a luxury hotel after being denied a stay despite having a reservation. The authorities had apparently ordered hotels not to take any North Korean guests that night.
A thoroughfare 500 meters from the Sino-Korean Friendship Bridge was sealed off with yellow tape around 4:30 a.m. Wednesday. Asked when the road would reopen, a police officer replied: "When it's light out."
Kim's train crossed the bridge into North Korea hours later, blaring its horn while traveling at a leisurely pace. Roadblocks were lifted immediately after it finished crossing the bridge as the area returned to its regular hustle and bustle.
Nikkei staff writer Kenichi Yamada in Seoul contributed to this article.