A judge has defended his decision to order a 15-year-old sex abuse victim to be locked up overnight when she disappeared from court saying: "Those who decry the process that has taken place in this case should be careful what they wish for."

Judge Robert Bartfield was speaking as he sentenced Abid Miskeen, 32, to seven years in prison for sexual activity with a child at Bradford Crown Court today.

Miskeen was convicted yesterday by a jury that heard evidence from the girl, who was 14-years-old when Miskeen had sex with her in June 2013.

Earlier in the three-day trial, the girl disappeared when she was supposed to give evidence following a delay in the case.

Judge Bartfield agreed to a request from prosecutors to have the girl and other absent witnesses arrested by police and detained until she gave her evidence the next day.

He acknowledged "some concern has been expressed about this". But sentencing Miskeen today, the judge said to him: "What's plain is that had she not been present to give evidence, you would have walked free from the court last Thursday."

The judge said that although the girl was technically a prosecution witness, she was required to be at court as part of the defence case and Miskeen could not have had a fair trial without her evidence.

The judge explained that the girl supported Miskeen's argument that he did not know she was under 16 but, on the jury's verdict, she was lying to protect him.

He said: "The suggestion she was in some way forced into the witness box by the prosecution to give evidence on their behalf is wholly misconceived."

Charlotte Kenny, defending, confirmed that if prosecutors had not produced the complainant to give evidence, she would have made submissions that Miskeen could not have had a fair trial.

Judge Bartfield said: "For better or worse that's the way our system works."

Judge Bartfield made a statement explaining his actions.

He said: "When the case was called on, no witnesses were present, including the complainant, a 15-year-old girl, described a vulnerable.

"I granted an application by (the prosecutor) for a warrant for arrest of those witnesses after a full hearing, which is now a matter of public record.

"Some concern has been expressed about this but there needs to be a fuller understanding of what took place."

The judge said: "Without her evidence the trial would have collapsed."

He said the girl had been allowed out for a cigarette as she waited for the delayed trial to begin on Wednesday last week.

"It was thought that she still harboured strong feeling for the defendant," he said.

"She absconded and her whereabouts were not known.

"Her contact with other witnesses led the prosecution to believe she was seeking to influence them."

The judge said his comments were not intended to be critical of the girl "who was plainly driven by strong emotions".

He said: "The police and CPS, both of whom are under a duty of care to their witnesses, felt that there was no alternative but to apply for warrants of arrest for all of them, including (the girl).

"I pointed out that this could lead to the overnight detention of this complainant in a police station, which I wished to avoid. Other alternative ways of dealing with this were examined, including the delaying of the warrant until Thursday, but the officer in the case felt that this would not procure the attendance of the witness."

The judge said: "This was a serious allegation of sexual abuse. There is a strong public interest in proceeding to trial in such a case and I was not prepared to have it subverted."

Judge Bartfield said: "Unhappily, (the girl) spent the night in a police station and was produced in custody at court which no judge would like to see."

He explained that she had to spend a further four hours in the cells at court until it was time for her give evidence.

"I explained to (the girl) the reasons for her detention and my regret that there had been no alternative."

She appeared to understand and said she was sorry.

"She struck me as giving evidence as calm and clear in what she had to say."I believe that the interests of justice have been served despite the 'cost' to which I have referred."

Adam Pemberton, assistant chief executive of Victim Support, said: " It is utterly shameful that any vulnerable witness let alone a child who has been the victim of sustained sexual exploitation could be treated in such a grotesque and, frankly, degrading manner by those who are supposed to be protecting her.

"The spectacle of a child spending the hours before she gives evidence against her abuser locked up in cells at a police station and at court is nothing short of Dickensian and must never be allowed to happen again.

"This victim needed to be supported not criminalised and her treatment underlines how critical it is that the police, the Crown Prosecution Service and the courts understand and prioritise the needs of vulnerable victims and witnesses."

The judge heard how the girl was made pregnant by father-of-two Miskeen and later chose to have a termination.

He told the defendant: "You befriended her, effectively groomed her into having a relationship with you and your intention was to have sexual intercourse with her."

He heard that Miskeen had a string of previous convictions, including for robbery, assault and dangerous driving, but none were for sexual offences.

The judge said he was given a community order in 2012 for punching his partner and he was in breach of this order at the time of the offence against the girl.

He said Miskeen would be on the sex offenders register for life.

"You have not shown one iota of remorse or regret for what you did," Judge Bartfield said.

"Your only regret is for the circumstances you now find yourself in."

The judge gave Miskeen the maximum sentence possible for this category of offence.

A Crown Prosecution Service spokeswoman said: " Seeking a warrant and remanding a child witness is an exceptional step and all other options were explored and exhausted before the warrant was applied for as we felt it was necessary in this instance for the trial to continue.

"We carefully considered whether the case could proceed without live evidence from the victim and concluded that her evidence was vital for the case to proceed.

"The decision to seek a warrant was taken with the police and approved by the trial judge. We understand that this course of action was both unwelcome and extremely difficult for the victim in this case, but there was a strong public interest in proceeding, to protect not just this victim but other children in the future. The defendant in this case has now been convicted for a very serious sexual offence and sentenced to seven years imprisonment."

A spokeswoman for the judiciary said procedures relating to the management of vulnerable witnesses and listing cases were being revisited following the trial.

She said: " It is a very unusual and exceptional step for young witnesses to be made subject to a witness warrant and held in custody in order to secure attendance at court.

"In this case, there was evidence called by the prosecution which the judge ruled justified the exceptional course of making such an order.

"While best practice dictates, and every effort is made to list cases involving vulnerable witnesses at the start of the day, in busy court centres the volume of these types of cases makes it impossible for all of them to start at 10am."

The spokeswoman said that the judiciary would review and amend listing processes at Bradford Crown Court "to avoid the situation happening again where a vulnerable witness has to wait a long time at court prior to giving evidence".

She said: "Processes will be revisited to ensure that where there is a genuine need to compel young witnesses to attend court, every effort is made to find a solution which ensures they are not detained in police cells overnight.

"For several years judges have been provided with training on the management of vulnerable witnesses, which is kept constantly under review, and this year the Judicial College is launching a new course devoted to the subject."