By Jack Kim and Michelle Nichols

SEOUL/UNITED NATIONS (Reuters) - North Korea conducted its fifth and biggest nuclear test on Friday and said it had mastered the ability to mount a warhead on a ballistic missile, ratcheting up a threat that rivals and the United Nations have been powerless to contain.

The blast, on the 68th anniversary of North Korea's founding, drew a fresh wave of global condemnation. The United States said it would work with partners to impose new sanctions, and called on China to use its influence as North Korea's main ally to pressure Pyongyang to end its nuclear program.

Under 32-year-old third-generation leader Kim Jong Un, North Korea has sped up development of its nuclear and missile programs, despite U.N. sanctions that were tightened in March and have further isolated the impoverished country.

The United Nations Security Council strongly condemned the test and said it would begin work immediately on a resolution. The United States, Britain and France pushed the 15-member body to impose new sanctions.

U.N. Secretary General Ban Ki-Moon urged the group to remain united and take action that would "urgently break this accelerating spiral of escalation."

U.S. President Barack Obama said after speaking by telephone with South Korean President Park Geun-hye and with Japanese Prime Minister Shinzo Abe that they had agreed to work with the Security Council and other powers to vigorously enforce existing measures against North Korea and to take "additional significant steps, including new sanctions."

U.S. Defense Secretary Ash Carter called for a redoubling of international pressure on North Korea and singled out the role he said China should play.

"It's China's responsibility," he told a news conference during a visit to Norway. "China has and shares an important responsibility for this development and has an important responsibility to reverse it."

China said it was resolutely opposed to the test and urged Pyongyang to stop taking any actions that would worsen the situation. It said it would lodge a protest with the North Korean embassy in Beijing.

Chinese Foreign Ministry spokeswoman Hua Chunying would not be drawn, however, on whether China would support tougher sanctions against its neighbor.

South Korea's Park said Kim was showing "maniacal recklessness" in completely ignoring the world's call to abandon his pursuit of nuclear weapons. Russia, the European Union, NATO, Germany and Britain also condemned the test.

U.S. Secretary of State John Kerry said the United States remained open to "credible and authentic" talks on the denuclearization of the Korean peninsula, but added that North Korea had shown it would not be a credible negotiating partner. Six-party talks on the issue involving North and South Korea, the United States, Japan, Russia and China stalled in 2008.

North Korea, which labels the South and the United States as its main enemies, said its "scientists and technicians carried out a nuclear explosion test for the judgment of the power of a nuclear warhead," according to its official KCNA news agency.

It said the test proved North Korea was capable of mounting a nuclear warhead on a medium-range ballistic missile, which it last tested on Monday when Obama and other world leaders were gathered in China for a G20 summit.

Pyongyang's claims of being able to miniaturize a nuclear warhead have never been independently verified.

Its continued testing in defiance of sanctions presents a challenge to Obama in the final months of his presidency and could become a factor in the U.S. presidential election in November, and a headache to be inherited by whoever wins.

"Sanctions have already been imposed on almost everything possible, so the policy is at an impasse," said Tadashi Kimiya, a University of Tokyo professor specializing in Korean issues.

"In reality, the means by which the United States, South Korea and Japan can put pressure on North Korea have reached their limits," he said.

U.S. stock markets fell, partly because of an increase in investor nervousness following North Korea's nuclear test. The Dow Jones Industrial Average dropped 2.1 percent and the S&P and Nasdaq both 2.5 percent

UNPRECEDENTED RATE

North Korea has been testing different types of missiles at an unprecedented rate this year, and the capability to mount a nuclear warhead on a missile is especially worrisome for its neighbors South Korea and Japan.

"The standardization of the nuclear warhead will enable the DPRK to produce at will and as many as it wants a variety of smaller, lighter and diversified nuclear warheads of higher strike power," KCNA said, referring to the country's formal name, the Democratic People's Republic of Korea.

The Pentagon did not have evidence that North Korea had been able to miniaturize a nuclear weapon, Pentagon spokesman Gary Ross said. But he added, "given the consequences of getting it wrong, it is prudent for a military planner to plan for the worst."

It was not clear whether Pyongyang had notified Beijing or Moscow of its planned nuclear test. Senior officials from Pyongyang were in both capitals this week.

Although Beijing has criticized North Korea's nuclear and missile tests, it has repeatedly expressed anger since the United States and South Korea decided in July to deploy the Terminal High Altitude Area Defense (THAAD) anti-missile system in the South.

China says that THAAD is a threat to its own security and will do nothing to bring North Korea back to the negotiating table on its nuclear program.

Preliminary data collected by the Vienna-based Comprehensive Nuclear-Test-Ban Treaty Organization (CTBTO), which monitors nuclear tests around the world, indicated the magnitude - around 5 - of the seismic event detected in North Korea on Friday was greater than a previous one in January.

Jeffrey Lewis of the California-based Middlebury Institute of International Studies said the highest estimates of seismic magnitude suggested this was North Korea's most powerful nuclear test so far.

He said the seismic magnitude and surface level indicated a blast with a 20- to 30-kilotonne yield or its largest to date. Such a yield would make this test larger than the nuclear bomb dropped by the United States on the Japanese city of Hiroshima in World War Two, which exploded with an energy of about 15 kilotons.

South Korea's military put the force of the blast at 10 kilotons, which would still be the North's most powerful nuclear blast to date.

"The important thing is, that five tests in, they now have a lot of nuclear test experience. They aren't a backwards state any more," Lewis said.

The Pentagon said it would deploy the U.S. Air Force WC-135, a modified Boeing aircraft, to collect air particles and any debris in the atmosphere and confirm the nature of the test.

The aircraft would be flying in the region soon "as part of our efforts to assess what happened last night," Pentagon spokesman Jeff Davis said.

(Reporting by Jack Kim, Ju-min Park, James Pearson, Se Young Lee, Nataly Pak, and Yun Hwan Chae in Seoul; Additional reporting by Ben Blanchard in Beijing, Kaori Kaneko and Linda Sieg in Tokyo, Kirsti Knolle in Vienna, Doina Chiacu, Idrees Ali and Eric Beech in Washington, Michelle Nichols at the United Nations, Phil Stewart in Oslo; Writing by Tony Munroe and Frances Kerry; Editing by Ian Geoghegan, James Dalgleish, Grant McCool)