Recent Chinese estimates of North Korea’s nuclear-weapons capabilities should have shattered our complacency about Pyongyang’s proliferation threat.

Moreover, given the ongoing negotiations over Iran’s nuclear program, Tehran’s longstanding, close working relationship with Pyongyang should also have rung alarm bells around the world.

Instead, the revelation that the North might already possess 20 nuclear warheads, and could double that in 2016, quickly sank from view.

While both the media and US intelligence agencies face enormous obstacles in covering North Korea, China’s estimates of Pyongyang’s nuclear infrastructure, especially its uranium-enrichment capacity, nonetheless compel our attention.

Beijing’s judgment may be imperfect, but its enormous presence and influence in the North make it far likelier to be accurate than US, Japanese or South Korean estimates.

North Korea’s sizeable nuclear arsenal imperils East Asia — particularly, Tokyo and Seoul — but also the United States. Its ballistic-missile program is rapidly nearing the capability of reaching our West Coast.

And the North’s deep poverty gives it every incentive to sell virtually any weapons or technology to anyone with hard currency, including terrorists or other rogue states.

Besides being one of the planet’s poorest, most isolated, most repressed countries, the North has been under comprehensive American sanctions since the Korean War and extensive UN sanctions since 2006, when it resumed ballistic-missile launches and first tested a nuclear device.

None of this prevented Pyongyang from progressing to the threatening levels China now assesses.

This alone should warn us that the less-comprehensive, less well-enforced sanctions against Iran could never compel it to renounce its 30-year quest for deliverable nuclear weapons. If North Korea, perennially on the brink of starvation, can become a nuclear power, Iran can easily match its fellow rogue state.

China’s new estimates should thereby compel a critical re-evaluation of the talks among Iran and the Security Council’s permanent members (and Germany).

A deal blocking Iran from proceeding quickly to nuclear weapons, whatever its specific terms, rests on two critical assumptions:

First, the United States and others must have essentially full knowledge about the current status of Iran’s nuclear and ballistic-missile programs.

Without such a “baseline” assessment, we cannot possibly judge the likely efficacy of a counter-proliferation agreement. If you don’t know where you start, you can hardly judge the sufficiency of the measures agreed to.

Second, following the baseline assessment, Iran must either be fully transparent about its nuclear and missile programs, or a combination of international inspectors and our intelligence agencies must be able to provide the facts necessary to detect and respond to Iranian violations.

Neither of these fundamental preconditions exists in the April 2 “framework.” This defect alone should be central to the debate if a “final” deal is ever reached.

China’s new estimates underscore another key deficiency in the “framework” with Iran: It fails to consider Iran’s facilitators beyond its borders.

Dealings with other rogue states (or private efforts like A.Q. Khan’s former bazaar of uranium-enrichment technology and weapons designs) increase the difficulty of monitoring and stopping Tehran from becoming a nuclear state.

Tehran and Pyongyang have cooperated on ballistic missiles since at least 1998, when a missile launched from North Korea landed in the Pacific east of Japan.

The outraged Japanese public reaction in effect forced North Korea to declare a moratorium on launch testing.

Pyongyang turned then (if not before) to Tehran to cooperate on missile development, not surprisingly since both countries relied on the same Soviet-era Scud missile technology. Cooperation continued even after the North resumed launch testing in 2006.

The Syrian nuclear reactor destroyed by Israel in 2007 was a clone of North Korea’s Yongbyon reactor and was being constructed under its supervision.

Given Syria’s limited economy, Iran may well have largely financed the project, for obvious reasons: What better place for Pyongyang and Tehran to hide illicit nuclear activities than outside their own territories?

Subsequently, numerous reports have emerged of Iranian and North Korean scientists exchanging visits and potentially valuable information.

What if Pyongyang is already hosting an extensive Iranian-enrichment program, deeply buried somewhere in its half of the peninsula? What if some of the estimated 20 warheads are actually Iran’s property, having been manufactured and now stored far from Tehran to avoid detection?

East Asian experts have long looked through a stovepipe at North Korea, and Middle East experts gaze through their own stovepipe at Iran.

Broader proliferation concerns should have caused wider inquiries earlier, but China’s ominous new estimates now require it. No Iran deal is acceptable until the North Korean connection is fully exposed and understood.

John Bolton was US ambassador to the United Nations from August 2005 to December 2006.