The funeral of a baby who died last summer will be organised by the council after his parents, suspected of his killing, failed to make arrangements.
High Court judge Mr Justice Hayden heard the little boy died when he was a few months old after suffering brain damage.
Both his parents - who have not been identified - have been accused of killing him following a police investigation.
They have been released on bail and are due to go on trial later this year.
Lawyers representing council bosses told the judge a coroner had released the boy's body for burial in October.
But no funeral has been arranged and his remains were still at a mortuary.
The judge was told the council, which also cannot be identified for legal reasons, was prepared to pay for the funeral after the boy's parents missed a series of appointments with undertakers.
Public health legislation can allow local authorities to organise a funeral.
Judge Hayden, sitting at a hearing in the Family Division of the High Court in London on Friday, described the case as "extremely rare" and urged the boy's parents to participate.