The US supreme court struck down 48-year-old protections for minority voters in states with a history of racial discrimination on Tuesday, in a decision lamented by campaigners who argued that it gutted the most important civil rights law ever passed by Congress.

President Obama said the ruling, which invalidated a key provision of 1965 Voting Rights Act, was "deeply disappointing" and overturned decades of bipartisan agreement on measures to prevent voting discrimination.

The conservative-dominated court argued the act had largely served its purpose in encouraging equal access to the ballot box and said it was unconstitutional to continue singling out southern states for extra scrutiny without new legislation to determine signs of ongoing discrimination.

For nearly 50 years, the law forced certain, mostly southern states to seek permission from federal authorities in Washington for any changes to electoral rules, such as introducing literacy tests to reduce voter registration among minority groups.

However, chief justice John Roberts ruled on Tuesday that although there were some signs of continued racial discrimination, it was no longer sufficient to justify legal discrimination against the southern states caught up by the rules.

"Voting discrimination still exists; no one doubts that," Roberts wrote, in the majority opinion. "The question is whether the act's extraordinary measures, including its disparate treatment of the states, continue to satisfy constitutional requirements."

The logic was rejected by four of the nine justices who split along the ideological lines that increasingly divide the supreme court. Justice Ruth Bader Ginsburg, writing for the minority, read out a stinging dissent from the bench: "The sad irony of today's decision lies in its utter failure to grasp why the VRA has proven effective," she said.

"Throwing out preclearance when it has worked and is continuing to work to stop discriminatory changes is like throwing away your umbrella in a rainstorm because you are not getting wet."

The court did not strike down the core of the act, the advance approval requirement itself, in section five. But it invalidated section four, which sets the conditions under which parts of the US must submit voting changes to federal monitoring. Unless Congress comes up with a new formula, which it has repeatedly failed to do in the past, section five cannot be enforced.

The five justices in the majority pointed to evidence showing that voter registration among African Americans was now higher than white voters in four of the five original states targeted by the legislation.

"Nearly 50 years later, things have changed dramatically. Largely because of the Voting Rights Act, voter turnout and registration rates in covered jurisdictions now approach parity," the majority opinion said. "Blatantly discriminatory evasions of federal decrees are rare and minority candidates hold office at unprecedented levels."

Roberts said Congress could pass new legislation to modernise tests determining which states should abide by the pre-clearance rules. But previous attempts to do this have failed despite a far less polarised political climate.

Barack Obama and other leading Democrats sounded a gloomy note. Obama said: "I am deeply disappointed with the supreme court's decision today. For nearly 50 years, the Voting Rights Act – enacted and repeatedly renewed by wide bipartisan majorities in Congress – has helped secure the right to vote for millions of Americans. Today's decision invalidating one of its core provisions upsets decades of well-established practices that help make sure voting is fair, especially in places where voting discrimination has been historically prevalent.

"As a nation, we've made a great deal of progress towards guaranteeing every American the right to vote. But, as the supreme court recognised, voting discrimination still exists." He called on Congress to pass new protections for minorities.

Speaking soon after the ruling, attorney general Eric Holder also said he was "deeply disappointed" by the decision and joined president Obama in calling on Congress to act quickly to fix the legislation.

"As Congress correctly recognised in the hearings held in 2006 – racial and language minorities face significant voting discrimination in some parts of our country," said Holder. "Given the successful decisions in the department's Voting Rights Act cases over the last 18 months, the need for a vital – and intact – Voting Rights Act remains clear."

Senator Pat Leahy, the Democratic chair of the Senate judiciary committee, promised "immediate" action. He said in a statement: "section five of the Voting Rights Act has protected minorities of all races from discriminatory practices in voting for nearly 50 years, yet the supreme court's decision to overturn the coverage formula effectively guts the ability of section five to protect voters from discriminatory practices. I could not disagree more with this result or the majority's rationale."

Jon Greenbaum, chief counsel for the Lawyers' Committee for Civil Rights Under Law, which represented a black resident of the Alabama county that challenged the law, said: "The supreme court has effectively gutted one of the nation's most important and effective civil rights laws. Minority voters in places with a record of discrimination are now at greater risk of being disenfranchised than they have been in decades.

"Today's decision is a blow to democracy. Jurisdictions will be able to enact policies which prevent minorities from voting, and the only recourse these citizens will have will be expensive and time-consuming litigation."

But it was welcomed by Frank Ellis, the attorney for Shelby County, which brought the challenge. He said that areas covered by the act had changed in the past 50 years. He said that Alabama in 1965 "was a different time, a different place. It didn't resemble what it is now. I know there was discrimination in 1965, but I also know that what we were doing then is not a relevant barometer of what we are doing now in 2013. It's not fair to over-ride our sovereign jurisdiction based on a formula that is almost 50 years old."