Centenarians, pre-school children and babies are among tens of thousands of people whose details are stored on internal council databases due to their deemed potential threat to staff, an investigation has found.
Authorities across England identified more than 25,000 service users whose details are flagged on registers sometimes referred to as cautionary contacts lists (CCL), designed to warn staff of a potential risk to their safety.
In some cases, authorities highlighted residents' criminal records, history of violence against women, religious fundamentalism and aggressive behaviour towards employees as a reason for their addition to the lists.
They include a man who keeps a "samurai sword over his front door and a mallet by his bed", another armed with "a machete, catapult and axe" at their home, and one man who attempted to knock down two council workers with his van.
Others identified dangerous pets and safety hazards within the client's home, as well as examples of racist and homophobic behaviour - including a woman who expressed anti-Muslim views and wanted to choose the ethnicity of the staff member she dealt with.
Some councils identified a number of registered sex offenders on their list, while one council added a client to their database for accessing extremist websites.
The data was obtained by the Press Association from 76 authorities with details through Freedom of Information laws.
A 106-year-old man was kept on Central Bedfordshire's list for almost 10 years for being "a risk to self and others".
The council told the Press Association: "Whilst the list of adult social care clients is lengthy, this includes records of individuals who the council has worked with at any time over the past 11 years.
"A number of these cases will no longer be current but, for those which are, the customer record flag is an important means of alerting the staff who will be working with them."
A four-year-old deemed "physically or sexually threatening" and two three-year-olds for being violent to staff or other professionals were flagged on Essex Council's own social services database.
In a statement, it said young children included on the list had been flagged "as a result of concerns about other people in their households/families".
The council added: "It is important to emphasise that the list provided has been compiled specifically in response to the Freedom of Information Act request and we do not hold a cautionary contact list.
"The records used to compile the list come from our social services database, where people can be flagged if concerns are raised.
"We have a duty of care to our employees and take their safety extremely seriously.
"It is very important that appropriate measures are in place to make them aware of risks and protect them from potential harm."
Some files date back to when clients were very young children, while others are kept without notifying clients about their inclusion due to concerns that exposing the list could further ignite tensions.
Many said they reviewed their databases regularly, although some councils disclosed examples of clients being left on file for decades.
Data from six councils with gender-related information about those listed found 229 were male, compared with 52 female.
Almost 1,500 service users were identified as not to be visited by a lone council worker, a woman, or at all.
A Local Government Association spokesman said: "Councils have a duty of care to their employees to ensure they are safe and aware of risks when carrying out their work.
"Local authorities keep cautionary contacts lists purely to protect staff who are in regular contact with local residents and businesses.
"Councils take their responsibilities under data protection law very seriously and, despite limited resources, are investing in robust systems to further safeguard confidential information prior to the implementation of the General Data Protection Regulation in May 2018.
"As far as we are aware, local authorities have complied with the law in the way they are recording data while maintaining these lists."