The U.S. Supreme Court on Monday ruled that Republicans in North Carolina unlawfully took race into consideration when drawing congressional district boundaries, concentrating black voters in an improper bid to diminish their overall political clout.

The justices upheld a lower court's February 2016 ruling that threw out two majority-black U.S. House of Representatives districts because Republican lawmakers improperly used race as a factor when redrawing the legislative map after the 2010 census. The court was unanimous on upholding the ruling on one of the districts and split 5-3 on the other, with three conservatives dissenting.

"The North Carolina Republican legislature tried to rig congressional elections by drawing unconstitutional districts that discriminated against African-Americans and that's wrong," North Carolina Governor Roy Cooper, a Democrat who took office in January, said in a statement.

The decision came in one of a number of lawsuits accusing Republicans of taking steps at the state level to disenfranchise black and other minority voters who tend to back Democratic candidates.

Critics accused Republicans of cramming black voters into what the NAACP civil rights group called "apartheid voting districts" to diminish their voting power and make surrounding districts more white and more likely to support Republicans. Both districts are held by the Democrats. Of North Carolina's 13 representatives in the U.S. House, 10 are Republican.

Race can be considered in redrawing boundaries of voting districts only in certain instances, such as when states are seeking to comply with the federal Voting Rights Act. That law protects minority voters and was enacted to address a history of racial discrimination in voting, especially in Southern states.

Democrats have accused Republicans of taking a number of steps at the state level, also including laws imposing new requirements on voters such as presenting certain types of government-issued identification, in a bid to suppress the vote of minorities, the poor and others who generally favor Democratic candidates.

Republicans have said the laws are needed to prevent voter fraud.

The Supreme Court has never said legislative districts cannot be mapped based on plainly partisan aims like maximizing one party's election chances. North Carolina Republicans said one of the two districts, called the 12th congressional district, was drawn on purely partisan grounds to benefit Republicans at the expense of Democrats, and the other was drawn to comply with the demands of the Voting Rights Act.

Justices Dissent

The split among the justices was over the 12th district, with conservative Justice Samuel Alito writing in dissent that the court should have been bound by an earlier precedent in which a previous version of the same district was challenged. He was joined by conservative Chief Justice John Roberts and Justice Anthony Kennedy.

"A precedent of this court should not be treated like a disposable household item—say a paper plate or a napkin—to be used once and then tossed in the trash," Alito wrote.

Writing for the court's majority, liberal Justice Elena Kagan countered that evidence at trial "adequately supports the conclusion that race, not politics, accounted for the district's reconfiguration."

Conservative Clarence Thomas, the court's only black justice, joined the court's majority in both parts of the ruling.

Justice Neil Gorsuch, who had not yet joined the court when arguments in the case were heard in December, did not participate in the ruling.

In 2015, the Supreme Court ruled 5-4 to throw out a lower court's decision upholding a similar Republican-backed state legislature redistricting plan in Alabama that crammed black voters into certain districts in a way critics said lessened their influence at the polls.

In another redistricting case, the justices ruled on March 1 that a lower court should reassess whether Virginia's Republican-led legislature unlawfully tried to dilute the clout of black voters when it drew a series of state legislative districts. The justices threw out a decision that had upheld all 12 state legislature districts that were challenged.

Monday's ruling came one week after the justices rebuffed a Republican bid to revive a strict North Carolina voter-identification law that a lower court found deliberately discriminated against black voters, handing a victory to Democrats and civil rights groups.