Duncanmec, which makes refuse-handling equipment, fired nine workers who embarked on an illegal strike in 2013 and sang what the company deemed a racist song.
The disputed song included the lyrics: “climb on top of the rooftop and shout that my mother is rejoicing when we hit the boers (white Afrikaners)”.
The company went to the Constitutional Court seeking to have its decision to sack the workers upheld after a long legal battle.
It argued that political protest songs had no place in the modern workplace.
It said because the song was sung in front of managers in a disrespectful and aggressive way and that it ought to be considered racist conduct or hate speech.
But in dismissing the application, the Constitutional Court found that the word “boer”, which can mean white Afrikaner or farmer, is not an “offensive racist term”.
Known as struggle songs, political anthems were an important part of the liberation fight against South Africa’s apartheid government.
They are still often sung during protest action and at social gatherings.
Before reaching the Constitutional Court, the matter had been heard in lower courts and by an arbitration body.
The High Court ruled in 2011 against leftwing firebrand Julius Malema for singing a struggle song with the lyrics “Kill the boer”, saying it amounted to hate speech.