The death of a toddler might have been avoided if care agencies had monitored him and his mother more closely, an inquiry has found.

Declan Hainey's body was found in his cot at his home in Paisley, Renfrewshire, in March 2010 when he would have been 23 months old.

His mother, Kimberley Hainey, was found guilty of his murder in 2011 after a trial but the conviction was quashed by appeal court judges last year.

A fatal accident inquiry into the circumstances surrounding the child's death was held at Paisley Sheriff Court over 36 days between May and July this year.

In a written determination published today, Sheriff Ruth Anderson said "on a balance of probabilities, neglect was a contributory factor" and stated that defects in the system contributed to his death.

She said the exact date and cause of death is unknown but added that "prolonged neglect" had been "at least a contributory factor".

She set out a number of factors where the death might have been avoided.

Sheriff Anderson stated that if medical information relating to Declan's mother's alcohol and drug problems had been passed to all social work and health staff with responsibility for the youngster, the case might have been handled differently.

The inquiry also found that if the agencies involved in the information-gathering process before and after Declan was born had obtained all the information which was available to them and assessed the risk factors realistically, it would have resulted in continued monitoring over a longer period of time.

She said health visitors should have been provided with all information available on the boy and his mother, which would have resulted in the case being categorised as one needing "intensive" support.

In her written determination, the sheriff said: "Having determined that, on a balance of probabilities, neglect was a contributory factor, the following defects in the system contributed to Declan's death.

"There was no system in place whereby one of the agencies responsible for Declan's well-being was in overall charge and there was no system whereby one named individual was responsible for co-ordinating all available information.

"This defect resulted in no formal inter-agency meetings taking place, especially in the period from February 2009.

"Had such systems existed, then those responsible for the care of Declan would have been aware of all that was happening and all that was not happening, and steps would have been taken to protect him from the risks resulting from Kimberley Hainey's inability to take proper care of her son."

She also said there was no system in place in relation to obtaining medical information which would have would have resulted in more protection for Declan.

The sheriff made four recommendations, including that when a notification of concern relating to an "unseen child" is made to any social work department, it should be treated with the "utmost priority".

In her conclusion, she acknowledged that management and staff have made changes to tighten procedures since Declan's death.

Agencies responsible for child protection in Renfrewshire said they fully accept the inquiry's findings and pledged to act on all the recommendations.

Andrew Lowe, independent chair of Renfrewshire child protection committee, said: "Declan's death was a tragedy. The loss of this young boy demands that all of us examine the findings from this inquiry very carefully and apply the recommendations it contains.

"Much has been done in the five years since Declan's death to strengthen child protection services in Renfrewshire. All of us involved in this work recognise the importance of a prompt and thorough response to the sheriff's findings."

He said the committee had already ordered an independent significant case review and all 16 of its recommendations, centred on improving the way agencies work together to protect children, have been implemented.

Mark Macmillan, leader of Renfrewshire Council, said: "In recent years, the organisations involved locally have put in place a series of improvements in the way we work together, monitor and act in such cases. We now have new evidence and new recommendations which will support that crucial work."

Annette Bruton, chief executive of the Care Inspectorate, the social care watchdog, said: "Declan's death was shocking and extremely distressing, and provoked deep sadness across Scotland.

"The outcome of this fatal accident inquiry poses serious questions for all agencies involved and we welcome the sheriff's recommendations."

She said inspectors assessed the relevant agencies after the significant case review and found that staff had taken the recommendations very seriously.

She said they would return to carry out a joint inspection of services for children and young people following the conclusion of the inquiry.