A man who raped a 12-year-old girl in 2003, and committed a sex offence against another woman a few years later, has been jailed for two years.

Nigel Smith was only 16 years old when he forced himself on the young child, causing her to fall pregnant.

And a few years later Smith, 27, committed another sex offence on a woman at a drunken party, a judge at Swindon Crown Court was told on Friday.

Hannah Squire, prosecuting, said Smith threatened the first victim if she told anyone after he raped her in the spring of 2003.

She said the child was so concerned that she lied when she was questioned about how she fell pregnant at such a young age.

But when she finally reported the truth to the police last year, the results of a DNA test backed up her story that Smith is the father of her child.

Miss Squire said the girl told how she was unaware of her condition until a month or so before the birth.

"She thought she had a tummy upset. She was taken to the doctors and diagnosed as being pregnant," Miss Squire said.

She told the court how the other victim of his sexual offending suffers from learning difficulties and told how the abuse took place in late 2007 following a party.

Smith, of Pike Close, Hilperton, Trowbridge, pleaded guilty to rape and another sexual offence.

He denied a further four counts of rape against the two victims and prosecutors said they would not seek a trial on the other matters.

Mark Ashley, defending, said his client had a very low IQ and functioned at the mental aged of a child.

He said he was aged just 16-and-a-half when he carried out the rape of the younger girl.

Passing sentence, Judge Tim Mousley QC said: "So far as the allegation of rape, the girl was 12 when that happened and she was obviously extremely vulnerable."

He said the impact on her had been 'far reaching' and would affect her for the rest of her life.

He jailed him for two years, imposed a restraining order banning him from contacting his victims and told him he must register as a sex offender for 10 years.