SHANGHAI/SEOUL - North Korean leader Kim Jong Un visited China from Sunday to Wednesday on an unofficial visit, China's state news agency Xinhua reported on Wednesday.
The visit was Kim's first known journey abroad since he assumed power in 2011 and is believed by analysts to serve as preparation for upcoming summits with South Korea and the United States.
Beijing has traditionally been the closest ally of secretive and isolated North Korea, but ties have been frayed by North Korea's pursuit of nuclear weapons and China's backing of tough UN sanctions in response.
Xinhua published a photograph of Kim and Xi shaking hands in front of the flags of the two nations.
Speculation about a possible visit by Kim to Beijing was rife earlier this week after a train similar to the one used by Kim's father was seen in the Chinese capital, along with heavy security and a large motorcade.
South Korea's Yonhap news agency reported that Kim visited China from Sunday to Wednesday with his wife, Ri Sol Ju. It cited North Korea without elaborating.
Xi had accepted an invitation from Kim to visit North Korea, Yonhap said.