American and Japanese flags in front of a monitor showing a news broadcast of North Korea's missile launch in Tokyo, Japan, on Sept. 15, 2015.

CIA Director Mike Pompeo said Thursday that North Korea is months away from perfecting its nuclear weapons capabilities.

"They are close enough now in their capabilities that from a U.S. policy perspective we ought to behave as if we are on the cusp of them achieving" their objective of being able to strike the United States, Pompeo told a national security forum in Washington.

But he said there's a difference between having the ability to fire a single nuclear missile and the capability of producing large amounts of fissile material and developing an arsenal of such weapons.

Speaking later at the same event, National Security Adviser H.R. McMaster said, "We are in a race to resolve this short of military action."

"We are not out of time," he told the forum, organized by the Foundation for Defense of Democracies think tank. "But we are running out of time."

North Korea, which started its nuclear program decades ago, has accelerated its weapons tests. Twice in July, it launched a long-range missile that could potentially reach the U.S. mainland. In September, it conducted its most powerful atomic explosion yet.