The US Supreme Court has voted to allow universities to consider race when selecting student applicants.
The judges denied the challenge of a white woman, who believed she was rejected by the University of Texas due to her race.
The case, Fischer v University of Texas, was decided by a vote of 4-3.
Affirmative action, or "positive discrimination", can continue to be used by public universities when considering minority students.
The court is currently composed of eight judges rather than the usual nine, due to the death of Justice Antonin Scalia, who has yet to be replaced.
President Barack Obama's nominee, Merrick Garland, is being blocked by Congress.
Justice Elena Kagan had recused herself because she has worked on the case before joining the court in 2009.
Analysis - Anthony Zurcher, BBC News, Washington
Over the past 13 years, the US Supreme Court had been steadily eroding the ability of US public universities to consider an applicant's race during their admissions process. On Thursday, the court moved - ever so slightly - in the other direction.
Justice Anthony Kennedy, further cementing his status as the court's ideological swing vote, said the University of Texas could indeed take race into account for the small number of applicants admitted using subjective analysis of their qualifications. He cautioned, however, such considerations have to be regularly "reassessed".
This was the second time this particular case had reached the Supreme Court, and the woman who brought the case has long since graduated from another university. The court's decision almost certainly opens the door for new lawsuits, however, as some universities attempt to implement their own race-conscious programmes and are challenged over whether they are properly assessing the need and impact of their efforts.
In this particular case Antonin Scalia's death wasn't a factor, as Justice Elana Kagan had recused herself due to her prior involvement as Barack Obama's solicitor general. But if Mr Scalia is replaced by a more liberal justice, this may mark a lasting change of course.