The Scottish Mail on Sunday can reveal that the SNP paid Facebook to identify supporters of rival parties, then bombard them with Nationalist propaganda. Pictured: Mark and Zuckerberg and Priscilla Chan

The SNP was last night embroiled in a new Facebook privacy row - after paying the social media giant to snoop on the personal profiles of Tory and Labour voters.

During the on-going row about Facebook selling the data of millions of users to private firm Cambridge Analytica, the Nationalists have been highly critical of the site, with one of the party's MPs branding it an 'unregulated wild west'.

But now – on the day that the site's founder Mark Zuckerberg issues a grovelling public apology – the Scottish Mail on Sunday can reveal that the SNP paid Facebook to identify supporters of rival parties, then bombard them with Nationalist propaganda.

Analysis of SNP invoices shows that, between the final weeks of the 2014 independence referendum, and last year's General Election, the party made dozens of payments to Facebook – totalling almost £100,000 - in return for adverts, which used data harvested from users' personal profiles to target them with campaign material.

Although Facebook is routinely used by all political parties as a platform for campaigning, the SNP went further by paying the site to use 'data-points' to identify supporters of political opponents.

And although the SNP did not directly buy access to Facebook users' data – as is alleged in the ongoing scandal surrounding the Cambridge Analytica company – critics said the party's actions were hypocritical.

Zuckerberg has apologised for the data breach of information of tens of millions of users

Our revelations come as the UK's data watchdog is investigating whether such adverts are potentially illegal and breach Data Protection laws.

Ahead of last year's General Election, Information Commissioner Elizabeth Denham wrote to every party, warning that such tactics were 'extremely annoying' for the public, and potentially unlawful.

The SNP has repeatedly condemned Facebook for allegedly sharing personal details with British data firm Cambridge Analytica.

Last week, Brendan O'Hara, SNP MP, demanded notoriously secretive Facebook CEO Mark Zuckerberg appear before the Digital, Media, Culture and Sport Committee, which he sits on.

'What we have at the moment is an unregulated wild west where data is harvested and used by, I would argue, some pretty sinister forces,' Mr O'Hara said.

SNP MP Mhairi Black also hit out at the use of Facebook data in the Cambridge Analytica scandal. Writing in a newspaper yesterday she it was 'utterly terrifying' that the company had been able to take information from Facebook 'to tailor propaganda and fake news to appeal to you and sway your opinion.'

Storage crates have been removed from Cambridge Analytica's London headquarters

She added: 'We must recognise that this is corruption at the highest level. This completely undermines and destroys quality democracy.'

However, new figures from the Electoral Commission show the SNP is actually a frequent customer and has paid Facebook £93,250 over the past three-and-a-half years.

Among dozens of invoices is one dated June 6, 2017, where the party paid the social media company £483.93 for items including '48,267 Impressions' made on the pages of 'Labour voters' and '33,162 Impressions' made on 'Tories.'

The SNP also paid to target Labour and Lib Dem voters on Instagram - which was bought by Facebook for £700million.

The party has also used people's personal data to aim adverts at different age groups or people living in constituencies where it was hoping to elect candidates.

SNP MPs Alan Brown and Joanna Cherry benefited from adverts placed on Facebook or Instagram, while they were also used in losing campaigns on behalf of Tasmina Ahmed-Sheikh, Callum McCaig and Kirsten Oswald.

SNP MP Mhairi Black also hit out at the use of Facebook data

The Electoral Commission figures do not show spending on Facebook by Scottish Labour, Scottish Tories or Scottish Lib Dems - although receipts for Scottish adverts could have been filed by the UK parties, which do admit to usiung the site.

However, the SNP's use of the site appears more sophisticated than Scottish rivals.

Targeting people with opposing views – such as supporters of other parties – was expressly criticised by Ms Denham, in letters to all political parties in May.

Brendan O'Hara (pictured), SNP MP, demanded notoriously secretive Facebook CEO Mark Zuckerberg appear before the Digital, Media, Culture and Sport Committee, which he sits on

She warned: 'The complaints we have received reveal that individuals find unwanted direct marketing, and unwanted contact from political parties in particular, to be extremely annoying.

'This is more likely to be the case where more intrusive means of contact are used or the individual has previously objected to marketing and where they are opposed to an organisation's views.'

The ICO is concerned that Facebook users are not given the opportunity to consent to being bombarded by 'dark ads'.

In a blog in May, Ms Denham added: 'This investigation is a high priority for my office. We're asking whether there was a legal basis to use this information. Did people have a way of exercising their privacy rights?'

That investigation is ongoing. However, last night democracy and privacy campaigners criticised the SNP's use of Facebook and demanded it 'walk the walk, not just talk the talk'.

Alexandra Runswick, director of Unlock Democracy, said: 'We agree that Facebook and the use of micro-targeting in political campaigning is the 'wild west'.

'But this should come as no surprise when Victorian electoral laws are trying and failing to regulate modern digital political campaigns.

'Political parties need to get a grip and walk the walk not just talk the talk, otherwise it's just a matter of time before another scandal erupts.'

Meanwhile, the privacy campaign Big Brother Watch called for the SNP to reconsider its use of Facebook.

Silkie Carlo, director, said: 'Political parties that advertise on Facebook are inadvertently supporting the company's surveillance, analysis and targeting of its users.

'Facebook is a tempting advertising space because it is an almost population-wide database that has an unparalleled ability to target the 'right' voters.

'But as the scandal this week has demonstrated, the cost of Facebook to our private lives and democracy itself are very high - too high, in our view.'

Last night The SNP insisted its use of Facebook was limited compared to other parties, and backed the Information Commissioner's plan to clean up the practice.

An SNP spokesman said: 'The SNP's social media success is powered by our mass membership, which means our Facebook spending is tiny compared to other political parties.

'We share the concerns of the Information Commissioner and want to see everyone operating within the law.'

When contacted by the Scottish Mail on Sunday, a spokesman for Facebook pointed to a statement issued in October.

In it, the company said: 'We're going to make advertising more transparent, and not just for political ads.'