The missile launch seemed designed to wreak just the right amount of havoc: enough for Kim to show that he would not be cowed but not so much as to invite the "fire and fury" that Trump warned could follow continued North Korean threats.
The launch early Tuesday was the first test of such a sophisticated weapon over the landmass of a U.S. ally and an obvious warning to the United States that North Korea could easily target U.S. military facilities on Guam or elsewhere in the Pacific region.
It came during annual joint military exercises between the United States and South Korea that have infuriated the nuclear-armed communist regime. It also came despite recent offers of talks from Secretary of State Rex Tillerson.
"The world has received North Korea's latest message loud and clear: this regime has signaled its contempt for its neighbors, for all members of the United Nations, and for minimum standards of acceptable international behavior," Trump said in an early morning statement.
"Threatening and destabilizing actions only increase the North Korean regime's isolation in the region and among all nations of the world," he said. "All options are on the table."
The United States requested an emergency meeting of the U.N. Security Council, which this month unanimously approved the strictest economic sanctions to date on a nation that already is one of the most heavily sanctioned in the world.
"No country should have missiles flying over them like those 130 million people in Japan. It's unacceptable," U.S. Ambassador to the United Nations Nikki Haley said.
North Korea has "violated every single U.N. Security Council resolution that we've had, and so I think something serious has to happen," she added. "Enough is enough."
There was no indication that Kim was intimidated by the White House reaction. The state Korean Central News Agency reported Wednesday morning local time that the North Korean leader had been present for the missile launch and had called it "a meaningful prelude to containing Guam." According to the agency, Kim said he had gone ahead with the missile launch because the United States proceeded with "the bellicose war exercises" with South Korea.
International outrage over the latest North Korean missile went well beyond Washington. Trump spoke by phone with Japanese Prime Minister Shinzo Abe hours after the launch, and the two leaders "committed to increasing pressure on North Korea, and doing their utmost to convince the international community to do the same," according to a White House statement.
That was a reference to stiff international sanctions that so far have failed to stop North Korea from developing working nuclear bombs and intercontinental ballistic missiles. The United States claims North Korea could not evade those sanctions if other countries including China enforced them more stringently.
Asked about the effectiveness of sanctions and international denunciation, given that North Korea does not seem to care about the moves, deputy British U.N. envoy Jonathan Allen insisted such actions have merit.
"They send that really important message of the entire world being united, and they do have an impact on North Korea," Allen told reporters at the United Nations.
The missile appeared to be a Hwasong-12, the intermediate-range ballistic missile that North Korea has been threatening to shoot into the waters near the U.S. territory of Guam.
But North Korea did not shoot it southeast toward Guam. Instead, it lobbed the missile in a northeasterly direction, over Japan and into the Pacific Ocean.
It was, as Stephan Haggard, a political scientist and Korea expert at the University of California at San Diego, described it, "perfectly calibrated to create political mischief."
"The launch shows how Kim Jong Un is weirdly conservative, calibrating tests so that they are difficult to counter, flying just beneath the radar of a required kinetic response," Haggard said.
Taro Kono, Japan's foreign minister, acknowledged as much. "If North Korea had launched the missile to the south, the U.S. might have viewed it as a considerable provocation and responded accordingly," Kono told reporters after the launch.
North Korea's action also seemed designed to drive a wedge between its neighbors.
In Japan, Abe called it "an unprecedented, grave and serious threat." Abe wants to beef up Japan's military capabilities, and missile launches like this provide ammunition for his controversial cause. South Korea's liberal president, Moon Jae-in, who has promoted engagement with Pyongyang, immediately denounced the launch and sent his fighter jets to drop bombs on a shooting range near the border with North Korea.
Both reactions appear to have rattled China, where officials called on all sides to take a step back. Foreign Ministry spokeswoman Hua Chunying characterized the North Korea situation as "at a tipping point, approaching a crisis." She repeated China's call for talks between North Korea and the United States.
Tillerson had stressed Sunday that the offer of talks remained open, and he encouraged Kim to choose "a different path." For weeks, U.S. officials have sought to assure Kim that Washington does not want to topple him or invade his country, a message also meant to appeal to North Korea's protector, China.
Trump said last week that North Korea was finally "starting to respect us," although he added that his threat to answer the country's provocations with "fire and fury" might not have been strong enough.
Tillerson also had publicly praised North Korea last week for showing "restraint" since the U.N. Security Council vote and in the face of the annual military drills. Although North Korea had not test-launched any missiles for nearly a month at that point, it has done so twice since Tillerson spoke.
North Korea fired rockets over the Japanese mainland in 1998 and 2009 — but it described them as satellite launch vehicles and gave Japan advance warning in the second case. Tuesday's missile launch was purely military and "demonstrated a direct threat," said Narushige Michishita, an expert on Korean Peninsula security issues at the Graduate Institute for Policy Studies in Tokyo.
"From a military point of view, they have demonstrated an ability to use a very mobile, agile missile against targets anywhere in Japan," he said.
Defense Secretary Jim Mattis has said that the United States would shoot down any missile North Korea fired at Guam or a U.S. ally.
Fifield reported from Tokyo.