WASHINGTON (Reuters) - A unanimous U.S. Supreme Court on Monday upheld the method all 50 states use in drawing legislative districts by counting every resident and not just eligible voters, rejecting a conservative challenge that could have given more sway to rural white voters.

The U.S. Supreme Court is seen in Washington March 29, 2016. REUTERS/Gary Cameron

The eight justices ruled that Texas, in carving out its state Senate districts, did not violate the legal principle of “one person, one vote” endorsed by the court in the 1960s. The decision likely benefits Democrats over Republicans.

The practice of counting all residents and not just those who are eligible voters boosts the electoral clout of locales, typically urban and often heavily Hispanic, with significant populations of people ineligible to vote. Those include legal and illegal immigrants as well as children and certain convicted criminals.

Writing for the court, liberal Justice Ruth Bader Ginsburg stated that elected legislators “serve all residents, not just those eligible or registered to vote.” Ginsburg said non-voters, including children, have “an important stake in many policy debates,” including education, and sometimes need help navigating government bureaucracy.

A victory for the conservative challengers could have shifted influence in U.S. state legislative races away from urban areas that tend to be racially diverse and favor Democrats to rural ones predominantly with white voters who often back Republicans.

The dispute did not involve U.S. congressional districts. The Constitution requires seats in the U.S. House of Representatives to be distributed based on a state’s total population, not just eligible voters.

The conservative challengers asserted that Texas violated the guarantee of equal protection under the law under the Constitution’s 14th Amendment. Ginsburg wrote that looking at total population not only meets the Constitution’s equality guarantee but also ensures elected officials are “alert to the interests and constituent-service requests” of everyone in a voting district.

Adopting a new approach “would upset a well-functioning approach to districting that all 50 states and countless local jurisdictions have followed for decades, even centuries,” Ginsburg wrote.

The ruling does not change the approach states currently use. It also does not foreclose states from trying different approaches. But the ruling’s endorsement of counting all residents signals that variations might not pass legal muster.

Nina Perales of the Mexican-American Legal Defense and Education Fund called the ruling an important victory that “protects the right of all people across the U.S. to be represented by their officials and be counted when electoral maps are drawn.”

Edward Blum, the conservative legal activist who spearheaded the case and for decades has challenged practices that benefit racial minorities, expressed disappointment in the ruling.

“The issue of voter equality in the United States is not going to go away,” Blum said, adding that he would look for a new legal challenge in upcoming years that could return the issue to the justices, perhaps tied to the number of U.S. citizens in an electoral district.

The challengers said the Texas redistricting map signed into law by a Republican governor in 2013 failed to equally distribute voters, improperly expanding the voting power of urban areas.

Republican Texas Attorney General Ken Paxton said he was pleased with the ruling.

“My office is committed to defending the Constitution and ensuring the state legislature, representing the citizens, continues to have the freedom to ensure voting rights consistent with the Constitution,” Paxton said.

The Obama administration supported the Texas plan.

Two Texas voters, Sue Evenwel and Edward Pfenninger, were recruited by Blum to file the lawsuit. Evenwel was a member of the Texas Republican Party’s executive committee and Pfenninger worked as a security guard. Both lived in rural voting districts.

Hillary Clinton, front-runner for the Democratic U.S. presidential nomination, praised the ruling, saying, “In our democracy, every one of our voices should count.”

Caroline Fredrickson, president of the liberal American Constitution Society, said it was important for the court to endorse voting rights at a time when Republican-governed states have enacted new restrictions, including identification requirements, that Democrats say are intended to suppress the vote of minorities.

Two conservative justices, Clarence Thomas and Samuel Alito, concurred only in the judgment and did not sign on to Ginsburg’s opinion.

The court is one justice short following the Feb. 13 death of conservative Justice Antonin Scalia. The unanimous ruling suggested his presence would not have substantially affected the outcome.

Blum’s group, the Project on Fair Representation, orchestrated a lawsuit from Shelby County, Alabama that in 2013 led the high court to invalidate a portion of the 1965 Voting Rights Act mandating federal approval for election law changes in states with histories of racial discrimination.

It also backed another important case heard by the justices in December, a white woman’s challenge to a University of Texas admissions policy that considers an applicants’ race among other factors in an effort to enroll more minority students. The court has not yet ruled in that case.