A judge is demanding answers after he was forced to let a 17-year-old drug dealer walk free instead of locking him up for up to six years.

In what he described as “an incredible case”, Judge Jonathan Rose said he was unable to punish the teenager for his escalating crimes.

Judge Rose said to the drug dealer: “You should be going through that door down to the cells and thence to a detention and training centre for between four and six years.”

But Judge Rose told Bradford Crown Court yesterday his hands were tied and it would be “wrong in principle” to send the youth to custody.

The teenager, who cannot be identified because of his age, was arrested in March when police found 120 wraps of heroin and 51 wraps of crack cocaine at his Bradford home.

He told officers he was paid £75 a day to bag and deliver heroin and crack cocaine.

While on bail, he was arrested with a hundred wraps of heroin, a hundred of crack cocaine and more than £600 in drugs money.

On July 29, the teenager was sentenced to a 12-month Referral Order at Bradford Youth Court for the latest offences.

Judge Rose asked prosecutor Richard Canning to find out why the Crown Prosecution Service (CPS) allowed the Youth Court to sentence the 17-year-old when he was on bail to the Crown Court for the earlier matters.

The judge said the offences were identical – except he had progressed from bagger to dealer.

He now felt obliged to deal with the youth, who was 16 at the time, as vulnerable and under pressure from others.

“The Youth Court, with full knowledge that he was on bail and due to appear for sentence at the Crown Court, dealt with him by way of a Referral Order,” Judge Rose said.

“This is an incredible case and I am astonished about what has happened.”

He said the CPS and the Youth Court must provide an explanation.

“Today’s outcome is in his (the defendant’s) best interests but not necessarily in the best interests of the public,” Judge Rose said.

The teenager was sentenced to a 12-month Youth Rehabilitation Order with an overnight curfew.

After the case, Michael Quinn, Senior District Crown Prosecutor, said: “We understand the concerns of Judge Rose in this case. We will investigate what information was provided to the youth bench so that we can be satisfied that they had all the relevant information before they made their decision to retain the case.”