WASHINGTON (Reuters) - The US Supreme Court ruled on Monday that New Haven, Connecticut, discriminated against a mostly white group of firefighters who were denied promotions, overturning a decision by high court nominee Sonia Sotomayor. By a 5-4 vote and splitting along conservative and liberal lines, the justices overturned a ruling for the city by a US appeals court panel that included Sotomayor, who is President Barack Obamas nominee to replace retiring Justice David Souter on the Supreme Court. At issue in the case was whether a city can, as New Haven did, throw out the results of a firefighter promotion exam after it yielded too many qualified white applicants and no acceptable black candidates. The high court ruled it cannot. The appeals courts ruling in the New Haven case is expected to be a focus of questioning by Republicans at Sotomayors Senate confirmation hearing scheduled for next month. In the New Haven case, civil rights groups said the ruling could affect promotion policies for employers nationwide, many of which operate under affirmative action programs designed to foster diversity and redress past discrimination. The Supreme Court ruled for a group of 19 white firefighters and one Hispanic firefighter who filed a lawsuit in 2004 against New Haven. Writing the courts majority opinion and reading it from the bench on the last day of the term, Justice Anthony Kennedy said the citys action in discarding the tests violated federal civil rights law. The firefighters said they would have been promoted if the city had not thrown out the tests for lieutenant and captain because no blacks had scored high enough to move up in rank. The dispute was one of two major civil rights cases that reached the Supreme Court after Obama became the nations first black president. In the other case last week, the court declined to decide a constitutional challenge to the Voting Rights Act that seeks to ensure access to the polls by minorities, ruling narrowly that political subdivisions in a state can apply to be exempted from the law.