The Supreme Court ruled that people have a right to try to make the congressional redistricting process less partisan. (Joshua Roberts/Reuters)

A divided Supreme Court on Monday said voters concerned that partisan gerrymandering is creating unfair elections are entitled to take reapportionment away from state legislatures.

The court ruled 5 to 4 that the Constitution does not give legislatures exclusive control over congressional redistricting and said voters may vest the power in independent commissions by ballot initiative, where this option exists.

“The animating principle of our Constitution [is] that the people themselves are the originating source of all the powers of government,” Justice Ruth Bader Ginsburg wrote for the majority.

The court upheld a plan Arizona voters approved in 2000 that set up an independent commission to draw the boundaries.

The Republican-led Arizona legislature had objected to the plan the commission drew, and pointed to the Constitution’s Elections Clause to contest the validity of the district map. The clause states that the “Times, Places and Manner of holding Elections for Senators and Representatives, shall be prescribed in each State by the Legislature thereof.”

If the Arizona legislature had retained the power to set the map, Republican lawmakers would have been able to redraw the boundaries to the advantage of their party in at least two of the state’s nine congressional districts, which are now roughly split between Republicans and Democrats.

The Supreme Court has largely stayed out of partisan gerrymandering cases, unable to agree on a test that would allow the court to discern when expected political maneuvering rises to the level of being unconstitutional.

Ginsburg was joined in the majority by Justices Anthony M. Kennedy, Stephen G. Breyer, Sonia Sotomayor and Elena Kagan.

Chief Justice John G. Roberts Jr. issued a biting dissent, accusing the majority of using a “magic trick” to impose its policy preferences.

“No matter how concerned we may be about partisanship in redistricting, this court has no power to gerrymander the Constitution,” Roberts wrote. He was joined in dissent by Justices Antonin Scalia, Clarence Thomas and Samuel A. Alito Jr.

Scalia and Thomas would have ruled that the case be dismissed as an allocation of political power that the courts have no business deciding.

Scalia said he joined Roberts because the majority opinion “is so outrageously wrong, so utterly devoid of textual or historic support, so flatly in contradiction of prior Supreme Court cases, so obviously the willful product of hostility to districting by state legislatures, that I cannot avoid adding my vote to the devastating dissent of the Chief Justice.”

The Arizona plan works like this: The top Republican and Democratic leaders in the two legislative chambers each select a member of the commission from a list of 25 people compiled by a group that also selects judicial candidates. Those four commission members select a chairman also from the list.

Legislative leaders may comment on the plans the commission draws up, but they cannot alter the maps, nor can the governor veto them.

California is the only other state that has diminished the legislature’s role in a similar fashion. About 11 other states have created commissions that advise legislators on reapportionment or serve as a backup in case the legislature fails to complete a plan.

Ginsburg acknowledged that the language of the Elections Clause seemed to indicate the work was to be done by a legislature. But she invoked history and the court’s precedents to say that the word more broadly speaks to the power to make laws and that it is clear Arizona allows voters to make laws through the initiative process.

“Recall that when the Constitution was composed in Philadelphia and later ratified, the people’s legislative prerogatives — the initiative and the referendum — were not yet in our democracy’s arsenal,” Ginsburg wrote. “The Elections Clause, however, is not reasonably read to disarm states from adopting modes of legislation that place the lead rein in the people’s hands.”

Roberts countered that it took 86 years to pass the 17th Amendment calling for the election of U.S. senators directly by the people instead of by state “legislature.”

“Didn’t they realize that all they had to do was interpret the constitutional term ‘the Legislature’ to mean ‘the people’?” Roberts asked.

Roberts said the Constitution uses the word “legislature” nearly 20 times to mean a law-making body, and that the majority simply thinks it is better to combat gerrymandering than abide by the words of the document.

Michael Li, counsel at the Brennan Center for Justice, said the ruling was a big win for voters concerned about gerrymandering.

“By leaving in place important redistricting reforms in Arizona and California, the Supreme Court reaffirmed the principle that voters have the freedom under the Constitution to experiment with ways to make their democracy work better,” he said.

About half of the states have ballot initiatives that let citizens go around the legislature and put issues to referendum.

The case is Arizona State Legislature v. Arizona Independent Redistricting Commission.