A consultant working for the SNP met Cambridge Analytica three months before the last Holyrood election, Nicola Sturgeon has revealed.

The first minister told MSPs the meeting was held in February 2016, but refused to say who the consultant was.

And she said it was the Conservatives who were "mired in links to Cambridge Analytica" rather than the SNP.

A former director of the firm told MPs on Tuesday that it had pitched to the SNP but no work was done.

The company has been under fire over the use of Facebook users' personal data in Donald Trump's US presidential campaign, and has been linked to the Leave.Eu campaign ahead of the Brexit vote.

Earlier this week Brittany Kaiser, who was the data harvesting firm's business development director, told a Commons committee that there had been "pitches and negotiations" with the SNP at meetings in London and Edinburgh.

'Bunch of cowboys'

The revelation left SNP MP Brendan O'Hara - who had been questioning Ms Kaiser at the time - visibly shocked.

A SNP spokesman later said an "external consultant" had held one meeting in London and judged the firm to be "a bunch of cowboys" - with no work having ever been carried out by Cambridge Analytica for the party, and no money being paid to the company.

The party's Westminster leader, Ian Blackford, has indicated he did not know about the meeting before it was mentioned by Ms Kaiser, and said it "would have been better if that information had been made available earlier".

Image copyright Reuters Image caption Details of the meeting first emerged during Brittany Kaiser's evidence to a Commons committee on Tuesday

The meeting was raised by Scottish Conservative leader Ruth Davidson amid angry scenes at First Minister's Questions on Thursday.

Ms Davidson demanded to know when the meeting took place, where it was held, and who the consultant representing the SNP had been, saying that these should be "very simple questions to someone who is committed to full transparency".

She also claimed that it "looks pretty shifty" that the SNP had not given more detailed information, and accused the party of being happy to "fling out allegations at opponents" while failing to give full transparency themselves.

Ms Davidson added: "I know the SNP have raised sanctimony to an art form, but what stinks here is the reek of hypocrisy."

'Done nothing wrong'

Ms Sturgeon said the meeting was held in February 2016 - three months before the Scottish Parliament election in May of that year.

But she said she was unwilling to "name somebody who has done nothing wrong, who was working on behalf of the SNP, in order that a witch hunt can be carried out into that person".

Ms Sturgeon said: "Yes, two years ago, before the concerns we're talking about now had come to light, somebody on behalf of the SNP had a meeting with Cambridge Analytica.

"We decided we didn't want to do any work with them, and as a result we've never hired them, we've never paid them any money, they have never done any work for the SNP and they have never done any work for the Scottish government."

Image caption There were angry scenes in the chamber when the meeting was raised by Ruth Davidson

Ms Sturgeon also spoke of the "many and legion" links between Cambridge Analytica, its parent company SCL and the Conservative Party.

She said these included a former chairman of the Oxford Conservative Association who had once run SCL.

Ms Sturgeon said SCL's founding chairman was a former Tory MP, while a director of the company donated more than £700,000 to the Conservatives.

The first minister said: "We know the UK government has had, reportedly, a close working relationship with SCL and the MoD paid them £200,000 for carrying out two separate projects.

"According to the Guardian, SCL Group was actually granted by the Ministry of Defence what's called List X Status. That means they can access secrets documents."

Ms Sturgeon added: "So I can say two things categorically: The SNP has never worked with Cambridge Analytica, and the Scottish government has never worked with Cambridge Analytica.

"I'm not sure the Conservative Party or the UK government can say the same thing."