WASHINGTON — The world is warning North Korea against going ahead with its third nuclear test, but inside the American intelligence community, some officials are quietly hoping it happens. A test could give them their first real view in years into whether the North has made significant progress toward a weapon that could threaten the United States or its allies.

Since the North’s last test, in 2009, during President Obama’s first months in office, the United States has lost much of its visibility into what a former senior intelligence official says is on the cusp of becoming a “runaway program.”

Inspectors have been ejected from the country, and new facilities to make nuclear fuel have appeared. And after the North warned last week that it would now conduct a “higher level” test “targeted” at the United States, Kurt M. Campbell, the assistant secretary of state for East Asia, conceded that “we don’t know the kind of test that is anticipated.”

Now the hope is that an underground blast will answer several mysteries. Can the North Koreans produce a bomb out of uranium — a program they invited a visiting American nuclear scientist to glimpse two years ago — as well as the plutonium bombs that they exploded in 2006 and 2009? Can they make a warhead small enough to fit atop one of the long-range missiles they successfully tested last month?