Three teenagers ended up in court after having sex with a 12-year-old Bradford girl, a judge was told.

An 18-year-old was imprisoned for three years after he was charged and convicted of raping the child, Bradford Crown Court heard.

Another boy, aged 15, was sentenced to a three-month referral order.

A third Bradford boy, aged 16 when he had sex with the girl behind a supermarket, appeared before the Crown Court today.

Prosecutor Ewan McLachlan said he too was charged with rape after having sex in December last year.

His guilty plea to sexual activity with a child and denial of rape was accepted by the prosecution.

Mr McLachlan said the defendant, now 17, who cannot be named for legal reasons, was approached by the girl who was more sexually mature.

She chatted to him on a webcam and sent him text messages, the court heard.

Mr McLachlan said she wanted to have sex with the boy. She had already had sex with two boys, aged 15 and 18.

She had not made a victim impact statement because she had suffered no adverse long-term effects.

Mr McLachlan said the offence came to light only because the girl feared she might be pregnant and her mother found out and told the police.

The girl had not wanted any of the youths she had sex with to get into trouble, the court heard.

Judge Jonathan Durham Hall QC said the defendant knew the girl was 12. Normally, “dire consequences” would follow from having sex with a 12-year-old girl.

But the girl had targeted him which led to them forming a relationship and had sex once.

“She set out to achieve exactly what happened,” said the judge, adding that the teenager did not even realise he was committing an offence.

“He is a perfectly decent, hardworking, naive and juvenile young man,” the judge said.

He said a boy not much older than the defendant had been sent to prison for three years for rape. A “life-altering fallout” for that teenager.

But he conditionally discharged the 17-year-old for 12 months, warning the Crown might appeal the sentence as “unduly lenient”.

Judge Durham Hall said he had departed from the sentencing guidelines because it was “a quite exceptional case”.