Fife police falsified paperwork claiming checks had been carried out on a Cowdenbeath man who died in police custody.
A Fatal Accident Inquiry found police officers failed to check on James Bell, 31, regularly enough because they assumed he was sobering up from alcohol.
The investigation also discovered a mystery log entry claiming a visit to his cell had been made when CCTV footage proved otherwise.
Sheriff Ian Abercrombie, who oversaw the FAI, heard that on admission to custody Mr Bell was required to be visited and roused at least every 30 minutes.
Sheriff Abercrombie continued: “It is clear that Mr Bell was not visited and roused at least every 30 minutes.
“It is also clear that at least one visit to Mr Bell’s cell is recorded as having been made when in fact no such visit was made.
“The discrepancy between the CCTV footage and the custody log in this respect was not satisfactorily explained to me by any witness.
“No one accepted responsibility for this entry. Although the log entry was made under the name of the PCSO (Police Custody Security Officer) on duty at the material time, she was anxious to explain to the court that she did not ‘log out’ of the computer after recording each visit.
“Just how this entry came about is accordingly somewhat of a mystery.”
Dad-of-four James Bell, a gardener, lived with his children and partner Debbie Douglas in Dalbeath Crescent.
Struggling with depression, he had been admitted to Queen Margaret Hospital in Dunfermline in early June 2011 suffering from a methadone overdose.
He signed himself out of hospital but was later found by police walking on the M90 in the early hours of June 5.
At 7pm that night Mr Bell was found unconscious in his cell and efforts to revive him failed. He was taken to Queen Margaret Hospital but was pronounced dead on arrival.
CCTV footage showed Mr Bell swaying at the charge bar of the police station and struggling to stay awake. He would normally have been placed in an observation cell, which has CCTV camera surveillance.
There are two such cells in Dunfermline Police Station but both were already occupied.
Sheriff Abercrombie said: “It was clear to me that the observations which were carried out were done less frequently than were required on the assumption that Mr Bell was, as time progressed, sobering up.”
The sheriff heard that the PCSO alleged that she had received no training apart from “on the job” training from other colleagues.
She was due to start her first custody training course several weeks after Mr Bell’s death, by which time she had already been in post for several months.
Sheriff Abercrombie stated: “There was a complete lack of comprehension on the part of the PCSO on day duty about what she should be doing.
“She had no proper awareness of the manual and its operating procedures. On-the-job training for such a responsible position is, to my mind at least, inadequate.”
The emergency services have said changes will be implemented.
Medical director at NHS Fife Brian Montgomery said: “The board has received a copy of the sheriff’s determination and we will be working with other agencies as required to pursue the recommendations.”
Despite the FAI judgment being freely available from the court, a Police Scotland spokesperson stated that because the report had not been formally published they were not able to make a statement regarding its conclusions at this time.