The Supreme Court yesterday upheld a state law that lets a municipality extend its broad governmental powers to nonresidents who live nearby even though they can't vote in municipal elections.

The decision - the first of the court's new term - sharply divided the justices.

The municipal powers case has wide implications. In addition to Alabama, the state immediately involved, 34 other states, including Maryland and West Virginia, have laws authorizing cities and towns to exercise various police, sanitary and business-licensing powers outside their corporate boundaries.

The Alabama laws, dating to 1907, apply to municipalities with populations of at least 6,000 and to people living within three miles of them.

The case involved Tuscaloosa, which has about 66,000 residents, and about 17,000 close-by nonresidents who are subject to a diverse array of the city's ordinances. While not allowing the city to tax or zone nonresidents' property, the ordinances permits it, outside the city limit, to:

Establish all building, gas, fire, electrical and plumbing codes, and provide food inspection in stores and restaurants.

Regulate traffic, nuisances, obscenity and boarding houses.

Ban self-service gas stations.

Prescribe fines and penalties for violations of such "polite or sanitary" statutes.

Require licensing of professions and all types of business, as well as of tobacco and alcoholic beverages, and impose fees or taxes, up to one-half the rate charged in the city, to reimburse the city for providing services.

Several states grant their cities "more extensive or intrusive powers" than does Alabama, Justice William H. Rehnquist wrote in the opinion for a 6-to-3 majority. In South Dakota and North Dakota, he noted, the cities' governmental powers over surrounding unincorporated territories are "almost unrestricted."

The legal challenge to the Alabama laws originated in 1973 in Holt, a small unincorporated community on Tuscaloosa's northeastern outskirts.

The Holt Civic Club and seven residents complained that because they couldn't vote or hold public office in the city that was exercising police powers over them, they were being denied the equal protection of the laws and the due process of law guaranteed by the 14th Amendment.

Last year, a panel of three federal judges dismissed the complaint. The civic club and the Holt residents, represented by the American Civil Liberaties Union Foundation Inc., appealed to the Supreme Court.

In the opinion affirming the panel, Rehnquist wrote that previous Supreme Court decisions "have uniformly recognized that a government unit may legitimately restrict the right to participate in its political processes to those who reside within its borders."

In the dissenting opinion, Justice William J. Brennan Jr. said that the majority, applying an "entirely arbitrary" criterion of geographical residency, failed to explain why the "government unit" deciding who votes should be merely Tuscaloosa rather than the city plus the entire jurisdiction in which it exercises its powers. Thus the majority creates two separate classes of otherwise equal citizens, he said.

Rehnquist argued that if Tuscaloosa extended its franchise to nonresidents in the three-mile radius, it would have to grant it to all persons indirectly affected by its actions. " . . . No one would suggest" that such persons have a constitutional right to participate in the political processes that bring about the actions, he said.

Brennan termed this "a simple non sequitur." Joined by Justices Byron R. White and Thurgood Marshall, he found "a crystal distinction" between "those who reside in Tuscaloosa's police jurisdiction" and those who reside neither there nor in the city and thus are only indirectly affected.

The Alabama laws sever the connection between government and the governed and thus "undermine the very purposes which have led this court in the past to approve the application of bona fide residency requirements," Brennan wrote.

For Rehnquist, the remaining issue was whether the laws bear the necessary "rational relationship to a legitimate state purpose." He found such a purpose in the interest of legislatures in seeing to it that unincorporated communities such as Holt don't "go without basic municipal services such as police, fire and health protection."

Brennan replied that no compelling state interest justifying denial of the franchise to those governed by a city "has been articulated in this case."

The other decision released yesterday also sharply divided the court.

The decision concerned the provision in the Voting Right Act of 1965 requiring the mainly southern affected states to clear any proposed change affecting voting with the attorney general or the U.S. District Court in Washington.

The court held that the provision required Georgia to clear a rule adopted in 1972 by Dougherty County that compelled John E. White, a black board of education employe, to take unpaid leave while campaigning for the state legislature. He lost more than $11,000 in salary.

In the opinion for the 5-to-4 majority, Marshall wrote that the rule - adopted less than a month after White announced his candidacy - is "a standard, practice or procedure" covered by the voting rights law.

In the dissenting opinion, Justice Lewis F. Powell Jr., joined by Chief Justice Warren E. Burger and Justices Potter Stewart and Rehnquist, charged that the ruling "is without support in the language or legislative history of the act."

In both cases, the majorities included Justices Harry A. Blackman and John Paul Stevens.