WASHINGTON — At the start of Donald Trump’s presidency, American intelligence agencies told the new administration that while North Korea had built the bomb, there was still ample time — upward of four years — to slow or stop its development of a missile capable of hitting an American city with a nuclear warhead.

The North’s young leader, Kim Jong-un, faced a range of troubles, they assured the new administration, giving Mr. Trump time to explore negotiations or pursue countermeasures. One official who participated in the early policy reviews said estimates suggested Mr. Kim would be unable to strike the continental United States until 2020, perhaps even 2022.

Mr. Kim tested eight intermediate-range missiles in 2016, but seven blew up on the pad or shattered in flight — which some officials attributed partly to an American sabotage program accelerated by President Barack Obama. And while the North had carried out five underground atomic tests, the intelligence community estimated that it remained years away from developing a more powerful type of weapon known as a hydrogen bomb.

Within months, those comforting assessments looked wildly out of date.

At a speed that caught American intelligence officials off guard, Mr. Kim rolled out new missile technology — based on a decades-old Soviet engine design, apparently developed in a parallel program — and in quick succession demonstrated ranges that could reach Guam, then the West Coast, then Washington.