A man handed bags of cocaine to a police officer's children out trick-or-treating on Halloween night, thinking he had given them sweets, a court has heard.
The apprentice panel beater Donald Junior Green fished in his pockets for a bag of Haribo sweets to give to the youngsters but instead pulled out a plastic pack containing eight snap bags of cocaine he had bought for £200 earlier that day, Oldham magistrates court heard.
He dropped the drugs into the goody bags carried by the three children, aged eight, six and five, who knocked at his home to play trick or treat, escorted by their father, an off-duty police officer.
The 23-year-old defendant then went back inside the house, put his hand in his pockets to get out his drugs and instead pulled out the Haribo sweets.
Green immediately realised what had happened and went on foot, then by car, scouring the streets of Oldham nearby to find the youngsters.
But the officer, PC Simon Fowell, had taken his children home and, as they emptied their goody bags to share the spoils, spotted the drugs and made a swift call to his on-duty colleagues.
Green admitted a single charge of possessing a Class A drug on 31 October.
Green, of Oldham, will be sentenced on Monday after the preparation of a probation report.
Sean Brady, prosecuting, told the court Green was at his girlfriend's house in Royton when the incident happened.
The defendant had earlier that day bought £200 worth of cocaine, divided it up into snap bags and put it in his trouser pocket.
His girlfriend had also bought some small bags of Haribo sweets which they had been handing out to trick-or-treating youngsters that evening.
When Fowell's children approached, Green put his hand in his trouser pocket and pulled out what he thought were Haribo sweets.
Brady told the court: "Mr Fowell and the children thanked the defendant. That was their last call of the evening and they decided to go home. The children were soaked to their skin."
Back home the children went up to their bedroom to share out the sweets when their father popped in and spotted the "treat" from Green.
"He asked his daughter where this item came from. She said it was from the last call," Brady told the court.
Meanwhile, Green had realized his mistake.
Brady added: "Once he has gone back inside and put his hand in his pocket again and instead has pulled out a pack of Haribo and immediately realised what he had done. He then drove around the area trying to locate the children."
When Green answered the door to police who arrived to arrest him, he told them: "I know exactly why you are here. I knew you were coming."
Brady said there was a "wry" side to the case but the consequences could have been very serious.
"Had dad not have gone in and recognized what it was, this could have been a very serious case."
Steven Sullivan, defending, said Green had initially acted out of "public spirit" by giving out sweets but that had gone badly wrong.
"This was an accidental act. It was grossly foolhardy," he said.
"It took him only a matter of minutes to realize his error.
"This is clearly a highly unusual and unfortunate case. Not surprisingly it has attracted a good deal of adverse publicity.
"He has been embarrassed by the publicity but does not seek to feel sorry for himself."