The Supreme Court on Tuesday struck down a key part of the 1965 Voting Rights Act, ruling that Section 4 of the law is unconstitutional.

In a 5-4 ruling, the court said that Section 4, which established a formula for determining which historically discriminatory jurisdictions needed Justice Department approval before changing their voting laws, was critical to protecting minority voters in the 1960s, but outdated today.

"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 current conditions," Chief Justice John Roberts wrote in the majority opinion.

In the case, Shelby County v. Holder, the court did not, however, invalidate the entire act.

"Our decision in no way affects the permanent, nationwide ban on racial discrimination in voting found in [Section] 2. We issue no holding on [Section] 5 itself, only on the coverage formula. Congress may draft another formula based on current conditions," the majority opinion reads.

Section 5 of the VRA required all state and local governments with a history of discriminating against voters — most of them in the South — to get "preclearance" from the Justice Department before making any changes to their voting laws, no matter how minor. That included changes like moving polling locations, redrawing districts, or imposing voting registration requirements.

The Justice Department exercised that power in the last election cycle to block voter ID laws in Texas and South Carolina.

While the court said that preclearance in itself was constitutional, the Justices took issue with the formula, created under Section 4, that determined which states and municipalities should be subject to it. In his majority opinion, Roberts said census data showing that voter turnout among African Americans exceeded that of whites in some places proved that "the conditions that originally justified these measures no longer characterize voting in the covered jurisdictions."

The court made that point with the following chart, contained in the majority opinion, that compared voter registration numbers in the six states originally covered by the VRA:

Originally passed in 1965, the VRA is considered one of the most important pieces of civil rights legislation ever. Rep. John Lewis (D-Ga.), a former civil rights leader, expressed his disappointment with the the ruling.

Section 5 of the VRA was originally supposed to last just five years. Congress renewed it multiple times, most recently in 2006 when lawmakers extended it for another 25 years, but left the coverage formula untouched.

Although Tuesday's ruling in effect left the bulk of the VRA intact, as SCOTUSBlog's Amy Howe noted, "it will have no actual effect unless and until Congress can enact a new statute to determine who should be covered by it."

Roberts made that point as well, adding that "Congress must ensure that the legislation it passes to remedy that problem speaks to current conditions."

Roberts was joined by Justices Scalia, Kennedy, Thomas, and Alito. Justices Ginsburg, Breyer, Sotomayor, and Kagan dissented.

In a strongly worded dissent, Ginsburg said Congress' power under the 14th and 15th Amendments to guard against voter discrimination deserved "substantial deference" from the court.

"Congress approached the 2006 reauthorization of the VRA with great care and seriousness," she wrote. "The same cannot be said of the Court's opinion today."