Washington (AFP) – After a century of failed attempts, the US Senate finally passed legislation Wednesday that makes a federal crime of lynching, the racism-driven extrajudicial killings that came to symbolize America’s stained past.

The chamber’s three African American senators — two Democrats and one Republican — introduced the bill earlier this year.

It passed by a unanimous voice vote in “a very meaningful moment for this body,” said Senator Cory Booker, who is seen as a potential 2020 presidential contender.

“We have an opportunity to recognize the wrongs of our history, to honor the memories of those brutally killed, and to leave a legacy that future generations can look back on knowing that after 200 attempts, and a century of trying, that on this day in American history, this body did the right thing.”

The Justice for Victims of Lynching Act describes the crime as “the ultimate expression of racism” following the Civil War, and notes that at least 4,742 people, mostly blacks, were lynched in the country between 1882 and 1968.

Ninety-nine percent of the perpetrators escaped punishment by state or local officials.

The bill is largely symbolic, as lynchings are seemingly part of the nation’s past.

But sponsoring Senator Kamala Harris, another Democrat who may challenge President Donald Trump in 2020, said it will “offer some long-overdue justice and recognition” to victims, and help Americans “speak the truth about our past.”

The presiding officer during the vote was Senator Cindy Hyde-Smith, a Mississippi Republican who triggered an uproar last month after joking she would attend a “public hanging” if invited by a supporter.

She later apologized.

It remained unclear whether the Republican-controlled House will take up the bill this year, or let it lapse until 2019, when Democrats regain the majority.

Between 1920 and 1940, the House passed three anti-lynching measures. But despite pleas by seven US presidents, the Senate failed to act.

In 2005, the Senate issued an apology for its past failures on the issue.