A 16-year-old girl turned to drug dealing on the streets of Bradford after her stepfather was forced to give up work because of a rare cancer.

Bradford Crown Court was told that when the teenager's mother also had to quit her job to care for him, she decided to help out the family finances by selling heroin and crack cocaine.

The girl, who cannot be identified for legal reasons, left her own low-paid job and made contact with a drug dealer who provided her with a mobile phone and told her where to collect the drugs from a hiding place.

Prosecutor Howard Crowson said that when she was arrested in January she was found to be in possession of 18 packages containing crack cocaine, four wraps of heroin and £387, which she admitted had come from drug sales.

Yesterday the teenager, now aged 17, pleaded guilty to supplying the Class A drugs over a two-week period and being in possession of crack cocaine and heroin with intent to supply.

Judge Roger Scott reluctantly locked the girl up yesterday under a two-year detention and training order, but stressed that even that was a lenient sentence because of the exceptional nature of the case.

He said normally such cases resulted in custodial sentences of four or five years and he told the girl: "It is a very serious problem in West Yorkshire and peddling crack cocaine is on the increase and has to be stopped.

"So really I should lock you up for five years, but I look at your father and I look at your mother and I say to myself this cannot be right. You did it for the best of reasons and they are going to suffer.''

Judge Scott said he would have liked not to have sent her to custody at all, but that would be wrong because other people with good mitigation might expect a similar type of sentence.

The tearful youngster was hugged in the dock by her stepfather before she was led away by a member of the Group Four security staff to begin her sentence.

Judge Scott ordered that the money recovered from the girl should be given to the West Yorkshire Police drugs squad.