WASHINGTON — Secretary of State Rex Tillerson says diplomatic efforts aimed at resolving the North Korean crisis “will continue until the first bomb drops.”

That statement comes despite President Donald Trump’s tweets a couple of weeks ago that his chief envoy was “wasting his time” trying to negotiate with “Little Rocket Man,” a mocking nickname Trump has given the nuclear-armed nation’s leader, Kim Jong Un.

“I think he does want to be clear with Kim Jong Un and that regime in North Korea that he has military preparations ready to go and he has those military options on the table. And we have spent substantial time actually perfecting those,” Tillerson told CNN’s “State of the Union” on Sunday. “But be clear: The president has also made clear to me that he wants this solved diplomatically. He’s not seeking to go to war.”

Recent mixed messaging from the top of the U.S. government has raised concerns about the potential for miscalculation amid the increasingly bellicose exchange of words by Trump and the North Korean leader.

Trump told the U.N. General Assembly last month that if the U.S. is “forced to defend itself or its allies, we will have no choice but to totally destroy North Korea.” Trump also tweeted that Korea’s leadership “won’t be around much longer” if it continued its provocations, a declaration that led the North’s foreign minister to assert that Trump had “declared war on our country.”

Tillerson acknowledged during a recent trip to Beijing that the Trump administration was keeping open direct channels of communications with North Korea and probing the North’s willingness to talk. He provided no elaboration about those channels or the substance of any discussions.

Soon after, Trump took to Twitter, saying he had told “our wonderful Secretary of State, that he is wasting his time trying to negotiate with Little Rocket Man … Save your energy Rex, we’ll do what has to be done!” Trump offered no further explanation, but he said all military options are on the table for dealing with North Korea’s nuclear and missile programs.

Analysts have speculated about whether the president and his top diplomat were playing “good cop, bad cop” with North Korea, and how China might interpret the confusing signals from Washington. Beijing is the North’s main trading partner, and the U.S. is counting on China to enforce U.N. sanctions.

“Rest assured that the Chinese are not confused in any way what the American policy towards North Korea (is) or what our actions and efforts are directed at,” Tillerson said.

Asked if Trump’s tweets undermined Tillerson, the secretary said: “I think what the president is doing is he’s trying to motivate action on a number of people’s part, in particular the regime in North Korea. I think he does want to be clear with Kim Jong Un and that regime in North Korea that he has military preparations ready to go and he has those military options on the table and we have spent substantial time perfecting those.”

He added that Trump “has made it clear to me to continue my diplomatic efforts, which we are, and I’ve told others those diplomatic efforts will continue until the first bomb drops.”

North Korea has launched missiles that potentially can strike the U.S. mainland and recently conducted its largest ever underground nuclear explosion. It has threatened to explode another nuclear bomb above the Pacific.