BEIJING (Reuters) - China declared a "red line" on North Korea on Saturday, saying that China will not permit chaos or war on the Korean peninsula, and that peace can only come through denuclearization.

China is North Korea's most important diplomatic and economic supporter, though Beijing's patience with Pyongyang has been severely tested following three nuclear tests and numerous bouts of saber rattling, including missile launches.

"The Korean peninsula is right on China's doorstep. We have a red line, that is, we will not allow war or instability on the Korean peninsula," Chinese Foreign Minister Wang Yi told reporters on the sidelines of China's annual largely rubber-stamp parliament.

Wang called upon all parties to "exercise restraint", adding that "genuine and lasting peace" on the peninsula was only possible with denuclearization.

U.S. Secretary of State John Kerry visited China last month and said after talks in Beijing that China and the United States were discussing specific ways to press North Korea to give up its nuclear program.

Western countries and independent experts have accused China of failing to implement properly U.N. sanctions on North Korea, including punitive measures adopted after Pyongyang's third nuclear test in February last year.

North Korea has forged ahead with its nuclear development after declaring the so-called six-party talks dead in 2008, overturning its commitments made under a 2005 disarmament deal aimed at rewarding it with economic incentives.

Wang reiterated China's calls for a resumption of the talks between North Korea, South Korea, the United States, Japan, Russia and host China.

"Confrontation can only bring tension, and war can only cause disaster," Wang said. "Some dialogue is better than none, and better early than later."

U.N. High Commissioner for Human Rights Navi Pillay urged world powers last month to refer North Korea to the prosecutor of the International Criminal Court following a U.N. report documenting crimes against humanity comparable to Nazi-era atrocities.

Story continues

China has rejected what it said was "unreasonable criticism" of Beijing in the U.N. report, but has not said directly whether it would veto any proceedings in the Security Council to bring Pyongyang to book.

The team also recommended targeted U.N. sanctions against civil officials and military commanders suspected of the worst crimes. North Korea is already subject to U.N. sanctions for refusing to give up its atomic bomb program.

(Reporting by Michael Martina and Ben Blanchard; Editing by Nick Macfie)