Updated

Leaked U.S. diplomatic cables show China's frustration with communist ally North Korea and speculate Beijing would accept a future Korean peninsula unified under South Korean rule, according to the documents released by whistle-blowing website WikiLeaks.

The memos indicate the enormous import American and South Korean diplomats place on China's attitude toward the future survival of the isolated and impoverished hard-line communist regime in Pyongyang.

The release of the documents follows new tensions in the region with North Korea unleashing a fiery artillery barrage on a South Korean island that killed four people a week ago. The regime also warned that joint U.S.-South Korean naval drills this week had pushed the peninsula to the "brink of war."

China "would be comfortable with a reunified Korea controlled by Seoul and anchored to the US in a 'benign alliance' as long as Korea was not hostile towards China," then-South Korean vice foreign minister, Chun Yung-woo, is quoted as telling U.S. ambassador to South Korea, Kathleen Stephens, in February.

The diplomatic cables warn, however, that China would not accept the presence of U.S. troops north of the demilitarized zone that currently forms the border between the two Koreas.

Economic opportunities in a reunified Korea could further induce Chinese acquiescence, Chun says.

Chun predicts the government in Pyongyang would last no more than three years following the death of ailing leader Kim Jong Il, who is seeking to pass power to son Kim Jong Un, a political ingenue in his 20s.

While China favors maintaining the status quo, it has little ability to stop a collapse and less influence over the authorities in Pyongyang than is widely believed.

"Beijing had 'no will' to use its economic leverage to force a change in Pyongyang's policies," Chun says, adding the North Korean leadership would continue refusing to dismantle its nuclear program in the absence of a more forceful Chinese approach.

Chun also dismisses the possibility of Chinese military intervention if North Korea threatened to descend into chaos.

China is preparing to handle any outbreaks of unrest along the border that could follow a collapse of the regime. Chinese officials say they could deal with up to 300,000 refugees, but might have to seal the border to maintain order, the memos say, citing an unidentified representative of an international aid group.

Chinese officials are also quoted as using mocking language in reference to North Korea, pointing to tensions between the two neighbors in contrast to official statements underscoring strong historical ties.

Then-Deputy Foreign Minister He Yafei is quoted as telling a U.S. official in April 2009 that Pyongyang was acting like a "spoiled child" by staging a missile test in an attempt to achieve its demand of bilateral talks with Washington.

U.S. Secretary of State Hillary Rodham Clinton asserted Monday that WikiLeaks acted illegally in posting the material. Officials around the world have said the disclosure jeopardizes national security, diplomats, intelligence assets and relationships between foreign governments.

Five international media organizations, including The New York Times and Britain's the Guardian newspaper, were among those to receive the documents in advance.

Adding to heightened tensions on the peninsula, North Korea revealed two weeks ago the existence of a uranium enrichment facility that could provide the country with a second route for building a nuclear bomb.

China has largely rebuffed calls to use its influence to force Pyongyang to moderate its behavior, while opposing harsh economic sanctions or international censure. Beijing has responded to the latest crises by repeating calls for a return to long-stalled, six-nation denuclearization talks that the North has rejected.

Meanwhile, the chairman of North Korea's Supreme People's Assembly, Choe Thae Bok, arrived in Beijing on Tuesday for a five-day visit following a call last week from China for emergency consultations. Japan also says it will send an envoy for talks.