A drunk mother-of-four was arrested when she was found stumbling along O'Connell Street, pushing a baby in a buggy.
The woman (26) hurled abuse at gardai when they began enquiring about her safety and that of her child.
Judge Bryan Smyth spared her criminal convictions over the incident, dismissing public order charges under the Probation Act.
The accused, with an address at a Dublin mother and baby unit, pleaded guilty to public intoxication and using threatening, abusive and insulting words or behaviour with intent to cause a breach of the peace.
Dublin District Court heard the incident happened on O'Connell Street Lower at 9.35pm on March 4.
Gardai saw the accused stumbling while pushing a buggy.
She appeared to be intoxicated and the officers stopped and spoke to her.
She smelled strongly of alcohol, the court heard, and the officers became worried for her welfare, as well as that of the baby in her care.
The accused became aggressive and verbally abusive to the officers when they expressed concern.
This took place in full view of members of the public and the accused was arrested.
Section 12 of the Childcare Act was invoked in relation to the child and the woman was taken to a garda station.
The court heard she had one previous conviction, for a theft offence in 2013, and she had been given a suspended sentence at a district court in Co Cavan.
The woman had not come to the attention of gardai between 2013 and this latest incident, her lawyer said.
She acknowledged that she was intoxicated and her behaviour was "totally unacceptable", he added.
The accused had long-term mental health difficulties, and a letter from a counselling service she had been attending was handed in to court.
On the night in question, there had also been issues in relation to her self-harming in the garda station cell, her lawyer said.
She had three older children who were in care and the baby was now in care as well.
Her lawyer asked the judge for leniency and to deal with the case "in a certain way".