By Lawrence Hurley

WASHINGTON (Reuters) - A closely divided U.S. Supreme Court on Wednesday threw out a lower court ruling that upheld a state legislature redistricting plan in Alabama that packed black voters into certain districts in a way critics say diminished their clout at the polls.

In their 5-4 decision, the justices called the lower court ruling backing the redistricting plan "legally erroneous." But the justices ducked a ruling on the plan's lawfulness and sent the case back to a lower court.

The court avoided deciding whether the redistricting plan proposed by the Republican-controlled state legislature in 2012 violates the U.S. Constitution's guarantee of equal protection under the law by concentrating black voters, who tend to vote Democratic, into a small number of districts.

The court was divided on ideological lines, with conservative swing vote Justice Anthony Kennedy joining its four liberals in the majority.

The case centers on the practice known as gerrymandering in which election districts are drawn in a way to provide one party an advantage in as many districts as possible while consolidating the other party's voters into as few as possible.

Justice Stephen Breyer, writing for the majority, said the lower court should have considered the claims district-by-district rather than focusing on the state as a whole.

"Asking the wrong question may well have led to the wrong answer," Breyer wrote.

Breyer made reference to "the harms that underlie a racial gerrymandering claim."

"Those harms are personal," Breyer wrote. " ... They directly threaten a voter who lives in the district attacked."

The redistricting plan in Alabama, a Deep South state with a past history of erecting hurdles for black voters, was challenged by the Alabama Democratic Conference and the Alabama Legislative Black Caucus.

This was the first voting rights case heard by the high court since its 2013 ruling that gutted a key section of the Voting Rights Act.

Story continues

Conservatives Antonin Scalia, John Roberts, Clarence Thomas and Samuel Alito dissented.

Scalia said the ruling undermines states’ ability to manage their own elections and would have "profound implications for the constitutional ideal of one person, one vote." Scalia objected to the challengers getting "a second bite at the apple" under the ruling to attack the state redistricting plan.

Thomas, the court’s only black justice, criticized state legislators who take race into account, saying, "This is nothing more than a fight over the 'best' racial quota."

The two consolidated cases are Alabama Democratic Conference v. Alabama and Alabama Legislative Black Caucus v. Alabama, U.S. Supreme Court, No. 13-1138 and 13.895.

(Reporting by Lawrence Hurley; Editing by Will Dunham)