The three young children knocked on the door, hoping for some traditional Halloween fare. But class A drugs, packaged in small plastic bags, were a bigger “trick” than they bargained for.

Donald Junior Green, 23, had intended to give the children a bag of Haribo sweets, and only realised his mistake after the children, aged eight, six and five, were gone, Oldham magistrates court heard.

The apprentice panel beater went out on foot, then by car, scouring the streets of Oldham to find the youngsters. But the children’s father, PC Simon Fowell, had taken his children home. He spotted the drugs as they emptied their goody bags to share the spoils and made a swift call to his on-duty colleagues.

Green, who had never been in trouble with police before, has a job and attends college, wiped his eyes with his hands as he stood in the dock and admitted a single charge of possessing a class A drug on 31 October.

He was given a 12-month community order, ordered to do 130 hours community work, and told he must pay court costs totalling £145 by chair of the bench Joyce Cooper.

£200 cocaine

Earlier prosecutor Sean Brady told the court that Green, of Sycamore Avenue, Oldham, was at his girlfriend’s house in Mendip Close, Royton, on Halloween night 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.

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. Steven Sullivan, defending

When PC Fowell’s children approached, Green put his hand in his trouser pocket, pulled out what he thought were Haribo sweets and dropped them in the goody bags they were holding.

Mr 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,” Mr Brady told the court.

‘Public spirit’ gone wrong

Meanwhile, Green had realised his mistake, Mr Brady added: “Once he’s 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.”

Mr 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 recognised 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 realise 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.”