BEIJING, March 28, 2018 - North Korean leader Kim Jong Un was given a lavish welcome by Chinese President Xi Jinping during a secretive trip to Beijing as both sides try to repair frayed relations before Pyongyang's landmark summits with Seoul and Washington. US President Donald Trump welcomed the Beijing meeting and said there was now a "good chance" Kim would scrap his nuclear weapons -- but warned that sanctions must stay in force in the meantime. On his first trip abroad since taking power, Kim and his wife were greeted by an honour guard and a banquet hosted by Xi, according to state media, which confirmed the "unofficial" visit yesterday only after Kim had returned by train to North Korea. The two men held talks at the stately Great Hall of the People during which they hailed their nations' historic relations, with Kim pledging he was "committed to denuclearisation" on the Korean peninsula, according to China's Xinhua news agency. Kim also expressed willingness to hold the summits with Trump and South Korean President Moon Jae-in, it said. Trump tweeted that Xi had sent him a message on Tuesday to say his meeting with Kim "went very well and that KIM looks forward to his meeting with me". "In the meantime, and unfortunately, maximum sanctions and pressure must be maintained at all cost!" he tweeted. Trump also said there was now "a good chance that Kim Jong Un will do what is right for his people and for humanity" and denuclearise. "Look forward to our meeting!" he added. Kim told Xi there was "no question that my first foreign visit would be to the Chinese capital", according to North Korea's official KCNA news agency. "This is my solemn duty as someone who should value and continue the DPRK-PRC (North Korea-China) relations through generations." KCNA said Xi accepted an invitation to visit Pyongyang in what would be his first trip to the North Korean capital since he took power in 2012. The two men had not met since Kim took over after the death of his father, Kim Jong Il, in December 2011. Relations have been strained as China has backed a series of tough UN sanctions against Pyongyang over its nuclear and missile tests. But Xi underscored the importance of developing ties, saying it was "a strategic choice and the only right choice" and that he was willing to maintain frequent contact with Kim "under the new circumstances", according to Xinhua. Xi and Kim shook hands and sat across from each other at a long conference table, both flanked by officials, at the Great Hall of the People, according to television images which showed the North Korean leader taking meticulous notes. Later, Xi and his wife, Peng Liyuan, waved goodbye while Kim and his spouse, Ri Sol Ju, smiled as they left in a black car. South Korea said last month after talks with Kim in Pyongyang that he would consider abandoning his nuclear weapons in exchange for US security guarantees, and would halt weapons tests while talks were under way. "The issue of denuclearisation of the Korean Peninsula can be resolved, if South Korea and the United States respond to our efforts with goodwill, create an atmosphere of peace and stability while taking progressive and synchronous measures for the realisation of peace," Kim said, according to Xinhua. Chinese special envoy Yang Jiechi will travel to Seoul today to brief Moon about the Kim-Xi summit, the South's presidential office said. Confirmation of the visit ended 24 hours of speculation about the identity of a mysterious North Korean visitor after Japanese media spotted a green train, similar to the one used by Kim's father, arriving in Beijing on Monday and departing the following day. Despite the news blackout a heavy police presence at key venues, barricades and mysterious motorcades hinted at his presence. North Korea's official Rodong Sinmun newspaper on Wednesday featured photos of Chinese officials greeting Kim and his wife with flowers at the train station.