WASHINGTON — America's top diplomat stepped back Friday from his offer of unconditional talks with North Korea, telling world powers the nuclear-armed nation must earn the right to negotiate with the United States.

Secretary of State Rex Tillerson's declaration before the U.N. Security Council marked a stunning reversal after he proposed discussions with Pyongyang without preconditions earlier this week. That overture was almost immediately rebutted by White House officials.

Still, Tillerson had planned to reiterate his call at a special U.N. ministerial meeting on North Korea at the council Friday morning. His prepared remarks suggested only that North Korea would have to undertake a sustained halt in its threatening behavior before talks could begin. But Tillerson changed the script.

"North Korea must earn its way back to the table," Tillerson told the foreign ministers. "The pressure campaign must and will continue until denuclearization is achieved. We will in the meantime keep our channels of communication open."

The debate over offering North Korea unconditional talks reflects the differences within the Trump administration as it runs out of time to prevent North Korea from perfecting a nuclear-tipped missile that can strike the U.S. mainland. President Donald Trump hasvowed to prevent such capability, with military action if necessary.

Related: U.S. joint drills simulate attack targeting North Korea missiles

So far, U.S.-led sanctions on North Korea and diplomatic isolation haven't compelled Kim Jong Un's government to stop its nuclear and missile tests, or to seek negotiations.

Asked Friday if he supported unconditional talks, Trump did not answer directly.

"Well, we're going to see what happens with North Korea. We have a lot of support. There are a lot of nations that agree with us — almost everybody," Trump told reporters. He credited China — which accounts for about 90 percent of North Korea's external trade — with helping on pressuring North Korea, while Russia was not.

"We'd like to have Russia's help — very important," said Trump. He raised it in a Thursday phone call with Russian President Vladimir Putin.

On the issue of starting talks with North Korea, Tillerson's tone was significantly different from three days earlier.

On Tuesday, Tillerson said at the Atlantic Council think tank in Washington that "we are ready to have the first meeting without preconditions." He had also called it "unrealistic" to expect North Korea to enter talks ready to relinquish a weapons of mass destruction program it invested so much in developing, although that remained the ultimate goal.

The White House quickly distanced itself from Tillerson's remarks. On Wednesday, a National Security Council spokesperson said North Korea must not only first refrain from provocations but take "sincere and meaningful actions toward denuclearization" for talks to happen. The spokesperson, who was not authorized to be quoted by name and requested anonymity, said that given North Korea's most recent missile test, now was not the time for talks.

Tillerson and Trump have appeared to clash before on North Korea, amid questions about the former ExxonMobil executive's future as top diplomat. In October, Trump said Tillerson was "wasting his time" trying to negotiate with the North. Trump's tweet followed Tillerson's talk about Washington maintaining back-channel communications with Pyongyang.

Related: Trump's North Korea policy could trigger famine, experts warn

Asked Friday if he and Trump were on the same page, Tillerson denied they were at odds: "The president's policy on North Korea is quite clear and there's no daylight at all between the president's policy and the pursuit of that policy."

He said U.S. communication channels with North Korea remain open and the North knows that.

"They know where the door is. They know where to walk through that door when they want to talk," he told reporters.

North Korea's U.N. ambassador, Ja Song Nam, did not mention the possibility of talks with the U.S. in his very rare appearance before the Security Council on Friday. He said its possession of nuclear weapons was self-defense against "U.S. nuclear threat and blackmail."

Tillerson called on China and Russia to go beyond U.N.-mandated economic sanctions imposed on North Korea over its nuclear and missile tests. He said North Korean laborers were toiling in "slave-like conditions" in Russia for wages used to fund nuclear weapons, while China was still allowing crude oil to flow into North Korean refineries.

Russia's U.N. ambassador, Vassily Nebenzia, said North Korean workers in Russia were guaranteed their rights, and he questioned U.S. commitment to a peaceful resolution of the crisis. China's deputy U.N. ambassador, Wu Haitao, called for early resumption of dialogue, saying "the parties concerned should move towards each other" instead of directing blame.

North Korea has conducted more than 20 ballistic missile tests during 2017 and its most powerful nuclear explosion to date. Its more recent missile test in late November fired a projectile that experts say could carry a nuclear warhead to the U.S. Eastern Seaboard.

Tillerson said the North's growing capabilities were a "direct threat to our security and the security of the entire world. We do not regard this claim as an empty threat."

He said the U.S. does not want war, but "will use all necessary measures to defend itself against North Korean aggression." He said "our hope remains that diplomacy will produce a resolution."