A drugged-out woman was found asleep at the wheel of her car – with a young child in the back seat.
Carol Mackinnon was discovered by police while parked in Nigg Kirk Road, Aberdeen earlier this year.
When officers looked in the vehicle, they also found a four-year-old boy, who was naked from the waist down.
The 39-year-old then attacked an office as he attempted to arrest her.
Mackinnon admitted the offences when she appeared at Aberdeen Sheriff Court yesterday.
Fiscal depute Cheryl Clark said officers were called to the street at about 9.30pm on June 20, where they found Mackinnon and the child.
After several attempts, police managed to rouse her but she was unable to speak because she was so intoxicated.
She added that as they attempted to put her in their patrol car, Mackinnon began struggling and hit Constable Lee Thompson in the face with her handcuffs.
Officers eventually managed to restrain her, and took her to Aberdeen Royal Infirmary.
Doctors later reported her as being unsteady on her feet, unable to speak and that her “eyes rolling in her head”, the court heard.
Defence agent Neil McRobert told the court Mackinnon’s state had been caused by a tablet, although did not say what substance was in the pill.
Mr McRobert said Mackinnon, of Simpson Avenue, Rothienorman, had felt police were being “heavy-handed” with her which led to her lashing out.
He said Mackinnon had a number of issues with drugs in the past, but had not taken any since September as she wants to turn her life around.
The court heard Mackinnon – who was on bail at the time of the offence – has previous convictions, including one for drink-driving.
Sheriff Graham Buchanan disqualified her from driving for two years and nine months, and put her under supervision for a year. He also ordered her to complete 120 hours of unpaid work in six months.
He warned her that if she did not cooperate with the orders “all options” would be open to the court.