To ASK WHO KILLED Pedro Joaquin Chamorro, dictator Anastasio Somoza's most implacable and distinguished foe, is to peel the onion of Nicaragua. Was it Gen. Somoza? It was, after all, the general's intent to pass to his son the power he inherited from his father that Mr. Chamorro was fighting through his newspaper, La Prensa -- and through a campaign to organize a "dialogue" with the dictator. The membership of both men in the Nicaraguan elite argues against this possibility. Gen. Somoza's habit of repression argues for it.

It could also be that Somoza military or business elements committed the murder. Their purpose: to provoke enough turbulence to justify restoring the state of siege that Gen. Somoza ended last September and thereby to terminate his risky and controversial policy of trying to assuage foreign critics by easing up on domestic ones.

Another hypothesis centers on the various guerrilla groups. One of them might have killed the reform-minded Chamorro to prevent his succession to the badly ailing Somoza and to bring on the deepening unrest in which a revolutionary group might come to power. Like the politicians, guerrillas have been trying to position themselves for the general's demise. They have counted on press accounts of their daring raids to spread the sense that they are the wave of the future. Perhaps they are; the children of the wellborn are prominent in their ranks. The temptation to accelerate the end game may have been strong.

The government has arrested four suspects, saying they were hired by an American whose plasma-exporting business was under La Prensa's fire; he had sued the paper for libel. But this is too quick and neat to satisfy most people, though Gen. Somoza's interest (which he denies) in the plasma business lends a superficial plausibility. Surely there is more to this murder than a press-v.-business dispute.

The larger fact is that at a crucial moment the Chamorro murder has dramatized for foreigners the lawlessness and political tension long known to Nicaraguans. The Somoza family has tried to run the politics and economy of the country as its personal preserve, cleverly co-opting supporters and brutally destroying opponents. Especially since the Carter administration came to office, Gen. Somoza has sought to convey that he is ready to start respecting international standards of fair play. Such is his family's 42-year record of corruption and injustice, however, that few Nicaraguans -- even among those with large debts to him --Whether the transition to the post-Somoza era will be violent or peaceful cannot be told. What can be said is that regardless of who killed him, Pedro Chamorro died a patriot's death.