Police in the UK have a secret database containing the details of thousands of individuals referred to counter-extremism programme Prevent, with almost a third of referrals coming from the education sector, the Guardian has revealed.

Documents obtained by human rights group Liberty revealed the existence of the database, which contains personal details and reasons for referral for every one of the thousands of people referred to the programme. The person added is not notified.

The precise number of individuals on the database is unknown, but official statistics show that 21,042 individuals had been referred from 2015 to March 2018 alone.

Of the 7,318 people were referred to the Prevent programme in 2017-8, 2,426 were referred from the education sector.

The public aim of Prevent is to divert people from terrorism before offences are committed, but it has been criticised for being counterproductive and disproportionately targeting Muslims. The programme is currently undergoing a review in light of these accusations.

Information on the National Police Prevent Case Management (PCM) database is derived from referrals made by public servants, such as teachers and doctors, who are compelled under a statutory duty to report signs of extremism.

The PCM database is managed centrally by the national counter-terrorism policing headquarters. A Freedom of Information request by Liberty showed that the database is accessible to all police forces across the UK, as well as the Home Office.

Police chiefs said recording referrals ensures accountability and allows the forces to understand when vulnerabilities are increasing.

A National Police Chief’s Council spokesman said: “The public would expect the police to maintain professional records of those individuals referred for support as potential victims of radicalisation. This is no different to the way we record other forms of supportive safeguarding activity such as child sexual exploitation, domestic abuse or human trafficking.

“Good records ensure we are accountable, allow us to understand when vulnerabilities are increasing, and ensure we act consistently and proportionately, only taking action int hose cases where our support is necessary.

“If we did not maintain proper, legally compliant records, the public would rightly have far less confidence in the police.”

Any rank of police officer or staff can access the database, but users are vetted and given training before access.

Liberty policy and campaigns manager Gracie Bradley said: “This secret database isn’t about keeping us safe. It’s about keeping tabs on and controlling people – particularly minority communities and political activists.

“It is utterly chilling that potentially thousands of people, including children, are on a secret government database because of what they’re perceived to think or believe.”

Prevent was created as one of four strands of the government’s counter-terrorism strategy in 2003.