SEOUL, South Korea — North Korea fired a ballistic missile over Japan on Tuesday in one of its most brazen provocations in years, prompting President Donald Trump to warn that “all options are on the table.”

It was the second launch in three days and sharply escalated tensions as the United States and South Korea wrap up joint war games on the divided peninsula this week.

North Korea has conducted dozens of missile tests, including 13 this year, and officials said the one launched Tuesday broke into three pieces that apparently caused no damage before splashing into the Pacific.

But the symbolism of a North Korean missile soaring over Japan — a staunch U.S. ally — for the first time since 2009 was powerful, signaling defiance and progress in the communist state’s efforts to develop a nuclear-tipped missile that could target the U.S. mainland.

“The world has received North Korea’s latest message loud and clear,” Trump said in an official White House statement. He said the regime has signaled contempt for its neighbors, the United Nations and “for minimum standards of acceptable international behavior.”

Trump warned the North that its “threatening and destabilizing actions” would increase its isolation.

“All options are on the table,” he added.

North Korea fired rockets over Japan in 1998 and 2009, but in those cases it claimed they were carrying satellites into space.

Pyongyang also warned it would send missiles over Japan en route to the waters near the U.S. territory of Guam as part of a military plan presented to leader Kim Jong Un earlier this month. Kim announced he would hold off on the plan for the time being.

The Japanese government issued alerts as the missile flew over Hokkaido, urging residents in some prefectures to take cover.

Prime Minister Shinzo Abe called the missile test an “unprecedented, serious and grave threat” to the region.

Abe said earlier that he had discussed the launch with Trump in a 40-minute phone call and they agreed on the need to call on the U.N. Security Council to step up pressure against the North. Trump was quoted as telling Abe the U.S. is with Japan “100 percent” and is committed to defending its ally.

The White House didn’t elaborate on possible options, but Trump’s administration has said in the past that it would consider military action if diplomatic efforts and sanctions continue to fail.

SOUTH KOREAN RESPONSE

South Korean President Moon Jae-in, a liberal leader who has shown increasing impatience with the North’s refusal to accept his offer for talks, ordered the military to demonstrate its overwhelming capabilities on Tuesday. Four South Korean fighter jets dropped eight bombs on a shooting range in a show of force near the heavily fortified border with the North, according to the presidential office.

South Korea also released footage of tests conducted last week of its own new ballistic missiles that the governmental Agency for Defense Development said have a range of up to 500 miles and improved warhead power.

"Our military has the missile capabilities with the highest level of precision and the destructive power to strike any place in North Korea if necessary," the agency said. "It will greatly build up our missile forces and military strength in the future."

The North Korean missile was launched eastward from an area near the airport in the capital, Pyongyang, according to South Korea’s military.

It flew more than 1,677 miles at a maximum altitude of 342 miles, the Joint Chiefs of Staff said in a statement. That’s a departure from recent missiles launched at a steep angle in an apparent bid to avoid flying over Japanese territory.

Pentagon spokesman Col. Rob Manning confirmed that the missile flew over Japan, saying the military was still assessing the details.

Japanese government officials said the missile flew for 14 minutes and broke into three pieces before splashing into the Pacific about 730 miles east of scenic Cape Erimo.

Its path took it over the Oshima peninsula for some two minutes, but no debris was immediately discovered on Japanese territory and no damages to nearby ships or aircraft were reported, officials said.

The missile fell outside Japan’s exclusive economic zone and was believed to be similar to one launched on May 14 at a lofted trajectory that allowed it to avoid Japanese territory, Defense Minister Itsunori Onodera told reporters in Tokyo. It is believed that Tuesday’s missile was not launched with a lofted trajectory, he added.

Japan planned to call for an emergency U.N. Security Council meeting to seek additional pressure against North Korea, Abe said.

The Japanese government's emergency information network system sent out alerts at 6:02 a.m. warning: “Missile launch. Missile launch. North Korea seemed to have launched missile. Please evacuate into substantial buildings or basements.”

An all-clear was sent at 6:14 a.m., warning people not to go near suspected debris and to notify authorities if they found any.

DIPLOMATIC SETBACK

Tuesday’s launch was a blow to U.S. and South Korean efforts to restart long-stalled negotiations with the North, which has demonstrated rapid progress in its weapons program, including two underground nuclear tests last year.

North Korea test-fired three short-range missiles on Saturday, breaking a monthlong lull in activity that had prompted Secretary of State Rex Tillerson to praise what he called the communist state’s “restraint.”

Even following Saturday’s missile test, Tillerson stressed his desire to “bring the regime in Pyongyang to the negotiating table.”

The U.S. president also sounded hopeful during a rally in Arizona last week after annual U.S.-South Korean military exercises known as Ulchi Freedom Guardian began on Aug. 21 without a major provocation. The North considers the drills a rehearsal for an invasion. The command-post exercise, which mainly consists of computer simulations, is slated to end on Thursday.

“But Kim Jong Un, I respect the fact that I believe he is starting to respect us. I respect that fact very much,” Trump said. “And maybe, probably not, but maybe something positive can come about.”

That was a reversal from Trump’s threat earlier this month to unleash “fire and fury” against the North if it continues to threaten the United States.

U.S. commanders also have expressed hopes that diplomatic pressure would curb the North’s activities, while warning they are preparing military options.

A ban on Americans traveling to North Korea also is due to take effect on Friday. The U.S. government said the ban was due to the risk of “long-term detention” in the North after the death of American university student Otto Warmbier.