More than 2 million Uruguayans are expected to vote Sunday in their first presidential election in 13 years, amid a frenzy of partisan activity and euphoric conviction that one of South America's most repressive military regimes is near its end.

Political observers here said that center-left Blanco Party presidential candidate Alberto Zumaran, 44, and his moderate Colorado opponent Julio Sanguinetti, 48, were locked in a tight contest.

Meanwhile, the Broad Front, a leftist coalition ranging from Christian Democrats to Moscow-line Communists, is favored in most polls to win the mayoralty race in Montevideo, the country's second most important post. Nearly half of Uruguay's 3 million people live here.

The election in this country between Brazil and Argentina along the River Plate is an important step in a regional march toward democratic rule.

In October 1982, Bolivia returned to civilian government. Last December, Argentina ended seven years of military rule. In January, an indirect election of a civilian as president of Brazil is meant to put an end to one of South America's longest ruling military governments.

Many Uruguayans see the election here as more than a political contest. Before a military-backed coup dissolved parliament in 1973 on the pretext of fighting a leftist guerrilla threat, Uruguayans enjoyed 50 years of unbroken civilian rule.

"This election is more than a competition for votes," said Graziano Pascale, a local radio announcer. "It is an attempt to recreate a national identity."

The fervor surrounding Sunday's election is evidence that once again politics competes with soccer as Uruguay's national passion.

About 40,000 Uruguayans reportedly have returned from abroad for the vote. The national bus company reported that 15,500 persons have returned in recent days on buses from Buenos Aires alone.

The festive election eve mood is a dramatic change from as recently as six months ago, when newspapers were strictly censored, political leaders arrested and political demonstrations violently disbanded by police.

The elections, however, are not totally free, and that fact has become one of the campaign's central issues. Although the military backed down from demands that it have a permanent say in national security matters, it has succeeded in keeping two of Uruguay's most popular politicians from running for president. One of them, the popular Blanco leader Wilson Ferreira Aldunate, has been jailed. The military also has kept a ban on the Uruguayan Communist Party and a half dozen smaller groups and maintained proscriptions on more than 5,000 leftist activists.

The continued jailing of Ferreira, a 66-year-old former senator who was arrested on charges of political subversion upon his return from 11 years in exile, has become the focus of the Blancos' campaign.

Ferreira, Uruguay's most popular politician, narrowly lost a presidential bid in 1971. In exile, he was one of the foremost critics of the military's human rights record -- which at one point included 6,200 political prisoners, the world's highest per capita ratio.

In adopting a tough antimilitary position, Zumaran, a lawyer and rights activist who has been jailed 15 times in the past two years, and his party have sought to capitalize on antimilitary sentiment to catapult them to power. In an election-end rally here attended by about 200,000 flag-waving partisans last night, Zumaran charged the Colorados with being the military's party.

"We will subordinate the armed forces, not be ruled by them," Zumaran said. "We will ensure the rule of law."

Sanguinetti, Blanco leaders also complain, stands to gain by the recent enfranchisement of Uruguay's 68,000-strong military. Under a complicated dual vote system, in which party primaries are conducted simultaneously with the general election, votes for military-backed former president and Colorado minority politician Jorge Tacheco Areco will be added to Sanguinetti's overall total.

Despite the Blanco complaints, the Colorados, who have ruled Uruguay for nearly all of this century, appear confident that their traditional bastion in the capital will allow them to defeat the rural-based Blancos. In 1971, the Colorados won with 41 percent of the vote, and Sanguinetti, a former education minister widely credited with guiding Uruguay's return to civilian rule, has appealed strongly to Uruguayans' sense of moderation.

The possibility of the Broad Front capturing the Montevideo mayoralty marks one of the most drastic changes in the electorate. In the last election, the front, which was later subject to brutal repression by the military, won 18 percent of the vote. However, polls show that it is heavily favored among the country's 600,000 first-time voters. The party is also considered strong among exiles returning to vote.

In the mayoralty race, the front fielded a previously little-known architect, Mariano Arana, whose pungent humor has earned him the sobriquet of "the Uruguayan Woody Allen." Arana has run an issue-oriented campaign promising better social services.