A TOP secret surveillance unit that had access to a GCHQ spy programme collecting information from people's private phones, emails and use of social media, was based in Glasgow and run by Strathclyde Police, the Sunday Herald can reveal.

Newly released classified documents from US whistle-blower Edward Snowden reveal that a previously unknown body called the Scottish Recording Centre (SRC) was given access to a GCHQ project codenamed Milkwhite.

The SRC was used by Scottish police forces to secretly access metadata via Milkwhite which collated information about people’s private communications, online activities and movements.

Milkwhite was also storing data on people’s usage of smartphone apps such as WhatsApp and instant messenger services.

Both GCHQ and Police Scotland have refused to say whether Milkwhite continues to monitor the public, although neither body said the project had ended.

The programme was set up by GCHQ to allow police to spy on people without any legal framework. However, the UK government is now seeking controversial powers which would cover such surveillance under the Investigatory Powers Bill, aka the snooper’s charter, which the House of Commons passed last week.

As part of Milkwhite, GCHQ made vast amounts of metadata available to MI5, the Metropolitan Police, Revenue and Customs, the Serious Organized Crime Agency, the Police Service of Northern Ireland, and the eight former Scottish police forces.

Documents from Snowden, a former CIA worker, reveal that access to metadata was provided to Scottish police forces via the SRC through an “internet data unit” hosted by the Serious Organized Crime Agency.

Snowden passed his latest batch of classified documents to American website, The Intercept, which has published information revealing Milkwhite for the first time.

Ryan Gallagher a reporter for The Intercept said: “The Snowden documents reveal the Recording Centre was secretly set up in Glasgow. It was created as a covert electronic surveillance unit within Strathclyde Police, before the force was merged into Police Scotland. Without public knowledge or any parliamentary debate, the Recording Centre established a link to the UK government's powerful spy agency GCHQ.

"Through the highly classified “Milkwhite” program, it was granted access to some of billions of data records GCHQ sweeps up daily about people's internet browsing activity, smartphone chats, and social media conversations. That Scottish police have been quietly tapping into GCHQ's surveillance troves for years is quite an extraordinary development. To hide a relationship of this magnitude from members of the public for so long is an abuse of state secrecy powers. It's a subversion of democracy that will only undermine trust in the authorities.”

Snowden is in exile in Russia after exposing the activities of America’s National Security Agency in 2013.

The SRC was also linked to GCHQ through a Home Office project called the National Technical Assistance Centre (NTAC).

NTAC was part of the Crime Reduction and Community Safety group. The former Association of Chief Police Officers Scotland (ACPOS) was listed by NTAC as a “primary customer”.

NTAC cost £25m to set up and was run by GCHQ from April 2006 although there’s been no mention of the unit on GCHQ’s website since November 2013.

Within NTAC, a Forensic Computing Team was responsible for providing technical support to UK law enforcement and intelligence agencies to assist them gain access to protected data and eavesdrop on phone calls through lawful interception.

John Finnie MSP, a former police officer and ustice spokesperson for the Scottish Greens, said he would raise the SRC's activities with the Scottish government.

Finnie said: “This blanket surveillance lacks any proportionality, is highly inefficient and has little, if indeed any, legal basis."

He added: "Everything points to this UK wide surveillance machine as being both out of control and entirely incompatible with the European Convention on Human Rights.”

GCHQ said: “It is long standing policy that we do not comment on intelligence matters. Furthermore, all of GCHQ's work is carried out in accordance with a strict legal and policy framework, which ensures that our activities are authorised, necessary and proportionate, and that there is rigorous oversight.”

A spokesperson for Police Scotland said: “Police Scotland does not discuss intelligence matters.”

A Scottish Government spokesperson said: “This is an operational matter for the Police Service of Scotland.”