By Gordon Corera
BBC security correspondent
A year ago, Libya shocked the world by announcing it was abandoning a secret programme to build a nuclear bomb, a programme few were even aware of.
Libya's declaration may have taken much of the world by surprise, but not the tiny circle of people in London and Washington who were privy to some of their nation's most closely held secrets.
AQ Khan was the architect of Pakistan's nuclear deterrent
It is now clear that for more than a decade, British and American intelligence had been picking up clues that one of their worst nightmares could be true - someone was selling "off-the-shelf" nuclear weapons technology.
The finger pointed to a clandestine network run by AQ Khan, the father of the Pakistani nuclear programme and a man former CIA director George Tenet has described as being at least as dangerous as Osama Bin Laden.
Details are only now emerging about how the network was broken - and what questions still remain unanswered.
In one of their most sensitive operations, Britain's Secret Intelligence Service and America's CIA decided to infiltrate Khan's circle in the late 1990s.
They used a number of operations, including placing one of their own officers inside the network.
Along with other sources, including work by Britain's GCHQ, this made it possible to piece together Khan's clients, front companies, finances and manufacturing plants, long before the Libyan deal.
On Britain's Joint Intelligence Committee, alarm bells were ringing by early 2000, as the intelligence made it clear that Khan had built a global network supplying designs and mass-producing components for nuclear weapons.
In Washington, some in the intelligence community wanted to pursue covert operations to disrupt Khan, such as sabotaging his production or transport.
But some diplomats feared the consequences of this and wanted to make public the intelligence, in order to pressure foreign governments to shut down the network immediately.
But others in the intelligence community feared this could endanger intelligence sources.
The decision was taken to wait and collect more information.
Some experts are critical of that delay, concerned that it may have allowed the spread of some nuclear technology which the spies didn't know about.
But Libya's offer to disarm, which came initially in March 2003, provided the opportunity to shift from a secret intelligence-gathering operation to public action.
It offered a way in which sensitive information could be made public and then passed on to international bodies like the International Atomic Energy Agency, as well as governments in whose jurisdiction the Khan network was operating
The intelligence from the spies also allowed officials to make sure that Libya really was coming clean in every detail, although the long negotiations also delayed action against Khan.
Since the Khan network was outed, there have been a wave of arrests and seizures around the globe, from South Africa to Malaysia to Turkey.
And officials say that while they have stopped the network operating, there are a still a large number of active investigations into those who supplied Khan - some of whom may have known what they were doing, while others may not.
There are still some questions unanswered.
Iran's latest ballistic missiles have a range of at least 2,000km
A recent CIA report stated that "Iran's nuclear programme received significant assistance" from Khan.
Officials point to the close similarities between what Khan gave to Libya and what he gave to Iran, and ask why the Iranian deal would have been so different from the Libyan deal - in which weapons plans were passed on.
If that was the case, it would be proof that Iran was seeking nuclear weapons - and not just nuclear power, as it claims.
The exact nature of transactions with North Korea also remains unclear.
Another problem is that while Khan himself has publicly confessed and is under "house arrest", international investigators have not been able to talk to him.
That is particularly worrying, because the order books don't add up.
Three countries - Iran, Libya and North Korea - are known to have been customers.
But some believe there was also a fourth country.
There is also the fear that this could happen again. The rewards for proliferators are potentially huge - at one point a Khan middleman was handed a pair of briefcases stuffed with $3m.
From time to time, intelligence agencies pick up indications of people in the market looking for illicit equipment.
Khan is still regarded as a hero by many in Pakistan
Criminal networks could exploit this dark underbelly of globalisation, argues David Landsman, head of counter-proliferation at the Foreign Office.
"There may never be another AQ Khan network quite like this one, but equally it would be very surprising if there weren't some criminals or potential criminals out there looking to take advantage of this kind of trade again in the future."
It is questionable whether Khan himself - as well as some of his key associates - have yet paid a heavy enough price for their activities to deter others.
And for all its successes, the Khan story makes clear that it may be easier than previously thought to acquire nuclear weapons.
As the expertise and technology involved becomes more and more dispersed, the world may be moving closer to a tipping point in which building a nuclear bomb is no long the closely-held secret of the few.