WASHINGTON (CNN) -- A federal civil rights law that has stood for generations needs to be modernized, the Supreme Court effectively ruled Tuesday.
In a 5-4 vote, justices limited the historic Voting Rights Act of 1965, which Congress passed during the height of America's volatile civil rights movement.
The court struck down a part of the law that uses a federal formula to determine which states and counties must undergo U.S. oversight of their voting procedures to prevent voter discrimination.
The ruling will make it tougher for the Obama administration to enforce the law, at least until Congress changes it.
Describing the ruling as a "setback," President Obama said in a statement that his "administration will continue to do everything in its power to ensure a fair and equal voting process."
Voting discrimination, he said, still exists, and the decision "upsets decades of well-established practices that help make sure voting is fair. And he called on Congress to "pass legislation to ensure every American has equal access to the polls."
The ruling said it's now up to Congress to revise the law to meet constitutional scrutiny.
"Our country has changed, and while any racial discrimination in voting is too much, Congress must ensure that the legislation it passes to remedy that problem speaks to the current conditions," said Chief Justice John Roberts, who wrote the court's decision for the majority.
Key details of the ruling include:
• Section 4, the part of the law that was struck down, is the coverage formula the federal government uses to determine which states and counties are subject to continued oversight. Roberts said that formula from 1972 was outdated and unworkable.
• Section 5 of the law effectively cannot be enforced, because it relies heavily on the coverage formula. Civil rights groups say Section 5 has been an important tool to protect minority voters from local governments that would set unfair, shifting barriers to the polls. Without it, they warn, the very power and effect of the entire Voting Rights Act would crumble. But opponents of the provision counter it should not be enforced in areas where it can be argued that racial discrimination no longer exists.
• Under Section 5, any changes in voting laws and procedures in those covered states -- including much of the South -- had to be "precleared" with Washington. Such changes could have included something as simple as moving a polling place temporarily across the street.
The case arrived at the Supreme Court because officials in Shelby County, Alabama, filed suit against the federal government. The suit said monitoring of voting procedures under the law was overly burdensome and unwarranted.
The most recent congressional action on the formula was in 2006, when lawmakers reauthorized it.
"Congress could have updated the coverage formula at that time, but did not do so," wrote Roberts. "Its failure leaves us today with no choice but to declare Section 4 unconstitutional. The formula in that section can no longer be used as a basis for subjecting jurisdictions to preclearance."
The appeal presented the court and its shaky conservative majority with two of the most hotly debated issues in politics and constitutional law: race and federalism.
It was a major test of Washington's authority and the extent to which the federal government may consider vestiges of voting discrimination that may still linger, potentially keeping some minority voters disenfranchised.
In dissent, Justice Ruth Bader Ginsburg said Congress reauthorized the Voting Rights Act seven years ago with "overwhelming bipartisan support."
"That determination of the body empowered to enforce the Civil Rights Amendments by appropriate legislation merits this court's utmost respect," she said. "In my judgment, the court errs egregiously by overriding Congress' decision."
She was supported by Justices Stephen Breyer, Sonia Sotomayor and Elena Kagan.
The Obama administration had argued that states have gotten out of Section 5. In recent years, 31 cities and counties and Virginia successfully petitioned to be exempt from the preclearance requirements, though the rest of the state remains under federal oversight.
The Justice Department on Monday announced that Hanover County, north of Richmond, would also become exempt.
Shelby County, outside Birmingham, Alabama, did not make such a request and opposed Sections 4 and 5. It is 11% African-American, compared with 28% statewide.
Some conservative groups have argued that "ancient formulas" are being applied today, not to erase discrimination, but to benefit a particular political party. Some liberal activists counter that Section 5 and federal oversight are being demonized by many on the right for purely partisan gain, and to divide Americans again over race.
The case is Shelby County, AL v. Holder (12-96).