Updated

North Korean dictator Kim Jong Un met with Chinese President Xi Jinping on an "unofficial visit" to Beijing, China's state-run media reported late Tuesday.

South Korea's Yonhap news agency, citing North Korean state radio, reported that Kim had visited China between Sunday and Wednesday local time at Xi's invitation and was accompanied by his wife, Ri Sol Ju.

Xi Jinping AP

Chinese President Xi Jinping. (AP)

Xi held talks with Kim at the Great Hall of the People in Beijing and he and his wife Peng Liyuan hosted a banquet for Kim and his wife, the official Xinhua news agency said. They also watched an art performance together, the news agency said.

Xi hailed Kim's visit as embodying the importance with which the North Korean leader regarded ties with China.

"We speak highly of this visit," Xi told Kim, according to Xinhua.

In a statement, White House press secretary Sarah Sanders said: "The Chinese government contacted the White House earlier on Tuesday to brief us on Kim Jong Un's visit to Beijing. The briefing included a personal message from President Xi to President Trump, which has been conveyed to President Trump.

"The United States remains in close contact with our allies South Korea and Japan," Sanders added. "We see this development as further evidence that our campaign of maximum pressure is creating the appropriate atmosphere for dialogue with North Korea."

Kim was described by Xinhua as saying that his country wants to transform ties with South Korea into "a relationship of reconciliation and cooperation." The two Koreas are still technically at war because their 1950-53 war ended in an armistice, not a peace treaty.

North Korea's official Korean Central News Agency published Kim's personal letter to Xi dated on Wednesday, where he expressed gratitude to the Chinese leadership for showing what he described as "heartwarming hospitality" during his "productive" visit.

Kim said that the first meeting between the leaders of the two countries will provide a "groundbreaking milestone" in developing mutual relations to "meet the demands of the new era." Kim also said that he's satisfied that the leaders confirmed their "unified opinions" on mutual issues.

In a speech at a banquet in China, Kim described the traditional allies as inseparable "neighboring brothers" with a relationship molded by a "sacred mutual fight" to achieve socialist ideals, according to KCNA.

"It's most proper that my first overseas trip would be the capital of the People's Republic of China as it's also one of my noble duties to value the North Korea-China friendship as I do my own life and extend it (for another generation)," said Kim, according to the agency.

The North Korean leader is expected to hold separate summits with South Korean President Moon Jae In in late April and U.S. President Donald Trump in May. Analysts say Kim would have felt a need to consult with his country's traditional ally ahead of his planned meetings.

China remains North Korea's only major ally and chief provider of energy, aid and trade that keep the country's broken economy afloat.

The North's diplomatic outreach to Seoul and Washington came after an unusually provocative year when it conducted its most powerful nuclear test to date and three ICBMs tests designed to target the U.S. mainland.

The developments were interpreted as the North being desperate to break out of isolation and improve its economy after being squeezed by heavy sanctions.

Fox News' Katherine Lam and Serafin Gomez and The Associated Press contributed to this report.