The Supreme Court ruled yesterday that Congress, in order to remedy past discrimination, may impose racial quotas in handing out federal money.

The decision stemmed from a challenge by white contractors to a 1977 law setting aside 10 percent of federal public-works contracts for companies controlled by members of minority groups. It is the most unequivocal victory yet for advocates of affirmative action.

The ruling applies only to acts of Congress, which the court said has unique powers. Educational institutions, government agencies, state legislatures and others gained little more than they had under the court's earlier Bakke and Weber affirmative-action rulings.

But the ruling yesterday in Fullilove vs. Klutznick, secretary of commerce, constituted a broad endorsement not only of the public works setaside of 1977 but of Small Business Administration preferences and other federal "remedial" programs.

It also provided a license for the future. Within certain broad limits the court said, Congress may favor a minority group whenever it makes a finding of past discrimination and tailors its racial preferences to correct that discrimination.

The findings need not be specific or rigorous, as is required when a judge imposes a remedy. And the court said that people who lose out in such programs -- generally whites -- need not have been found guilty of discrimination themselves.

The ruling does give non-minorities leeway to challenge as illegal a program's implementation. But any challenges to a carefully drawn law would probably be rebuffed under yesterday's decision.

Civil rights advocates uniformly praised the decision, stressing its implications for affirmative-action possibilities in such areas as housing, education and employment.

"I'm just elated," said Rep. Parren J. Mitchell (D-Md.), the black Baltimore congressman who first proposed the "Minority Business Enterprise" setaside for public works. "The language is so broad and so strong, it may have implications for other areas of civil rights."

Affirmative action critics, like the B'nai B'rith Anti-Defamation League, were "disappointed." The Fullilove case, said spokesman Seymour D. Reich, was "an important test of the validity of the basic American Principal of nondiscrimination."

Congress' affirmative-action programs may "deprive some people who may themselves be innocent," said Chief Justice Warren E. Burger. But a limited "sharing of the burden by innocent parties is not impermissible" under the Constitution.

"The time cannot come too soon when no governmental decision will be based upon immutable characteristics of pigmentation or origin," said Justice Lewis F. Powell Jr., who agreed with Burger. "But in our quest to achieve a society free from racial clalssification, we cannot ignore the claims of those who still suffer from the effects of identifiable discrimination."

Justice John Paul Stevens, William H. Rehnquist and Potters Stewart dissented.

The voting on the 6-to-3 decision was complicated, but significantly clearer than the court's Bakke ruling. That 1978 decision admitted to medical school a white man denied entry by a quota, but also said that race could be a factor in educational admissions.

In Fullilove, six justices upheld the constitutionality of what Congress did with varying degrees of ethusiasm, and the voting transcended conventional ideological lines.

Burger upheld it in an opinion with Justices Powell and Byron R. White. White and Powell also wrote separate concurring opinions. Justice Thurgood Marshall, with Justices William J. Brennan and Harry A. Blackmun, went even further saying it wasn't even "close."

Rehnquist, an ardent opponent of affirmative action, with Stewart and Stevens, whose views were largely unknown, issued vigorous dissents.

The minority set-aside law, Stevens said, represents a "perverse form of reparation," a "slapdash" law that rewards some who may not need rewarding and hurts others who may not deserve hurting.

A law such as this, Stevens wrote, could be used simply as a patronage tool by its authors. It could also breed more resentment and prejudice than it corrects.

Congress has "failed to discharge its duty to govern impartially embodied in the Fifth Amendment to the United States Constitution," he wrote.

The struggle over affirmative action and reverse discrimination has been the central civil rights controversy since the mid-1970s. Before then, activists concentrated on removing racial barriers to employment, voting, houseing and schooling, The opposition to that came largely, though hardly exclusively from the South.

Affirmative action, which concentrated on quickly rectifying the effects of those barriers by sometimes giving minorities special treatment in higher education, hiring and promotions, drew fire that transcended geography completely.

Black representation in the contracting and construction industry was demonstrably minuscule in 1977. Fewer than 5 percent of all firms in that business were black-owned, and they shared less than 1 percent of the federal contracts. Blacks said they found entry to the business especially difficult because of the need for accumulated capital, insurance and other special requirements.

The minority set-aside provision in the Fullilove case was to help correct that, its sponsors said. Tacked onto a 1977 public works bill designed to pump money and jobs into an economy sagging from unemployment, the set-aside reserved at least 10 percent of a $6 billion appropriation.

The beneficiaries were businesses at least half owned by "Negroes, Spanish speaking Orientals, Indians, Eskimos and Aleuts."

The law was followed by regulations designed to channel the money and prevent abuses. The program was administered by the Economic Development Administration of the Commerce Department.

White New York contractor H. Earl Fullilove along with the nine other trustees of the New York Building and Construction Industry Board, Challenged the act, contending that it unconstitutionally discriminated against whites, violating their Fifth and Fourteenth Amendment rights to equal protection of the laws and due process.

The lower courts rejected their suit. The Supreme Court -- by a 6-3 vote -- affirmed the lower court yesterday. Since the opinion by Burger, White and Powell went at least as far as Marshall, Brennan and Blackmun's, it provided the clearest view of what the court now allows.

Congress does not have to be "color blind," Burger wrote. Race may be a factor. But where it is, he said, the court must give it the closest examination "with the appropriate deference to Congress, a co-equal branch of government.

Congress must find past discrimination. Although the set-aside resulted from a floor amendment without hearings, Burger said, congressional deliberations over prior laws, such as the SBA preference, constituted findings relevant to the set-aside.

"Congress had abundant evidence from which it could conclude that minority business had been denied effective participation in public contracting opportunities by procurement practices that perpetuated the effects of prior discrimination," he wrote.

Burger also said that the program must be flexible, allowing waiver where insufficient minority firms exist or where they demand too much money. In addition, the burden on non-minorities must be sufficiently small, as it was in the set-aside programs, whose 10 percent requirement left enough to go around to others.

Because the court's ruling yesterday stresses Congress' ability to legislate the affirmative-action programs, the contractors contend that decision doesn't cover acts of federal agencies, a point that some civil rights lawyers dispute.

"That's going to be the next thing," said Robert Benisch, an attorney for the New York building trade group. "How far down in the bureaucratic ladder will this filter? A lot of agencies will attempt to impose in their contracts mandatory set-asides. They'll equate themselves with Congress."

Opponents and proponents of the decision, however agreed in one area: they all said it in has far-reaching implications beyond federal contracting. It can be applied to housing, employment, education and any area that Congress feels people have been discriminated against in the past and need a remedy.

"I certainly wouldn't contend that this is a decision that just helps black people or Hispanic people," said James M. Nabrit III, associate counsel for the NAACP Legal Defense and Education Fund Inc. But he added that some other applications of the decision are "not realistic."