The nightly prime-time barrage of television spots by Salvadoran political parties was only half-finished the other night when it was interrupted by a special message from Dr. Jorge Bustamante, the crusty president of El Salvador's electoral commission.

Free television time had been granted to the six political parties contesting the March 28 national elections, Bustamante told viewers, so that the parties could present their political platforms to the voters. Unfortunately, he continued, this privilege was being abused by some who were using the time to deliver themselves of a "cataract of insults, calumnies, rumors" that threatened the nation's attempt to hold genuinely free elections for the first time in half a century.

"I warn you I have the law on my side and those who insist on using their political propaganda to insult and slander their opponents will be punished," said the bespectacled and balding electoral commissioner, speaking to the cameras in shirtsleeves from behind his desk. "I don't want to be put in a position of making ultimatums, but if by next Sunday this offensive propaganda is not stopped, we in the commission are going to direct the television stations to refuse to screen the offending television commercials."

In a land where assassination often has replaced dialogue as the preferred means of political expression, where some of the very candidates he was referring to command their own private armies and after-dark "death squads," and where the judicial process has long been eclipsed by the law of the gun and the machete, Bustamante's stern call to the candidates for order was both provocative and audacious.

It was also vintage Bustamante, the latest example of the outspoken independence that in the course of the campaign has made the commissioner a personality as important as any of the protagonists in the election for 60 delegates to a constituent assembly. That assembly, which will draw up a new constitution for El Salvador, also will appoint a provisional government to replace the controversial military-civilian junta that rules the nation.

The election has become a personal crusade for Bustamante, a Chicago-trained physician who took on the post of electoral watchdog after dozens of others declined on the ground that the job was too dangerous given the violent passions that have been tearing apart this country for the past two years.

At a time of great national cynicism, Bustamante, who will be 60 years old election day, remains effusively upbeat about the prospects of El Salvador holding the country's first democratic elections since 1930.

"The people here are not immature," Bustamante said. "They might be ignorant but they are not stupid. They are going to taste democracy for the first time in their lives, and it is going to be like taking a mouthful of honey."

In a recent interview at his suburban electoral headquarters, a building defended by national policemen behind sandbags and a half dozen civilian security guards with shotguns, Bustamante attempted to answer what he called "the $64 question: why a gynecologist like myself is sitting here."

The answer he gave was characteristically direct and simple: "The job had to be done and done by someone who had experience with the past and who was determined to see free elections at least once in his lifetime."

The past seems to haunt Bustamante, who remembers from his childhood that the government elected in 1930 was quickly toppled for its reformist pretensions by Gen. Maximiliano Hernandez Martinez. Aside from inaugurating 50 long years of military rule in El Salvador, Hernandez also is remembered for his brutal repression of a brief revolt.

That repression, which is said to have resulted in between 10,000 and 30,000 deaths, is known here as the matanza, or butchery. It is viewed as the cultural antecedent of today's fratricidal violence in which more already have died than in the original matanza.

"History is not going to teach us bad lessons," Bustamante said, insisting that Salvadorans will rise above their violent past in the coming elections. "I hope the wounds will heal but that the scars will remain very visible, so we will always see them as a reminder against indulging in yet another matanza in the future."

Bustamante is unfazed by the problems of holding elections amid the present wave of violence, which the parties of the left have given as a reason for their refusal to participate. "This is not the first country in the world to hold elections during a war," he noted, citing Abraham Lincoln's 1864 reelection during the Civil War.

Bustamante views as regrettable the left's boycott and a guerrilla threat to sabotage the vote and kill those who participate. But he still believes that the election will prove valid and significant. "If they the left have chosen not to participate in this election," he said with a wry smile, "they will participate in the next one. They missed this chance, but I bet they won't miss the next."

A passionate believer in democracy, peaceful dialogue and a negotiated settlement of the divisions in El Salvador, Bustamante nevertheless expresses grudging admiration for many of the guerrillas besieging his nation. He views them less as communists than as misguided idealists driven to armed revolt by the previous inequities of Salvadoran society.

"They have guts and ideals and are fighting because as idealists they are frustrated," he said of the guerrillas. "It is our challenge to create something here that will eradicate the cause of their frustration and allow us to reintegrate them into our society."

Perhaps one reason Bustamante is so understanding of the guerrillas is that he himself once was one. As a young man in 1944, he admits, he set a bomb at the doorstep of the then-government's minister of interior and also threw a grenade at the British Consulate before being caught and put in solitary confinement for 38 days.

Bustamante claims not even to remember what he was fighting against. "I was young, and the young always dislike their governments," he said. "I guess I did it as much as anything because in our youth it was a question of showing courage to ourselves."

Released from jail in 1945 under a government amnesty, Bustamante finished his university studies, then went off to Chicago for six years to do his medical training. He married a nurse from Wisconsin and returned here to become one of the country's leading gynecologists.

A self-styled "dreamer of democracy," Bustamante says that devotion is his principal qualification for his role as patron and guarantor of the Salvadoran elections.

With El Salvador's tradition of rigged votes, fraud and dictated governments, Bustamante says he and his assistants have had to start almost from scratch to establish a mechanism for a legitimate election. There are no valid records of electors, nor does he know the exact number of eligible voters, estimates of whom range from 1 million to 2.2 million.

Because about 100,000 internal refugees have abandoned their homes due to the guerrilla war raging in many parts of the countryside, the commissioner has been forced to discard the usual system that requires voters to cast their ballots in the communities where they reside.

With signs posted along roadsides by the guerrillas' Farabundo Marti National Liberation Front warning that "whoever votes will be killed," special arrangements also have been made to ensure that those who go to the polls can keep that fact secret. No stamp will be affixed in voters' identification cards to prove they voted. Instead, voters' hands will be stamped with a special indelible ink that will be visible only under flourescent lamps at polling stations to ensure that no one votes twice.

Bustamante says it is next to impossible to predict how many in this nation of 4.5 million population will vote. "If 800,000 vote I would be happy," he says, rocking back and forth in his office chair next to a model of the voting boxes that will be used. "If I get 900,000 I will get drunk for a week."