A judge has paid tribute to a gang rape victim's amazing presence of mind after she trapped one of her attackers by holding on to vital DNA evidence despite her horrific ordeal.

The 21-year-old Bradford mother of one, who cannot be identified for legal reasons, was dragged by her hair into the grounds of a disused mill on Legrams Lane as she walked home alone late at night last July.

The terrified victim had her bag and jewellery stolen before the three attackers forced her to perform sex acts on them and raped her in turn.

But a jury heard last month how the woman managed to hold on to a sample of evidence from 17-year-old Sarfraz Shah and police were able to track him down because his DNA was on a database following his conviction for aggravated vehicle taking four months earlier.

Shah, of Avenue Road, West Bowling, Bradford, had denied being involved in the shocking attack, but after the victim had broken down during her evidence to the jury he finally admitted two charges of rape on the second day of his trial.

Yesterday Judge Christopher Prince, sitting at Bradford Crown Court, commended the woman's "amazing and astonishing presence of mind" and he noted that she had also tried in vain to scratch the other two attackers in the hope of retaining blood samples under her fingernails.

Shah, who committed the offences just two weeks after his 17th birthday, was sentenced to seven years detention for his part in the attack which has left the victim suffering from depression and undergoing counselling.

Judge Prince lifted a previous reporting ban which prevented Shah from being identified and described him as a willing participant despite his age.

The judge said Shah had told a "pack of lies" during interviews following his arrest and it was clear that the trio had hatched a plan to attack the woman who they had identified as a vulnerable, lone female.

Prosecutor Jayne Beckett described how the woman's pleas to be let go were ignored by her attackers and threats were made to break her jaw if she did not comply.

After being raped by Shah while the other men, who have not been traced, watched from a nearby doorway the woman was then forced to have sex with the other two by a wall and in a disused lift shaft.

References were also made to teaching the woman a lesson for being a prostitute even though she was not one.

The distressed victim was eventually allowed to go and she was taken to nearby police officers by taxi driver Mohammed Khan, who was awarded £200 from public funds for his actions that night.

Barrister Sarah Barlow, for Shah, submitted that the other men involved were older and more sophisticated than her client.

She contended that Shah should receive some credit for his late guilty pleas, but Judge Prince dismissed that argument on the grounds that he had only confessed after the compelling evidence from the victim.

Shah will serve half of his seven-year sentence before being released on licence, but he will have to register as a sex offender with the police for the rest of his life.

Detective Inspector Noel Devine, of Bradford North CID, said it had been a "cowardly and vicious attack" on a young woman making her way home.

He added: "West Yorkshire Police takes all allegations of rape seriously and ensures that all such incidents are subject to a detailed investigation.

"The sentence given to Shah today should help give confidence to other victims of rape to come forward and report it to the police."

Det Insp Devine confirmed that Shah was, so far, the only gang member to be prosecuted over the attack.

He said: "Three other people were arrested and released without charge. We know there were other people involved and if any other information comes to light to identify those persons we will investigate it."

Anyone with information should call Bradford North CID on (01274) 376259.