North Korea's young leader, Kim Jong Un, has made an unannounced visit to China at the invitation of Chinese President Xi Jinping, state media confirmed Wednesday, apparently saying for the first time just weeks before a possible meeting with U.S. President Donald Trump that he is "willing" to sit down with the American leader.

The trip — Kim's first outside the country since becoming North Korean leader in 2011 — was also his first meeting with another head of state, and added yet another element to a steady stream of diplomatic moves over Pyongyang's nuclear weapons and missile programs.

The "unofficial" visit, which began Sunday and ran through Wednesday, according to China's official Xinhua News Agency, was shrouded in secrecy with elements straight out of a novel, including a bulletproof train, an arrival in Beijing under cover of darkness and a large escorting motorcade.