OF COURSE PAKISTAN should be sold American arms. It's a longtime friend, it's in plenty of trouble on account of the Soviet occupation of Afghanistan next door, and it labors under awesome domestic strains. If that were all, no one could quibble about the administration's plan to resume arms sales and aid, which were interrupted a few years ago on account of Pakistan's clandestine nuclear program. Nor is the sum of the proposed aid outlandish: something more than a half-billion dollars a year for five years.

Pakistan is still following the nuclear path. A test of what would doubtless be called a peaceful nuclear device--the euphemism India used for its explosion in 1974--could come soon. But the administration argues that the general feeling of security that renewed American warmth and weaponry bestow on Pakistan is more likely than any specific sanction to dull its nuclear appetite. The new proposition is dubious but, plainly, the old policy didn't work. The Pakistanis insist they have only a peaceful program. They also insist they have given the United States no undertakings about a nuclear explosion. The foreign minister adds: "But we understand and we have taken note of (American) concern. So if we decide to carry out an explosion then we would be prepared to forgo this (arms and aid) program." Would Mr. Reagan cut it off?

If there is reason to pick up a military and aid relationship, however, there is reason to shape that relationship in a particular way. The administration's policy ignores a couple of basic considerations. First, it should keep a visible political distance from President Zia, who has imposed the sort of surface tranquillity that has been the lull before the storm for many a Third World military strongman before him. His position, not legitimized by law or popular consent, is too unpredictable.

Second, the types of arms furnished should indicate clearly which Pakistani purpose the United States supports--not competition with India but defense of its Afghan border against Soviet incursions. That should mean no F16s, a superhot attack plane; regrettably, the administration intends to sell Pakistan 40. Nor should the administration, in its ardor for Zia and its virtually open disdain for India, put too much stock in the winks of strategic cooperation it evidently is getting from Islamabad--winks denied by its public words and by Pakistani realities. It invites trouble to count on making Pakistan a major strategic partner. It is enough to help a friend.