MSPs have voted to repeal the Offensive Behaviour at Football Act.
A majority of MSPs from across all four opposition parties backed a Repeal Bill despite warnings from the Scottish Government that it would create a gap in a law.
It will be officially scrapped once it reaches Royal Assent next month.
A total of 1319 people have been charged under the law, according to the latest figures from the Scottish Government up to March 2017, since its introduction.
The legislation was passed by the Scottish Parliament in 2011 when the SNP held a majority of seats in the chamber.
The law has been derided by campaigners and members of the legal establishment since its introduction, with one sheriff branding it “mince” during a case in 2014.
Labour MSP James Kelly introduced the Repeal Bill to Holyrood and called the law “a failure” which “has not tackled bigotry”.
“Football fans have been classed as second class citizens,” Kelly said.
He added: “It is time for it to go.”
As well as outlawing racist behaviour, which stirs up hatred and public disorder surrounding football, the Act also prohibited “other behaviour that a reasonable person would be likely to consider offensive”.
STV News learned on Wednesday the Lord Advocate already instructed prosecutors to use pre-existing laws statutory offences or common law, such as breach of the peace, to police fan behaviour going forward.
Speaking ahead of the debate, community safety minister Annabelle Ewing said: “The Act is supported by a number of victims and equality groups and research published by Youthlink Scotland and ScotCen Social Research into sectarian language used on social media this week has again confirmed the direct link between sectarianism and football in this country.
“Repeal will compromise the ability of police and prosecutors to charge people for unacceptable behaviour and those supporting repeal have failed to recognise how removing legislation designed to protect vulnerable and minority communities will have a negative impact.”