The surprise China-North Korea summit this week is intended to ensure that Beijing's voice is heard when North Korean leader Kim Jong Un holds a historic meeting with President Donald Trump.

Chinese President Xi Jinping wants to protect his country's strategic interests on the Korean Peninsula, particularly when it comes to maintaining a friendly regime in Pyongyang as a buffer from the U.S. and South Korean forces stationed across the 38th parallel. U.S. Secretary of State Mike Pompeo arrived in North Korea on Wednesday, just a day after Kim's visit, to finalize details for Trump's summit with Kim.

Kim, meanwhile, registered his desire for Chinese support in the talks, particularly his call for a "phased and synchronous" approach to denuclearization, as opposed to Trump's demand for an immediate end to its nuclear programs.

"I think Xi wants to head off a surprise outcome from the Trump-Kim summit," said Bonnie Glaser, senior adviser for Asia at the Center for Strategic and International Studies in Washington.

Xi and Kim held talks Monday and Tuesday in the northern Chinese port of Dalian, the second time they've met in just over a month, following Kim's unannounced trip to Beijing in late March. That was his first overseas visit since taking power six years ago and a powerful sign of the enduring relationship between the communist neighbors despite years of fraying ties.

The Dalian summit was also significant in that Xi was expected to visit Pyongyang prior to Kim returning to China, showing that Kim has finally agreed to accept the role of "junior partner" in the relationship after a lengthy period of strained relations, said Michael Mazza of the American Enterprise Institute think tank in Washington.

Amid tranquil scenes of the two leaders chatting beside deep blue ocean waters and strolling through lush gardens, state media quoted Xi as telling Kim that China "supports North Korea to stick to denuclearization of the Korean Peninsula and supports North Korea and the U.S. in solving the peninsula issue through dialogue and consultation."

Kim said North Korea remains committed to denuclearization and has no need to possess nuclear weapons if a "relevant party" drops its "hostile policy and security threats" against it, a clear reference to the United States.

The exact time and location of Kim's meeting with Trump have not yet been announced. U.S. officials say besides working on those details, Pompeo will also press North Korea for the release of three detained American citizens, whose imminent release Trump has been hinting at. His trip comes just days after North Korea expressed displeasure with Washington for comments suggesting that massive U.S. pressure had pushed Kim to the negotiating table.

Trump discussed the summit in Dalian with Xi in a phone call Tuesday, along with "recent developments on the Korean Peninsula," the White House said.

"President Trump and President Xi agreed on the importance of continued implementation of sanctions on North Korea until it permanently dismantles its nuclear and missile programs," it said.

Trump tweeted before the call that "Plans are being made, relationships are building, hopefully a deal will happen and with the help of China, South Korea and Japan a future of great prosperity and security can be achieved for everyone."

Glaser said Xi wants to ensure that Chinese interests are protected in North Korea's negotiations with Washington. At a minimum, that means ensuring "a seat at the negotiating table assuming that talks begin in earnest," she said.

Such views were echoed in an editorial Wednesday in the Global Times, a newspaper published by China's ruling Communist Party.

"How to resolve issues on the peninsula, including the nuclear issue, cannot be decided by Washington alone. Washington should respect Beijing's opinions and interests since it has often required Beijing to cooperate with it," the paper said.

Kim is also hoping to enlist China's hope in persuading Trump to be flexible in his demands for a verifiable halt to North Korea's nuclear programs, analysts said.

By hosting Kim twice before the summit, Xi is also asserting, at least symbolically, "China's primacy on the Korean Peninsula," Mazza said.

"More broadly, if some kind of grand bargain is in the offing, Xi wants to ensure that it doesn't lead to a fundamental shift in the strategic environment detrimental to Chinese interests," Mazza said.

China sent troops to fight on the North's behalf in the 1950-53 Korean War, and for years afterward, the relationship was described as being "as close as lips and teeth."

But ties deteriorated markedly after Kim took power and undertook an ever-more aggressive pursuit of nuclear weapons and the ballistic missiles to deliver them.

China has accounted for about 90 percent of North Korea's foreign trade, but in recent years has enforced United Nations sanctions that have squeezed the North's economy. The pressure increased significantly after North Korea's test of a significantly more powerful nuclear device in September.

"For Xi, the important message is simply that China is a key player for a solution over the Korean Peninsula and this (Dalian) meeting is meant to reaffirm this message, in particular for Donald Trump," said Steve Tsang, director of the China Institute at London's School of Oriental and African Studies.

Kim, meanwhile, probably intended for the Dalian meeting to signal that "China remains an ally of North Korea and thus will be there to support him should Trump set the price too high for a deal," Tsang said.