WASHINGTON — The Supreme Court on Tuesday effectively struck down the heart of the Voting Rights Act of 1965 by a 5-to-4 vote, freeing nine states, mostly in the South, to change their election laws without advance federal approval.

The court divided along ideological lines, and the two sides drew sharply different lessons from the history of the civil rights movement and the nation’s progress in rooting out racial discrimination in voting. At the core of the disagreement was whether racial minorities continued to face barriers to voting in states with a history of discrimination.

“Our country has changed,” Chief Justice John G. Roberts Jr. wrote for the majority. “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.”

The decision will have immediate practical consequences. Texas announced shortly after the decision that a voter identification law that had been blocked would go into effect immediately, and that redistricting maps there would no longer need federal approval. Changes in voting procedures in the places that had been covered by the law, including ones concerning restrictions on early voting, will now be subject only to after-the-fact litigation.