The records of nearly 500,000 people have been deleted from a Police Scotland database designed to protect vulnerable people, new figures show.
The list allows officers attending incidents to add people who they consider to be at risk of future harm.
But three years ago the force fell foul of the Information Commissioner who said there needed to be a policy for removing people from the database.
It has now emerged that weeding process saw 494,039 records removed.
Concerns about the Vulnerable Person Database (VPD) included some people not being told that they had been put on the system.
But Police Scotland said the database helps "maximise opportunities to provide early intervention, prevention and to reduce harm".
The force also added that the VPD, which currently has about 267,000 people on it, has new records and incidents added and removed "every hour of every day".
'No good reason'
But Matthew Rice, Scotland director of the Open Rights Group, a digital rights pressure group, said the VPD should stay under review to prevent it becoming a "sweeping data gathering exercise".
He added: "This confirms exactly what we'd been concerned about since we learned of the VPD; that hundreds of thousands of people in Scotland had their personal data added to a database and shared with public bodies without their knowledge or consent for no good reason.
"This deletion exercise is a welcome development. Police Scotland should have done this sooner, but this cannot be a one-off."
The rationale behind the VPD is partly to prevent cases such as the "entirely avoidable" death of 11-week-old Caleb Ness, who was killed by his father in 2001 after public authorities failed to communicate key information about his wellbeing.
It involves collating disparate pieces of information about a particular vulnerable individual into a single file - allowing officers to build a narrative about that person.
At a supervisor's discretion, the file can be shared with other public bodies such as social work departments so that the person receives support.
Police Scotland ran into difficulty when, because the database was set up as an interim measure with the new force in 2013, it had no policy for removing data when it was no longer applicable.
The Information Commissioner's Office said this breached the Data Protection Act.
Impact of the weeding policy
A weeding and retention policy went live in February 2019 and an initial sift saw 309,480 people removed, according to data released to BBC Scotland under freedom of information laws.
Between February last year and July this year the records of a total of 494,039 people, and 74,620 incidents, have been deleted.
A snapshot of the database taken on 30 June shows 267,948 people were on the VPD.
This includes 94,341 people of "no concern" because people moved into this category have their details retained for six months before being fully removed.
A further 79,666 reports relate to children, 49,438 are adult concern reports and 30,462 are domestic abuse reports.
The 2020 haul is down from a total of 438,790 captured in a 2019 snapshot.
'Robust procedures in place'
Ch Insp James Davenport said the database only existed to record information about people "who are, or are perceived to be, experiencing some form of adversity and vulnerability".
He added: "The database provides visibility across Scotland and maximises opportunities to provide early intervention, prevention and to reduce harm.
"Police Scotland implemented a bespoke solution for the weeding and retention of records to ensure and safeguard the appropriate handling of personal information, as well as the necessary robust procedures to ensure the correct details are either removed or retained."