Ambassador Nikki Haley used the threat of a U.S. invasion of North Korea to secure a new round of sanctions against the regime last year, according to a new report.

Harper’s Magazine reported that Haley raised the possibility of a U.S. invasion by telling a Chinese diplomat, “My boss is kind of unpredictable, and I don’t know what he’ll do."

Haley recalled making those comments during remarks at a small gathering of people at the Council for National Policy, and as part of her effort to discourage China from vetoing additional oil sanctions on North Korea last September, following the regime’s detonation of a nuclear bomb. Her remarks shed light on how the prospect of a U.S. strike on the Korean Peninsula helped broker a compromise between Haley’s initial call for a total oil embargo of the regime and the more modest cut the Security Council eventually passed.

“I tell the president, ‘I do this all the time,’” Haley said. “And he totally gets it.”

The September debate came at an important time for President Trump’s “maximum pressure” campaign to use sanctions to force North Korean dictator Kim Jong Un to agree to dismantle his nuclear weapons program. North Korea had detonated a nuclear bomb and launched a missile that flew over Japan in the weeks prior; western powers wanted to impose a crippling oil embargo in response, but China and Russia resisted that effort.

"[T]he situation on the Korean Peninsula cannot be resolved with sanctions and pressure only," Russian President Vladimir Putin said at the time. "We do not need to react emotionally and corner North Korea into a dead end."

Haley, who called the tests a slap in the face from North Korea, pushed both sides to agree at least to some new sanctions. Her hint that Trump could order an attack on North Korea perhaps gained force due to the president’s “fire and fury” rhetoric just weeks earlier.

“I said to the Russians, ‘Either you’re with North Korea, or you’re with the United States of America,’” Harper’s quoted Haley.

The diplomats compromised by agreeing to a sanctions package that would limit North Korea’s ability to import oil, rather than end it entirely. Under the new resolution, the regime’s energy imports would be capped at 500,000 barrels annually, with the understanding that an automatic oil embargo would be take effect if the Security Council found that North Korea had breached that cap.

"We are done trying to prod the regime to do the right thing,” Haley said during a council meeting. “We are now acting to stop it from having the ability to do the wrong thing."

The implementation of those sanctions have proven controversial, however. In July, Haley accused China and Russia of selling North Korea more oil than permissible under the sanctions; the countries also have blocked U.N. assessments that North Korea has breached the cap.

“Groundless and irresponsible accusations will not help resolve the Peninsula nuclear issue,” Chinese Foreign Ministry spokeswoman Hua Chunying replied dismissively. “We hope the U.S. could respect facts.”

That ongoing dispute might suggest how Trump’s historic summit with the North Korean dictator has changed the diplomatic landscape for sanctions. U.S. officials hail progress with North Korean negotiators, but China and Russia also have less reason to fear an abrupt military strike from the United States.

“It's really impossible for us to get back to preventive war talk,” Sue Mi Terry, a former top U.S. intelligence official for North Korea, told the Washington Examiner in the run-up to the June summit. “How can we do that absent North Korean provocation?”