While world attention has been focused on the struggle for democracy in Nicaragua, another difficult and important transition from dictatorship to free elections is under way in Surinam, the former Dutch colony on South America's Atlantic coast.

Governing this small, polyglot nation of 400,000 has proved far more difficult than Lt. Col. Desi Bouterse expected when he seized power in 1980 -- so difficult in fact that Bouterse reluctantly agreed to hold national elections and to respect their verdict.

Maintaining control looked a lot easier to Bouterse in 1980, when, with a little help from his Cuban friends and fellow sergeants, he overthrew Surinam's elected government and announced establishment of a new ''revolutionary'' regime. Although the early arrival of 100 Cubans and several dozen Libyans disquieted some of Surinam's citizens, and the onset of repression disturbed others, Bouterse's government remained fairly popular until December 1982, when he ordered the summary executions of about 15 of Surinam's most influential citizens, including the leaders of its democratic political parties and trade unions.

Almost immediately, Bouterse's problems multiplied. The Netherlands cut off economic aid. Brazil and France (still the colonial power in neighboring French Guyana) signaled their disapproval. Prices rose and so did the opposition. Leading citizens went into exile in increasing numbers and worked against the regime. Fear spread until it touched Bouterse himself.

Grenada was especially upsetting for him. The murder of Maurice Bishop and his ministers by more ''developed'' revolutionaries dramatized what could happen to a ''revolutionary'' leader who did not fully satisfy his allies. Bouterse's relations with his Cuban advisers were close, and he was responsive to their counsel, which included various indications that they might prefer a more politically ''developed'' comrade.

Meanwhile, the United States/OECS landing in Grenada dramatized what could happen to a small country that seriously offended the Anglo-Saxons. In an effort to deal with both these problems, Bouterse requested that most of the Cubans leave. Libyans, seeking to take their place, offered more increased political and financial help to Surinam, as they had to Nicaragua, Lebanon, and several Caribbean and South Pacific islands.

But Bouterse needed more help than the Libyans could provide.

With the cutoff of Dutch aid and a sharp decline in the world price of bauxite (Surinam's principal export), economic problems multiplied. Scarcity of vital goods developed and prices soared. Black markets and corruption were (and are) endemic. Subsidized foodstuffs, available once a week with a ration card, were not sufficient to nourish a family. The fact that Surinam had enjoyed the highest per-capita income in South America ($3,363 in 1980), only made the economic difficulties harder for residents to bear.

In response, the government relied more and more on violence. Its harsh repression of the minority bushnegroe population attracted worldwide attention and stimulated an armed insurgency. These ''jungle commandos,'' led by former sergeant Ronnie Brunswick, inflicted several defeats on government troops. The ensuing violence caused more villagers to flee across the border into French Guyana.

Confronted with growing difficulties, Bouterse -- the man who had overthrown Surinam's elected government -- began to define his mission as ''returning the country to democracy.'' Indeed, the new constitution adopted by referendum last year provides that the armed forces have the responsibility to ensure a ''peaceful transition to a democratic and just society.''

The prospects for a return to democracy in Surinam were improved by the country's previous experience with democratic government under Dutch rule and during the five years between independence (in 1975) and Bouterse's coup. Surinam's traditional political parties organized themselves for the Nov. 25 election of a new national assembly and a dozen democracies -- including Barbados, Belgium, West Germany, Trinidad and Tobago, Venezuela, the Netherlands, the European Community and the United States -- sent observers to watch the balloting.

It seemed clear to all observers throughout the electoral campaign that the coalition of opposition parties (known as TALU) would win the two-thirds majority needed to choose a new president.

It was far less clear whether Bouterse and his colleagues would actually relinquish power, though Bouterse himself has repeatedly stated his intention to respect the verdict of the voters. Fresh doubts about these intentions arose last week when, in a marathon session lasting 12 hours, a bare quorum of the current legislature adopted laws giving the armed forces powers far beyond those granted by the new constitution.

We will have to wait and see what Bouterse, his military forces and his armed militia actually intend. Should the military rulers of Surinam relinquish the power they have exercised for eight years and keep their promises of democracy, they would make a great role model for the Sandinistas.