WASHINGTON — President Obama on Tuesday said he was “deeply disappointed” with the Supreme Court’s 5-to-4 decision ruling a central piece of the 1965 Voting Rights Act unconstitutional, and he called on Congress to pass legislation protecting access to voting.

The president registered his critique in a written statement issued by the White House that noted the law’s bipartisan legacy and the Supreme Court’s acknowledgment, in the ruling, that discrimination persists.

“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,” the statement read. “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.”

Mr. Obama’s attorney general, Eric H. Holder Jr., who is named as the defendant in the case, Shelby County v. Holder, used similar language to criticize the court’s decision.