A special train believed to be carrying Kim Jong-un departed Beijing after a two-day visit by the North Korean leader to the Chinese capital.

Mr Kim could not be seen, but he was presumed to be on board the long train as it crossed on elevated tracks over a busy Beijing street and headed towards eastern China and the border with North Korea.

The North Korea leader's trip to China — his fourth in the past 10 months — is believed to be an effort to coordinate with his only major ally ahead of a possible second summit with President Donald Trump. It comes after US and North Korean officials are thought to have met in Vietnam to discuss the site of the summit.

Details of his visit have not been released, but Mr Kim reportedly met with Chinese President Xi Jinping.

Earlier, Mr Kim's motorcade headed out to an unannounced destination and returned about an hour later.

South Korea's Yonhap News Agency said Mr Kim visited a technology development zone and spent around 20-30 minutes touring a factory run by famed traditional Chinese medicine maker Tong Ren Tang.

North Korean and Chinese state media announced his visit shortly in advance of his arrival in Beijing, in a break with standard protocol dictating such trips are only confirmed after they happen. However, neither side has provided details of what he has done since arriving aboard his personal armoured train earlier this week.

Mr Kim met with Mr Xi for about an hour Yonhap reported. He later attended a dinner at the Great Hall of the People in central Beijing hosted by Mr Xi and his wife, Peng Liyuan. Mr Kim was accompanied by his wife, Ri Sol Ju, the news agency said.

At a daily Foreign Ministry briefing, spokesperson Lu Kang said details of Mr Kim's visit would be released "in due course."

He said Beijing remains supportive of efforts to end tensions over US demands for a halt to North Korea's nuclear and missile programmes.

North Korea's pervasive leaders: the Kim portraits Show all 16 1 /16 North Korea's pervasive leaders: the Kim portraits North Korea's pervasive leaders: the Kim portraits In the Democratic People's Republic of North Korea, portraits of former supreme leaders Kim Il Sung and Kim Jong Il are required by law to be hung in the home, the classroom, the factory and all manner of other private and public places Reuters North Korea's pervasive leaders: the Kim portraits In the classroom AFP/Getty North Korea's pervasive leaders: the Kim portraits In the living room AFP/Getty North Korea's pervasive leaders: the Kim portraits In the maternity ward of the hospital Alamy North Korea's pervasive leaders: the Kim portraits On board the ship Reuters North Korea's pervasive leaders: the Kim portraits At the ballot box Mannen av börd North Korea's pervasive leaders: the Kim portraits In the office AFP/Getty North Korea's pervasive leaders: the Kim portraits On the bridegroom Reuters North Korea's pervasive leaders: the Kim portraits On the Pyongyang subway Reuters North Korea's pervasive leaders: the Kim portraits On a government building Reuters North Korea's pervasive leaders: the Kim portraits In the teacher training facility AFP/Getty North Korea's pervasive leaders: the Kim portraits In Kim Il Sung square in Pyongyang Reuters North Korea's pervasive leaders: the Kim portraits In the home AFP/Getty North Korea's pervasive leaders: the Kim portraits At the military parade Reuters North Korea's pervasive leaders: the Kim portraits In the hall Reuters North Korea's pervasive leaders: the Kim portraits At the Chinese border AFP/Getty

"We always believe that, as key parties to the Korean Peninsula issue, it's important for the two sides to maintain contact and we always support their dialogue to achieve positive outcomes," Mr Lu said.

Tuesday was Mr Kim's birthday. His visit is also seen as part of an effort to win Chinese support for a reduction of United Nations sanctions imposed over his nuclear weapons and ballistic missile programmes, which have severely impacted his country's already-ailing economy.

While North Korea has not conducted any launches or detonations in more than a year, it has displayed no real intention of abandoning the programmes that are seen as guaranteeing the hard-line communist regime's survival.

Mr Kim's visit also came after he expressed frustration in his annual New Year's address over the lack of progress in negotiations with Washington since the Singapore summit with Mr Trump in June, saying that if things do not improve — meaning that if sanctions relief and security guarantees are not in the offing — Pyongyang might have to find "a new way" forward.

While Mr Trump says he considers Mr Xi key to enticing Mr Kim into taking concrete steps towards denuclearisation, the US president's own relationship with his Chinese counterpart has frayed over the trade war between the two countries.

Officially, at least, China says it considers the tariff battle and North Korea's weapons programmes to be entirely separate.