The world's richest man has accused Humza Yousaf of being a "blatant racist" in a row over a three-year-old speech.

Elon Musk's outburst was in response to comments made by the First Minister in 2020 about the lack of diversity in Scotland's establishment. 

The video was shared by an account called “End Wokeness”, which erroneously claimed the SNP leader “openly despises white people”.

“Why would Scotland’s Parliament and King select a guy who hates almost 100% of the country?” the post read.

Replying the X owner claimed the First Minister was a "blatant racist."

On Friday morning, without mentioning the South African billionaire, the First Minister shared a gif of Navid from Still Game dancing, saying this was his response to "Racists foaming at the mouth at my very existence."

READ MORE: Humza Yousaf urges people to tell bigots: 'F*** you'

A spokesperson for Mr Yousaf later said the First Minister had long "been on the receiving end of racist hate, abuse and death threats his entire life, and has stood firm against hatred and bigotry, of any kind, throughout." 

They added: "Sadly, much of the racist abuse and threats of violence the First Minister faces are directed his way on X, formerly known as Twitter. 

"Mr Musk should use his position to tackle the racism and hatred that goes unchecked on the social media platform he owns."

The 55-second clip of Mr Yousaf's 10-minute speech has been shared widely on social media over the years, often by accounts linked to the alt-right.

The speech was delivered when Mr Yousaf was justice minister and came during a debate in the aftermath of the Black Lives Matter protests which had swept across the globe following the murder of George Floyd.

He told MSPs:  "In 99% of the meetings I go to, I am the only non-white person in the room".

He then said: "But why are we so surprised when the most senior positions in Scotland are filled almost exclusively by those who are white?

"Take my portfolio alone. The Lord President: white. The Lord Justice Clerk: white. Every High Court judge: white. The Lord Advocate: white. The Solicitor General: white. The chief constable: white. Every deputy chief constable: white. Every assistant chief constable: white. The head of the Law Society: white. The head of the Faculty of Advocates: white. Every prison governor: white.

"And not just justice. The chief medical officer: white. The chief nursing officer: white. The chief veterinary officer: white. The chief social work adviser: white.

"Almost every trade union in this country, headed by people who are white. In the Scottish Government, every director general is white. Every chair of every public body is white. That is not good enough."

Earlier this year, Reuters carried out a "fact check" on the speech following the online controversy.

They said Mr Yousaf's comments had been "misrepresented online by those suggesting it shows the Scottish National Party politician arguing that Scotland contains too many white people"."

"Humza Yousaf’s speech expressed anger at racial injustice and highlighted the lack of diversity in Scotland’s Parliament and Government."

READ MORE:  Covid Secrecy row as Jason Leitch deletes WhatsApp messages

Mr Yousaf has previously spoken out about the impact of being targeted on social media, including by US-based far-right figures.

"Being the recipient of online abuse has become a regular feature of my life in public service," he told The Scotsman this summer.

“That doesn't mean we should simply accept it. It is important that we do everything we can to stamp it out."

He added: "I know that the overwhelming majority of people in Scotland want to live in a country where all minority groups are not just protected, but accepted for who they are – and as First Minister I’m determined to use the office to help build a country where all of our citizens live a life free from hatred

It’s the second time in recent months that the First Minister has been abused in relation to his controversial speech.

He was attacked in August at the Fringe after a furious heckler shouted "f*** you" at him.

Political activist Niall Fraser called the SNP supremo a "pestilence on the land" and branded him "despicable".

Today marks the first anniversary of Mr Musk's £36bn takeover of Twitter.

In the last year, he has sacked more than half the company’s staff and changed the social media site's name.

He also been embroiled in a string of controversies, in part because of his commitment to absolute free speech.

That has meant that a number of accounts previously banned for hate speech have been reinstated.