Child protection services in Dundee have been severely criticised in a report by inspectors.
The report from Her Majesty's Inspectorate of Education (HMIe) said many youngsters did not get help until the situation was at crisis point.
Publication of the study was brought forward following the death of 23-month-old Brandon Muir.
Brandon was killed by his mother's drug addict boyfriend Robert Cunningham, who was sentenced to 10 years in jail.
Cunningham is appealing his culpable homicide conviction.
Child protection services in Dundee were inspected in February and March of this year. The Brandon Muir trial was taking place at that time, although the case was not considered by inspectors.
Inspectors examined the workings of the city council, police, NHS Tayside, the Scottish Children's Reporter Administration and voluntary and independent groups.
Child protection services were rated "unsatisfactory", which meant there were major weaknesses, in one area - that of making sure that children were helped in immediate response to concerns.
In particular, there was concern about the help given to children who were exposed to domestic abuse, their parents' drug and alcohol problems and mental ill health.
The HMIe report found that Dundee was "weak" in eight of the 18 quality indicators examined. Services were rated "satisfactory" in six areas and "good" in three.