A judge has "reluctantly" jailed a 26-year-old man who had sex with a young girl because the law prevented him considering a non-custodial option.
Judge Jeffery Rucker jailed Simon Foster for two years after he admitted two charges of rape and sexual assault by penetration at Exeter Crown Court.
The court heard how the pair met on the internet and then on three occasions on Teignmouth seafront in Devon.
The girl had told Foster, of Brittania Avenue, Dartmouth, she was aged 15.
Sentencing Foster, Judge Rucker said: "Rape is violent non-consensual sex or where threats are used to put the woman in a position where she submits. Equally where a defendant knows there is no consent but goes ahead anyway.
"The defendant made it utterly clear he was interested in finding a sexual partner and the complainant knew that and could not say otherwise."
The judge said he had a medical report which said the girl looked older and acted in a way consistent with that.
"Regarding culpability, as far as the defendant was concerned he did not make sure of her age, and he was being lied to."
He said under sentencing guidelines he had to impose a prison sentence however he felt a community sentence would have been better.
"The law prevents me from looking at that non-custodial option. Personally I would have thought it was the better option in the light of the facts in this case. Reluctantly I have to send him to prison," he said.
Foster was also ordered to sign on the Sex Offenders Register and was banned from working with children until further order.