THE REASON the end game in Nicaragua is so excruciating is that, in the struggle between President Somoza and the Sandinistas, the moderates were wiped out as an independent political force. Earlier they might have asserted a strong role in a transition to democracy, but that time passed months ago. This was the real failing of American, and interAmerican, diplomacy. In policy, as distinguished from sometime rhetoric, the hemisphere did not identify Somoza's continuation in power as the essence of the problem until it was too late to ensure an ending by political means. The moderates lack the strength that would give them a separate voice in the end game.

It was to remedy this deficiency that the United States last month proposed that the Organization of American States send a "peace force." The other members saw in it a form of intervention that was unwelcome for several reasons, and it never got off the ground. The failure increased the dismay of American diplomats over the prospect that in the event of Somoza's fall the only military power in the country would be the Sandinistas, and they suggested that a purged National Guard should be part of the post-Somoza scene.This was a lame idea. The National Guard is universally regarded as Somoza's personal band, and it is widely hated. The proposal is central to the American stratedgy of engulfing the Sandinistas in a broader political grouping, and it has only fed the Sandinistas' overwronght suspicion that Washington will do anything to foil popular rule.

An alternative is open to the United States: to join with Mexico, Venezuela, Costa Rica and the other more-or-less democratic countries of Latin America in accepting the Sandinistas as the likely winners, and to use the embrace to hold them to the democratic standards they profess. There is risk in this course for a country like the United States, whose domestic politics and international responsibilities do not give it the airy freedom that countries like Mexico have to dismiss the possibility of a "second Cuba" with a wave of the hand. But there is good sense, too.

Nicaragua is small and devastated and contiguous to other Latin countries -- all conditions tending to open it to close relations with them. Its need for vast economic repair ensures a respect for its neighbors' anti-Communist political sensitivities. It is inconceivable, moreover, that Moscow will take on another billion-dollar baby. It is not necessary to believe that the Sandinistas will turn out to be democratic, or to fear that they will be Castroite, to see the value of joining the Latin democratic mainstream.