BEIJING — North Korea’s latest test launch of an intercontinental ballistic missile marks a direct challenge to President Donald Trump, whose tough talk has yet to yield change in Pyongyang’s behavior as it continues its efforts to build a nuclear weapon capable of striking the mainland United States.

The missile — launched Tuesday in North Korea — flew higher and remained in the air longer than previous attempts, enough to reach all of Alaska, experts said. They called it a major milestone for North Korea’s weapons program.

The Pentagon and the State Department confirmed late Tuesday that North Korea had launched an ICBM.

The test comes just before Trump will see key Asian leaders and Russian President Vladimir Putin later this week. North Korea was already expected to be a main subject for meetings on the sidelines of the summit of Group of 20 developed and undeveloped nations, but the test adds urgency to a widening U.S. campaign aimed at further isolating North Korea.

The day after the launch, the U.S. Army and the South Korean military conducted a missile exercise in response to “North Korea’s destabilizing and unlawful actions,” U.S. Pacific Command said in a statement. It was unclear how Pyongyang might react to the exercise, which launched missiles into South Korean territorial waters along the country’s eastern coastline.

Trump responded to the North Korean missile test by applying rhetorical pressure on China, the North’s ally and economic lifeline, and by mocking dictator Kim Jong Un on Twitter.

“North Korea has just launched another missile. Does this guy have anything better to do with his life?” Trump tweeted shortly after the launch.

“Hard to believe that South Korea and Japan will put up with this much longer,” Trump continued. “Perhaps China will put a heavy move on North Korea and end this nonsense once and for all!”

The launch followed a string of recent actions by Pyongyang, including a salvo of missiles last month and three tests in May. Kim has now launched more missiles in one year than his father and predecessor in the family dynasty did in 17 years in power. North Korea has conducted five nuclear weapons tests since 2006, including two last year.

advertisement | advertise on newsday

The number and variety of tests worry experts who see each step as part of a march toward a missile capable of striking America’s West Coast.

The missile tests violate existing United Nations and other sanctions, which North Korea has found ways to evade. Although Trump and Secretary of State Rex Tillerson have said the “era of strategic patience” with North Korea is over, the new U.S. administration has not spelled out what that means.

Tillerson has said Washington might eventually negotiate with North Korea under the right circumstances, but he has suggested that possibility is remote. The United States will act alone if it must, he has warned, though he has not spelled out what exactly that would entail.

Leaders of China, South Korea and Japan will be at this week’s G20 summit in Germany.

In a news conference, Geng Shuang, a spokesman for China’s Foreign Ministry, condemned the test but countered that Beijing had “spared no effort.”

On Tuesday, Russia and China jointly proposed that North Korea put further nuclear and missile tests on hold while the United States and ally South Korea refrain from large-scale military exercises. Both Russia and China oppose North Korea’s nuclear weapons program. Both also oppose the U.S. antimissile system being installed in South Korea.