This country votes in nationwide elections Sunday after a three-month campaign that was neither the "genuinely free" contest promised by the ruling Sandinistas nor the "Soviet-style sham" suggested by the Reagan administration, in the view of diplomats and other political observers here.

The Sandinistas' near monopoly of most major institutions -- ranging from the Army and government ministries to neighborhood block organizations -- gave them an unrivaled network of activists already in place at the start of the campaign. Government trucks have carried the faithful to Sandinista rallies, and mobs of pro-Sandinista youths have disrupted at least half a dozen opposition rallies.

But even U.S. diplomats here acknowledged that the Sandinistas have allowed expression of a wide range of political views, including some that were harshly critical of the government. The Sandinistas eased censorship of the sole opposition newspaper, La Prensa, at the start of the campaign, and the state television and radio channels have given air time -- although limited -- for the small but vocal opposition parties to make their case.

Parties to the right of the Sandinistas have charged that the government is ruining the economy to finance the fight against U.S.-backed antigovernment guerrillas, while Marxist-Leninist groups have accused the Sandinistas of being too bourgeois.

The principal problem with the election, according to these U.S. officials, is that Nicaraguans cannot vote for the four parties most opposed to the government because those parties are boycotting the race. These officials' comments suggested that they disagreed with the White House's contention that the campaign here was no better than elections in the Soviet Union, where no substantive criticism of the government is permitted.

"I think I have to say that a range of political opinion was expressed, with La Prensa uncensored on political matters and the minor parties making use of their television time," a U.S. diplomat here said. "That is distinct from saying that the Nicaraguan people on Sunday have a real choice. You can hear these views, but you can't vote for them."

A Western European diplomat concurred: "They the opposition have been able to criticize the government strongly. I don't know if the Sandinistas genuinely believe in democracy, but they opened a political space."

The Sandinistas' pervasive presence in the society was evident in arrangements for the voting. Election authorities acknowledged that most officials in charge of the 3,892 voting sites are members or sympathizers of the Sandinista Front, and the ballots are to be guarded Sunday night by "electoral police" who are members of the regular Sandinista police renamed for the task.

Mariano Fiallos, president of the Supreme Electoral Council, said the polling officials simply would have to be trusted not to tamper with the results. The opposition parties have the right to name poll watchers to keep an eye on the officials, but the parties are so small that a substantial number or even a majority of polling places were expected to have no opposition observers.

"When they polling officials act in this function, they don't work as members of parties but as employes of the state with an obligation to be neutral," Fiallos said.

U.S. and other diplomats said they did not expect significant vote fraud, however, because the Sandinistas were expected to win easily without cheating. As a result, many diplomats and other observers predicted that the real measure of the election's success for the Sandinistas would be the size of the turnout and the number of unmarked or spoiled ballots.

Chief of state and Sandinista presidential candidate Daniel Ortega said the vote would be "a great success if at least 1.2 million persons voted out of 1.55 million registered."

One opposition candidate, Virgilio Godoy of the Independent Liberal Party, predicted that about 20 percent of ballots would be "invalid" because they were unmarked or marked incorrectly.

Godoy, considered to have been the most prominent opposition leader participating in the race, was in the bizarre position of running against his will because the Supreme Electoral Council said there was no legal provision for his party to pull out of the race as it voted to do on Oct. 21.

The Sandinistas want to keep Godoy in the race because his presence lends the election legitimacy. He was one of the most forceful critics of the government when he was campaigning, and once skewered both the government's war and economic policies by saying at a campaign rally that "the only thing that this country is producing is dead boys in the mountains."

Joaquin Mejia, a regional organizer for Godoy's party in the northern town of Esteli, said that he had voted in the party's national assembly to boycott the race because the Sandinistas had such a tremendous advantage in resources that the election was not a fair contest. Noting that each political party was allowed only 30 minutes a week on state television, he said, "We get five minutes a day, but if Daniel Ortega gives a speech, even for two hours, it's broadcast live."

Mejia, editor of a new opposition weekly, spoke while sitting in the Independent Liberals' regional campaign headquarters, a shabby rented house on a back street with no telephone and a single pickup truck parked outside. The Sandinistas' well-equipped regional campaign headquarters is on the busy main square.

In another indication of the Sandinistas' advantage in Esteli, the Army barracks was festooned with the Sandinistas' red and black flags.

"You don't see flags of other parties because there aren't any supporters of other parties here. We are all Sandinistas," Lt. Enrique Savala said.

[U.S.-backed rebels killed seven soldiers transporting electoral material Friday in northern Jinotega province and kidnaped an election official in Puerto Cabezas Wednesday as part of a campaign to disrupt the balloting, Nicaraguan officials quoted by United Press International said Saturday.]