IN A NOTABLE contribution to the world's safety, the presidents of Argentina and Brazil have committed themselves to nuclear cooperation. Since each of those countries in the past has viewed the other as the chief threat justifying the pursuit of nuclear weapons, this joint declaration offers reassurance to the whole continent and beyond.

Both countries have the industrial capacity to develop nuclear weapons and both -- but particularly Argentina -- have in recent years engaged in activities hinting that they were actively contemplating that goal. Both operate nuclear facilities that are not under international safeguards. If their cooperation reaches "all fields of the peaceful uses of nuclear energy," as the two presidents promised, it will provide both with the best possible assurance that neither is diverting its research to military purposes.

The swing from military government to civilian democracy in these two countries had diminished the likelihood that either would build nuclear weapons -- but not entirely eliminated it. In Argentina, President Raul Alfonsin repeatedly appeared to be having trouble keeping the nuclear program under control. In Brazil, President Jose Sarney's views on the subject were not known. Their statement, issued after their recent meeting, strongly affirms their intention of pursuing only the peaceful uses of this technology.

This assurance is particularly important because both countries are emerging as suppliers and exporters of nuclear equipment. The two, for example, signed nuclear cooperation agreements last year with China. The dissemination of this technology can no longer be controlled by a small number of advanced industrial countries meeting in London.

What about the even more dangerous nuclear rivalry now under way in South Asia? Circumstances there are less promising than in Latin America, but not hopeless. The president of Pakistan and the prime minister of India met on Dec. 17 to discuss, among other things, nuclear policy. Unlike the Latin countries, one of these rivals, India, has already exploded a nuclear bomb. Both have neighbors, the Soviet Union and China, that are heavily armed. But at least Pakistan and India are now talking, and their leaders announced that they have agreed not to attack one another's nuclear sites. While that is far from a full-scale settlement, it is more than they have had in the past and suggests possibilities for further easing of tensions in the future.

A few years ago cooperation between Brazil and Argentina would also have seemed pretty unlikely. The two Latin presidents have demonstrated that there is no inevitable drift toward more nuclear weapons in more hands. In nuclear arms control, the failures are generally much more dramatic than the successes. But there have been genuine successes, and the Argentine-Brazilian declaration is one of them.