A father was caught red-handed with 14 wraps of heroin after his release from a jail sentence for drug dealing, a court heard.

But Michael Peter Rowan, 50, escaped a return to jail after magistrates heeded his solicitor's plea to "let the punishment fit the crime".

They heard that single parent Rowan had been jailed for 18 months in 1998 at York Crown Court for possessing heroin with intent.

Mike Duffy, prosecuting, said that in August this year, police raided Rowan's home in Nunthorpe Road, York, and found 14 wraps of heroin and about £7.50 worth of cannabis.

Self-confessed heroin addict Rowan pleaded guilty to possessing the heroin and possessing the cannabis with intent to supply.

"Let the punishment fit the crime," his solicitor John Howard told magistrates, urging them not to send him back to jail.

Rowan had had no complaints about his 1998 sentence, as he had then been selling heroin for profit. But in 2000 he kept it for his own use.

He had intended to give the cannabis for "purely therapeutic reasons" to a woman who has suffered two strokes. She helps him look after his young son, for whom he has been the single parent since his wife died shortly after the child's birth.

Magistrates ordered Rowan to carry out 100 hours' community service and pay £120 costs. They had earlier said they were considering another sentence.

Mr Howard said Rowan intended to start working as a painter and decorator in Surrey in the New Year.

In 1998, Judge Arthur Myerson cut Rowan's sentence so he would not be separated for too long from his young son.

He confiscated £2,500 drug profits, but allowed Rowan to keep an inheritance so he could look after his son on his release.