By Ju-min Park and Tim Kelly

SEOUL/TOKYO (Reuters) - North Korea launched what appeared to be an intermediate-range missile on Wednesday to a high altitude in the direction of Japan before it plunged into the sea, military officials said, a technological advance for the isolated state after several test failures.

The launch came about two hours after a similar test failed, South Korea's military said, and covered 400 km (250 miles), more than halfway towards the southwest coast of Japan's main island of Honshu.

The launches and earlier nuclear tests show continued defiance of international warnings and a series of U.N. Security Council resolutions and sanctions, which North Korea rejects as an infringement of its sovereignty.

Japanese Defence Minister Gen Nakatani said the second missile reached an altitude of 1,000 km (620 miles), indicating North Korea had made progress.

"We don't know whether it counts as a success, but North Korea has shown some capability with IRBMs (intermediate range ballistic missiles)," he told reporters in Tokyo.

"The threat to Japan is intensifying."

Reclusive North Korea and the rich, democratic South are technically still at war because their 1950-53 conflict ended in an armistice, not a peace treaty. The North regularly threatens to destroy the Japan, South Korea and the South's main ally, the United States.

South Korean President Park Geun-hye denounced the test.

"The North Korean regime must realize that complete isolation and self-destruction await at the end of reckless provocation," she said.

NATO Secretary General Jens Stoltenberg also decried North Korea's "provocative actions".

"I strongly condemn the launch by North Korea of two ballistic missiles," Stoltenberg said in a statement.

"These repeated provocative actions ... undermine international security and dialogue," he said, calling for North Korea to "fully comply with its obligations under international law, not to threaten with or conduct any launches using ballistic missile technology and to refrain from any further provocative actions".

Story continues

The first missile was launched from the east coast city of Wonsan, a South Korean official said, the same area where previous tests of intermediate-range missiles were conducted, possibly using mobile launchers.

FIFTH STRAIGHT FAILURE

South Korea's Yonhap news agency, quoting a government official, said the first missile disintegrated mid-air after a flight of about 150 km (95 miles).

Wednesday's first launch was the fifth straight unsuccessful attempt in the past two months to launch a missile that is designed to fly more than 3,000 km (1,800 miles) and could theoretically reach any part of Japan and the U.S. territory of Guam.

Jeffrey Lewis, of the California-based Middlebury Institute of International Studies, said missiles were usually fired at a certain angle to maximize range, so the high altitude of the second launch may have been chosen to avoid Japanese airspace.

"That suggests the missile worked perfectly," Lewis said. "Had it been fired at its normal angle, it would have flown to its full range."

Lewis said failures were a normal part of testing and that North Korea would fix problems with the Musudan intermediate-range missile sooner or later.

"If North Korea continues testing, eventually its missileers will use the same technology in a missile that can threaten the United States," Lewis told Reuters.

Nakatani said North Korea's repeated missile launches were a "serious provocation" and could not be tolerated.

Japan indicated after the first launch that it would protest strongly because it violated U.N. resolutions, even though the launches posed no immediate threat to Japanese security.

In Seoul, South Korea's presidential office said a national security meeting was convened to discuss the latest missile launches.

LONGER-RANGE ROCKETS

The U.S. military detected the two missiles, most likely Musudan, from North Korea, the U.S. military's Pacific Command said. A Pentagon spokesman said both missiles fell into the Sea of Japan. North Korea is believed to have up to 30 Musudan missiles, according to South Korean media, which officials said were first deployed around 2007, although the North had never attempted to test-fire them until April.

While North Korea has developed potential longer-range rockets, such as its 30-metre (98 ft) Unha-3, a home-grown three-stage rocket based on 1950s Soviet Scud missile technology, it needs to be fueled from a fixed launch pad making it easy to detect and impractical as a weapon.

A smaller, powerful intermediate missile that is easier to deploy on a mobile launcher poses a harder threat to counter.

The U.N. Security Council, backed by the North's main diplomatic ally, China, imposed tough new sanctions in March after North Korea conducted its fourth nuclear test in January and launched a long-range rocket that put an object into space orbit.

"At present, the situation on the peninsula remains very complex and severe. We think that the relevant party should avoid doing anything to further worsen tensions," Chinese Foreign Ministry spokeswoman Hua Chunying told reporters at a regular press briefing on Wednesday.

North Korea has conducted a series of tests since then that it claimed showed progress in nuclear weapons and long-range ballistic missile capabilities, including new rocket engines and simulated atmospheric re-entry.

(Additional reporting by James Pearson in SEOUL, Phil Stewart and Idrees Ali in WASHINGTON, Nobuhiro Kubo and Linda Sieg in TOKYO and Ben Blanchard in BEIJING; Writing by Jack Kim; Editing by Paul Tait, Tony Munroe and Nick Macfie)