WASHINGTON — The House voted on Friday to reinstate federal oversight of state election law, moving to bolster protections against racial discrimination enshrined in the 1965 Voting Rights Act, the landmark civil rights statute whose central provision was struck down by the Supreme Court.

Representative John Lewis, Democrat of Georgia, who was beaten in 1965 while demonstrating for voting rights in Alabama, banged the gavel to herald approval of the measure, to applause from his colleagues on the House floor. It passed by a vote of 228 to 187 nearly along party lines, with all but one Republican opposed.

The bill has little chance of becoming law given opposition in the Republican-controlled Senate and by President Trump, whose aides issued a veto threat against it this week.

The measure is a direct response to the 2013 Supreme Court decision in the case of Shelby County v. Holder, in which the justices invalidated a key portion of the law. They asserted that the federal oversight of elections was no longer necessary in nine states, mostly in the South, because of strides made in advancing voting rights since passage of the 1965 law.