WASHINGTON (AP) — President Donald Trump said Wednesday that “talking is not the answer” to North Korea, after it upped the stakes in its standoff with Washington by calling for more weapons launches in the Pacific.

But his comment contradicted statements from his Cabinet officials and was likely to deepen confusion over his administration’s policy on the nuclear threat from Pyongyang. Defense Secretary Jim Mattis on Wednesday told reporters, “We’re never out of diplomatic solutions,” and Secretary of State Rex Tillerson had hinted at possible direct talks with North Korea.

Trump’s tweet returned to a familiar theme: the failings of past U.S. administrations to halt North Korea’s weapons development over the past quarter-century. The North last month tested for the first time a long-range missile, putting it closer to its goal of posing a direct nuclear threat to the U.S. mainland.

“The U.S. has been talking to North Korea, and paying them extortion money, for 25 years. Talking is not the answer!” Trump said.

Trump’s tweet did not spell out what he meant by “extortion.” The White House did not immediately respond to questions.

North Korea has in the past temporarily halted nuclear development when the U.S. and others provided food aid or other types of compensation. According to the Congressional Research Service, between 1995 and 2008, the United States provided North Korea with more than $1.3 billion in assistance: slightly more than 50 percent for food aid and about 40 percent for energy assistance. But since early 2009, the U.S. has provided virtually no aid to North Korea. The last formal talks between the two sides on the North’s nuclear program were in 2012.

The North hasn’t made demands for aid, at least publicly, since Trump came into office. Instead, it has focused on finishing its decades-long effort to master the technology for fitting a nuclear warhead on a missile that can strike the U.S., which it views as essential for its national defense.

Trump’s assessment about the need for dialogue also appears at odds with his top diplomat, Secretary of State Rex Tillerson, who had in recent weeks been softening the conditions for a possible, formal dialogue with Pyongyang. The U.S. also has been maintaining a diplomatic back channel with North Korea.

At the Pentagon, during a photo opportunity with his South Korean counterpart, Mattis said the U.S. remains focused on diplomacy as well as military readiness. Amid the heightened tensions on the divided Korean Peninsula, the U.S. and South Korea have been conducting annual military drills.

“We continue to work together. The minister and I share a responsibility to provide for the protection of our nations, our populations, our interests, which is what we are here to discuss today,” Mattis said.

On Wednesday, North Korean leader Kim Jong Un called for more weapons launches targeting the Pacific Ocean to advance his country’s ability to contain Guam, state media said. The U.S. territory is home to key U.S. military bases that North Korea finds threatening.

The Korean Central News Agency said the launch that overflew Japan was of an intermediate-range Hwasong-12 missile, which the North first successfully tested in May and threatened to fire into waters near Guam earlier this month. It described the launch as a “muscle-flexing” countermeasure to the U.S.-South Korean military drills that conclude Thursday.

Trump offered a surprisingly subdued response to Pyongyang’s latest missile test, avoiding a repeat of his bombastic warnings earlier this month of a potential military confrontation. In a terse written statement Tuesday, Trump said that, “All options are on the table” — a standard formulation signaling that Washington is not ruling out the use of military force.

For second time in two days, Trump spoke by phone Wednesday with Japanese Prime Minister Shinzo Abe about their “close cooperation” on efforts to address the launch, the White House said, without elaborating.

U.S. officials announced Wednesday morning that they had conducted a missile defense test that resulted in the successful intercept of a medium-range ballistic missile off the coast of Hawaii. The test was conducted by the Missile Defense Agency and U.S. Navy sailors.

“We are working closely with the fleet to develop this important new capability, and this was a key milestone in giving our Aegis BMD ships an enhanced capability to defeat ballistic missiles in their terminal phase,” Missile Defense Agency Director Lt. Gen. Sam Greaves said in a statement. “We will continue developing ballistic missile defense technologies to stay ahead of the threat as it evolves.”