The US Supreme Court has upheld the right of a university law school to take race into account when deciding whether or not to allocate a student place.
The issue provokes strong feelings in the US
The court backed by five votes to four the University of Michigan graduate law school's policy of affirmative action which favours ethnic minority candidates.
However, by a majority of six to three, the judges also ruled that the university's policy of awarding applicants from ethnic minorities extra points when deciding undergraduate places was unconstitutional.
The BBC's Steve Schifferes says the court's decision has been hailed as an important victory by civil rights groups.
The rulings centred on a case brought by three white students whose applications for places at the university - one of them in the graduate law school - were turned down.
The students - who were backed by US President George W Bush - said the decisions to reject them amounted to illegal discrimination, and that if they had been members of a minority group they would have been accepted.
In the first case, Supreme Court Justice Sandra Day O'Connor sided with the court's more liberal justices to decide in favour of the graduate law school's version of affirmative action.
She said the US constitution "does not prohibit the law school's narrowly tailored use of race in admissions decisions to further a compelling interest in obtaining the educational
benefits that flow from a diverse student body".
In ruling against the university's points system for undergraduates, the judges decided that it was, in effect, a racial quota system under which a certain number of places were set aside by the university for minority candidates, and was therefore unconstitutional.
The US Government's chief law officer, Solicitor General Ted Olson, had appeared in court to support the students' case and condemn the Michigan admissions plan as unconstitutional.
President Bush has described affirmative action as resembling "quota systems that... exclude people from higher education... are divisive, unfair and impossible to square with the constitution".
Quotas ruled illegal
Support for the university came from several civil liberties organisations and lawyers, including the American Bar Association.
The case was the most recent examination of US race relations since the court's decision in the Bakke versus Board of Regents case in 1978.
That case was brought by a white student, Allen Bakke, who argued that he had been passed over by the University of California at Davis medical school in favour of minority candidates.
In that instance, racial quotas were struck down, but universities were still permitted to consider race as a factor in admissions.
In other US Supreme Court rulings on Monday:
A California state law designed to help Holocaust survivors collect on
insurance policies from Nazi-era Europe was struck down
A law requiring the nation's public libraries
to filter out internet pornography was upheld, with judges ruling it did not violate