BEIJING (Reuters) - China on Wednesday issued a veiled warning to neighboring North Korea not to carry out what is widely expected to be an imminent nuclear test.

North Korea has almost completed preparations for a third nuclear test, a senior source with close ties to Pyongyang and Beijing told Reuters, an act that would draw further international condemnation following this month's failed rocket launch which the United States and others said was a disguised missile test.

"Peace and stability on the Korean peninsula and in Northeast Asia bears on China's national interest and also bears on the interests of all relevant parties," Chinese Vice Foreign Minister Cui Tiankai told a news briefing.

"China will oppose anything which might jeopardize peace and stability on the Korean peninsula and in Northeast Asia, as this would damage China's national security interests and the interests of the relevant parties as well," he said, when asked about the possibility of a new nuclear test by North Korea.

"We believe that no party should take any action that might escalate tensions."

China is the only major power that the impoverished North has for an ally, but even Beijing's influence over Pyongyang is limited in the diplomatic stalemate over the North's efforts to build a nuclear arsenal.

The North's brief attempt at rapprochement with the United States earlier this year quickly evaporated with its April 13 launch of a long-range rocket which resulted in yet another censure by the U.N. Security Council, which includes China.

Critics say the rocket launch was aimed at honing the North's ability to develop an intercontinental ballistic missile capable of hitting the United States, a move that would dramatically increase its military and diplomatic heft.

The United States has called on China to do more to rein in North Korea.

But Cui, in China's highest level comments yet on the possibility of a new test, said everyone shared equal responsibility.

"Maintaining peace and stability on the Korean peninsula and in Northeast Asia is the joint responsibility of all sides, not just China alone," he added.

"China's basic position on this issue is that the parties concerned should work unwaveringly for peace and stability on the Korean peninsula and in Northeast Asia."

Washington, Seoul and Tokyo, which have most to fear from any North Korean nuclear threat, are watching events anxiously and many observers say that Pyongyang may have the capacity to conduct a test using highly enriched uranium for the first time.

(Reporting by Ben Blanchard, Editing by Jonathan Thatcher)