Brazilians voted today for federal, state and local authorities in the broadest and most open elections in 18 years of military rule, in what observers saw as a crucial step toward greater democracy.

Though the military's ultimate power was not at stake, the voting was expected to transform the character of governmental authority in Latin America's largest country by propelling a host of opposition candidates to powerful positions as state governors and federal congressmen.

The results of the vote will determine the balance of power in a special electoral college now scheduled to choose Brazil's next president in January 1985. The government expects to control that selection, but its assessment of today's election results is likely to shape the future of Brazil's gradual move toward full democracy, a process that has been watched closely by other South American governments.

No major disturbances were reported today as voters lined up across the country to choose among some 130,000 candidates from both the government-sponsored Social Democratic Party (PDS) and four opposition parties ranging from the center right to the socialist left.

At stake were the governorships of 22 states, 25 federal Senate seats, all 479 positions in the federal Chamber of Deputies, and most state and local positions, including 4,034 mayorships. Officials said 58.5 million Brazilians -- about half of the country's population -- were eligible to vote.

Counting of the paper ballots will not begin until Tuesday, and officials expect final results to be delayed by as much as a week or more. The newly elected officials are scheduled to take office next March.

The voting today came after a long and tumultuous campaign marked by occasional violence, massive expenditures by both government and opposition candidates, and a carnival of open air rallies in Brazil's major cities last week.

President Joao Figueiredo, who has led the Brazilian process of abertura, or opening to democracy, made 48 campaign trips and 140 stump speeches in support of the PDS even though he is not a candidate. "We're going to stuff the opposition with democracy until they get indigestion," he declared last week at a final rally in the northern coastal city of Recife.

Government officials have said they expect to win the governor's races in 14 of 22 states and retain their majority in both the Senate and the Chamber of Deputies.

Final polls, however, showed opposition candidates leading the government in Brazil's largest and most populous state, including both major metropolitan areas of Rio de Janeiro and Sao Paulo. Some polls also showed the opposition gaining a majority in the Chamber of Deputies, the lower house of the Brazilian Congress.