North Korea's nuclear test this week (see page 610) is alarming for two reasons: the volatile nature of the nation that has just barged its way into the nuclear-weapons club, and the accompanying sense that the international anti-proliferation regime is slowly unravelling before our eyes.

There is precious little that can be done about the former. However, the enfeebled state of the anti-proliferation regime — ultimately, an even greater threat than the existence of a North Korean weapon — is a problem that can at least be addressed, if the will to do so exists.

It must be fervently hoped that the challenge posed by North Korea will provide the political impetus needed to strengthen anti-proliferation agreements. Further erosion would leave us with a nuclear free-for-all and, ultimately, facing the kind of grim apocalypse seldom contemplated since the end of the cold war.

International treaties concerning nuclear weapons are not particularly sexy or exotic; they are complex and arcane. In our 24-hour news cycle, their advocates are liable to be drowned out by those with shriller voices. That has already happened to a troubling degree in the United States. It is so much easier to call for the bombing of Iranian bunkers, for example, than to argue for the Comprehensive Nuclear Test Ban Treaty (CTBT) to be brought back before the US Senate for ratification.

What good would this piece of paper do, the detractors cry, when faced with the ambitions of North Korea or Iran? It would be fanciful to claim that the existence of any non-proliferation treaty would have halted the North Korean test. However, even a regime such as Kim Jong-il's is not entirely beyond the reach of such documents — North Korea withdrew from the nuclear Non-Proliferation Treaty (NPT) in 2003, before conducting its test.

The best that a set of nuclear-weapons treaties could do in the face of North Korea's ardour is provide a moral and legal framework that allows the rest of the world to pinpoint, criticize and punish the tester with unanimity and conviction. But such a framework would not prevent a test, any more than the enactment of common law prevents every murder.

The 1970 non-proliferation treaty — the main foundation of the tattered anti-proliferation regime — was constructed with the direct involvement of weapons scientists in the United States and the former Soviet Union. These individuals saw clearly the unique moral and military danger of nuclear weapons and, noting the lack of the necessary technical knowledge in diplomatic or other official circles, took it upon themselves to confront it.

It is imperative that scientists rally to repair years of vandalism inflicted on international anti-proliferation efforts.

Even today, expertise in disarmament and anti-proliferation issues lies chiefly with scientists working at the nuclear-weapons laboratories, with think-tanks or in government. They have looked on aghast as disarmament sceptics around the world have scorned the value of international treaties, rubbished the CTBT on specious technical grounds, and even blamed the alleged toothlessness of the NPT for the gradual spread of nuclear weapons to India, Pakistan and now North Korea. Just as worryingly, the issue of what to do with the arsenals of the existing nuclear-weapons states has slipped off the political agenda.

This week's events are the culmination of an appalling decade that has seen India and then Pakistan carry out nuclear tests with scant punishment. The NPT has languished in the absence of agreement on how to modernize it (see Nature 435, 132–133; 2005), and the CTBT has been sidelined. These developments serve to undermine the already faint possibility of a coordinated response to the North Korean test by the United States, China (the two big players in this case) and the rest of the world.

It is imperative that scientists and others with relevant knowledge of nuclear weapons redouble their efforts, and rally to repair years of vandalism inflicted on international anti-proliferation efforts. The goal is to build a treaty structure that will help contain the spread of nuclear weapons, eventually laying the groundwork for their international control and subsequent elimination. That must be the way forward — the alternative is despair.