SEOUL, Korea, Republic Of - North Korea fired an intermediate-range missile over Japan into the northern Pacific Ocean on Friday, U.S. and South Korean militaries said, its longest-ever such flight and a clear message of defiance to its rivals.

Since President Donald Trump threatened the North with "fire and fury" in August, Pyongyang has conducted its most powerful nuclear test, threatened to send missiles into the waters around Guam and launched two missiles of increasing range over U.S. ally Japan. It tested its first-ever intercontinental ballistic missiles in July.

The growing frequency, power and confidence displayed by these tests seem to confirm what governments and outside experts have long feared: North Korea is closer than ever to its goal of building a military arsenal that can viably target both U.S. troops in Asia and the U.S. homeland. This, in turn, is meant to allow North Korea greater military freedom in the region by raising doubts in Seoul and Tokyo that Washington would risk the annihilation of a U.S. city to protect its Asian allies.

South Korea's Joint Chiefs of Staff said the missile travelled about 3,700 kilometres and reached a maximum height of 770 kilometres.

North Korea has repeatedly vowed to continue these tests amid what it calls U.S. hostility - by which it means the presence of tens of thousands of U.S. troops in Japan and South Korea. Robust diplomacy on the issue has been stalled for years, and there's little sign that senior officials from Pyongyang and Washington might sit down to discuss ways to slow the North's determined march toward inclusion among the world's nuclear weapons powers.

Friday's missile, which Seoul said was the 19th ballistic missile launched by North Korea this year, triggered sirens and warning messages in northern Japan but caused no apparent damage to aircraft or ships. It was the second missile fired over Japan in less than a month. North Korea conducted its sixth and most powerful nuclear test on Sept. 3.

The missile was launched from Sunan, the location of Pyongyang's international airport and the origin of the earlier missile that flew over Japan. Analysts have speculated the new test was of the same intermediate-range missile launched in that earlier flight, the Hwasong-12.

That missile is linked to North Korea's declaration that it means to contain the U.S. Pacific island territory of Guam, which is the home of important U.S. military assets and appears well within the Hwasong-12's range.

Friday's missile test was met with the usual outrage. South Korean President Moon Jae-in ordered his military to conduct a live-fire ballistic missile drill in response to the North Korean launch and instructed government officials to pursue "stern" measures to discourage Pyongyang from further provocations. South Korea's Joint Chiefs of Staff said one of the two missiles fired in the drill hit a sea target about 250 kilometres away, which was approximately the distance to Pyongyang's Sunan, but the other failed in flight shortly after launch.

Japanese Prime Minister Shinzo Abe and U.S. Defence Secretary Jim Mattis both called the North Korean launch a reckless act.

The UN Security Council scheduled an emergency closed-door meeting to be held Friday afternoon in New York. Trump has not commented.

The North American Aerospace Defence Command and the U.S. Pacific Command said the missile posed no threat to North America or to Guam.

South Korean experts have said North Korea wants to make missiles flying over Japan an accepted norm as it seeks to win more military space in a region dominated by its enemies.

North Korea initially flight-tested the Hwasong-12 and the ICBM model Hwasong-14 at highly lofted angles to reduce their range and avoid neighbouring countries.

The two launches over Japan indicate North Korea is moving toward using angles close to operational to determine whether its warheads can survive the harsh conditions of atmospheric re-entry and detonate properly.

North Korea's August launch over Japan came weeks after it threatened to fire a salvo of Hwasong-12s toward Guam and bracket the island with "enveloping" missile fire. The North's latest launch might be an attempt to demonstrate its ability to fire a missile close to Guam, which is 3,400 kilometres away from North Korea, said Kim Dong-yub, a former South Korean military official who is now an analyst at Seoul's Institute for Far Eastern Studies.

North Korea has been accelerating its nuclear weapons development under leader Kim Jong Un, a third-generation dictator who has conducted four of North Korea's six nuclear tests since taking power in 2011. The weapons are being tested at a torrid pace and include solid-fuel missiles designed to be launched from road mobile launchers or submarines and are thus less detectable beforehand.

North Korea claimed its latest nuclear test was a detonation of a thermonuclear weapon built for its ICBMs, which could potentially reach deep into the U.S. mainland when perfected.

The UN Security Council unanimously approved new sanctions earlier this week over the nuclear test. They ban all textile exports and prohibit any country from authorizing new work permits for North Korean workers - two key sources of hard currency. They also prohibit North Korea from importing all natural gas liquids and condensates, and cap Pyongyang's imports of crude oil and refined petroleum products.

North Korea's Foreign Ministry denounced the UN sanctions and said the North will "redouble its efforts to increase its strength to safeguard the country's sovereignty and right to existence."

-----

Associated Press writer Mari Yamaguchi in Tokyo contributed to this report.