The US Supreme Court this week sounded the death knell for affirmative action in university admissions, even as it upheld the University of Michigan's right to consider race as a factor in its recruitment policy.
The court's ruling only just upheld the use of racial preferences in admissions by a five-four vote margin.
The ruling by the largely conservative court surprised supporters of affirmative action, the use of which by Michigan's Law School had been challenged by white students and a conservative advocacy group.
But the decision could be short-lived if one of the justices retires, as at least one is expected to do, allowing President George W. Bush to appoint a replacement.
Earlier this year, Mr Bush confirmed his opposition to affirmative action in the Michigan case.
The justices said: "We expect that 25 years from now the use of racial preferences will no longer be necessary."
But for now, the court said, race could be used by universities in admissions decisions to ensure a diverse enrolment - as long as it was not the only or the controlling factor.
In a separate case, the court ruled six-three against giving bonus points to minority applicants for undergraduate admission to Michigan.
But it ruled that the university could continue to consider race by some other, less mechanistic, process.
Justice Sandra Day O'Connor wrote for the majority: "Universities occupy a special niche in our constitutional tradition."
She said that "attaining a diverse student body is at the heart of the law school's proper institutional mission" because it "helps to break down racial stereotypes" and "enables (students) to better understand persons of different races".
The decision affects only a small group of about 150 public universities that, like Michigan, use a point system in the admissions process to benefit minorities.
Otherwise, most American universities will be required to make no changes in admissions policies based on race.
Private universities are not affected by the ruling, although the debate and the accompanying public outcry against affirmative action has already prompted some to consider whether they will continue to give preference to minority applicants - or to white children of alumni or major donors, practices for which they have been roundly criticised.
The Center for Individual Rights, the conservative legal advocacy group that threw its weight behind the Michigan lawsuit, declared that the ruling was a victory.
It said the Supreme Court's decision to outlaw bonus points for undergraduate applicants to Michigan was "an explicit blow to (racial) preferences", and that the case had crystallised national opposition to such affirmative action.
President Bush emphasised that the court had said that universities must consider "race-neutral alternatives" to ensuring diversity, and must use affirmative action as a last resort.
"There are innovative and proven ways for colleges and universities to reflect our diversity without using racial quotas," he said.
Chief Justice William Rehnquist, writing for the dissent, said that the type of racial balancing practised by Michigan's Law School was "patently unconstitutional".
Justice Clarence Thomas, who is black, agreed. "I believe blacks can achieve in every avenue of American life without the meddling of university administrators," he wrote.
The court warned that affirmative action must not be allowed to harm "other innocent persons competing" for admission. It also promised "continuing oversight".
Supporters of affirmative action said they would launch a campaign to influence the selection of any future justices, who must be nominated by the president and confirmed by the Senate.
Ralph Neas, president of People for the American Way, said: "This decision highlights how critical the next appointments to the Supreme Court will be.
The vote of a single justice can have a massive impact on Americans' rights."