Image copyright Getty Images Image caption Lynching had previously been treated as a civil rights offence until the US Senate passed the bill this week

The United States Senate has unanimously approved a bill to make lynching a federal crime in the country.

Three black senators introduced the bill in June to allow lynching to be charged as a hate crime alongside existing crimes such as murder.

For much of US history, lynchings were rarely prosecuted at all.

More than 200 anti-lynching bills have been introduced to Congress since 1918, all of which have been voted down.

Lynching is murder by a mob with no due process or rule of law. In the US South in the 19th and 20th Centuries, thousands of African Americans were lynched by white mobs, often by hanging.

In a tweet, Senator Kamala Harris - one of the bill's architects - said the vote was "history."

'This stain on our country's history'

The bill was a bipartisan effort. It was first introduced earlier this year by Ms Harris and Cory Booker - both Democrats - and by Republican Senator Tim Scott.

According to the text of the bill, at least 4,742 people were reported lynched in the US between 1882 and 1968. It says 99% of all perpetrators had escaped punishment and called lynching "the ultimate expression of racism in the United States".

"Today, we have righted that wrong and taken corrective action that recognizes this stain on our country's history," Booker said in a statement following the vote on Wednesday.

Image copyright Getty Images Image caption Democrat Cory Booker was one of three senators to introduce the anti-lynching bill in June

The bill needed the backing of 60 Senators to pass. All 100 members voted in favour of the bill including Bernie Sanders, the former Democrat presidential contender, and Kentucky Republican Mitch McConnell, the Senator Majority Leader.

"I thought we did that many years ago," Mr McConnell said earlier this year in an interview with Sirius XM radio. "If we need one at the federal level, I certainly will support it," he said.

Presiding over the vote was Senator Cindy Hyde-Smith, a Mississippi Republican who stirred controversy last month after joking that she would attend a "public hanging" if invited by a supporter.

The first anti-lynching bill was introduced to Congress 100 years ago by Republican Representative Leonidas Dyer of Missouri. The bill passed the House but was opposed by Democratic senators from southern states and failed to pass the Senate.

In 2005, the Senate passed a rare resolution apologising for the repeated failure to approve anti-lynching legislation. The bi-partisan resolution was backed by 90 members of the Senate out of 100.

"Notwithstanding the Senate's apology and the heightened awareness and education about the nation's legacy with lynching, it is wholly necessary and appropriate for the Congress to enact legislation, after 100 years of unsuccessful legislative efforts, finally to make lynching a federal hate crime," the bill says.

A memorial to the victims of lynching was unveiled in the city of Montgomery, Alabama in April, the New York Times reports.