FILE - A man watches a TV news program reporting about a missile launch of North Korea, at the Seoul Train Station in Seoul, South Korea, Tuesday, May 31, 2016. (AP Photo/Lee Jin-man)

SEOUL, South Korea (AP) — North Korea fired a ballistic missile from its capital Pyongyang that flew over Japan before plunging into the northern Pacific Ocean, officials said Tuesday, an aggressive test-flight over the territory of a close U.S. ally that sends a clear message of defiance as Washington and Seoul conduct war games nearby.

Seoul’s Joint Chiefs of Staff said the missile traveled around 2,700 kilometers (1677 miles) and reached a maximum height of 550 kilometers (341 miles) as it flew over the northern Japanese island of Hokkaido. The launch, which appears to be the first to cross over Japan since 2009, will rattle a region worried that each new missile test puts the North a step closer toward its goal of an arsenal of nuclear missiles that can reliably target the United States.

North Korean missile launches have been happening at an unusually fast pace this year, and some analysts believe that the North could have such an arsenal before the end of U.S. President Donald Trump’s first term in early 2021.

The JCS said it is analyzing the launch with the United States and also that South Korea’smilitary has strengthened its monitoring and preparation in case of further actions from North Korea. South Korea’s military says the missile was launched from Sunan, which is where Pyongyang’s international airport is, opening the possibility that North Korealaunched a road mobile missile from an airport runway.

Tokyo called Tuesday’s test a “grave threat.” Japanese officials said there was no damage to ships or anything else reported. Japan’s NHK TV said the missile separated into three parts. Prime Minister Shinzo Abe told reporters, “We will do our utmost to protect people’s lives.”

Tuesday’s launch comes days after the North fired what was assessed as three short-range ballistic missiles into the sea and a month after its second flight test of an intercontinental ballistic missile, which analysts say could reach deep into the U.S. mainland when perfected.

North Korea typically reacts with anger to U.S.-South Korean military drills, which are happening now, often staging weapons tests and releasing threats to Seoul and Washington in its state-controlled media. But animosity is higher than usual following threats by Trump to unleash “fire and fury” on the North, and Pyongyang’s stated plan to consider firing some of its missiles toward Guam.

Kim Dong-yub, a former South Korean military official who is now an analyst at Seoul’s Institute for Far Eastern Studies, said that the early flight data suggests the North Korean missile was likely a Hwasong-12, a new intermediate range missile that the North has recently threatened to fire toward Guam. Kim said it may also have been a midrange Musudan, a missile with a potential 3,500-kilometer (2,180-mile) range that puts much of the Asia-Pacific region within reach, or a Pukguksong-2, a solid-fuel missile that can be fired faster and more secretly than weapons using liquid fuel.

North Korea first fired a rocket over Japanese territory in August of 1998 when a multistage rocket that outside experts called “Taepodong-1” based on the name of the village it was launched from flew about 1,500 kilometers (932 miles) before landing in the Pacific Ocean. The North later said it launched a satellite.

North Korea flew another rocket over Japan again in April 2009 and said that, too, was carrying a satellite. The North claimed success, but the U.S. North American Aerospace Defense Command says no satellite reached orbit. The United Nations has repeatedly condemned North Korean satellite launches as covers meant to test banned long-range missile technology.

Pyongyang regularly argues that the U.S.-South Korean military exercises are an invasion rehearsal, although analysts say the North’s anger is partly because the impoverished country must react with its own expensive drills and weapons tests. The allies say the war games are defensive and meant to counter North Korean aggression.

North Korea’s U.N. ambassador, Ja Song Nam, wrote recently that the exercises are “provocative and aggressive” at a time when the Korean Peninsula is “like a time bomb.”

___

Yuri Kageyama contributed to this report from Tokyo.

Copyright 2017 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.