THE SANDINISTAS once hoped to legitimize their rule by elections, but those they are running Sunday, five years after taking power, will resolve nothing. Their Marxist-Leninist side showed through, and the democratic opposition, faced with a measure of harassment that prevented fair campaigning, withdrew. Theoretically, the Sandinistas could still do the right thing and postpone the elections, but the greater likelihood is that they will miss this chance to use the vote to start accommodating their opposition and to gain Nicaragua a more secure place in the world.

But this is not the end of the line. In particular, the idea of Nicaraguan reconciliation must be kept alive. If Managua has kicked away one good opportunity to start settling political differences by American-style elections, it has not yet forfeited the possibilities of conducting a Nicaraguan-style "dialogue" aimed at ending the nation's civil war and rebuilding its national life. It is a long shot, but Nicaragua remains a besieged, divided and nearly broke country, and even in Managua there may be some political space open and some pragmatic currents running. No responsible Latin or European government will throw up its hands and accept Managua's mock vote Sunday as the last word.

The United States has its own Nicaraguan choices. It seems likely that, no matter who is elected president on Nov. 6, the CIA will no longer be available as a major instrument of American policy, although the Nicaraguan insurgency may somehow carry on for a time. Nor does it seem likely that the president elected on Nov. 6 will be able to mount an American military operation, notwithstanding the Sandinistas' expressed fears of a second Reagan term.

American pressure has had a visible if modest moderating impact on Sandinista militancy. Still, there were always good reasons, historical and political, for the United States not to rely on a policy of force in dealing with Nicaragua. In any event, this country has other options open. A battered but durable process of inter-American diplomacy continues in the Contadora group. Few would claim that the United States has made good use of all the conventional economic and political carrots and sticks available to it.

Meanwhile, Americans have a continuing obligation to help El Salvador tame the guerrilla challenge launched there with crucial Nicaraguan aid, to nurse the fledgling negotiation opened just a few weeks ago in El Salvador, and to keep underlining the central requirement to resolve all political disputes in the region peacefully.