Collin Greene, a Jamaican accused of having unlawful sex with a 15-year-old girl last year, will serve a seven-year prison sentence, Justice Albert Redhead ruled Friday.

Mr. Greene originally had been charged with rape in connection with the Aug. 7, 2012 incident, but prosecutors allowed him to plead guilty on July 8 to the lesser charge of unlawful sex with a girl under the age of 16.

The maximum sentence for that charge is seven years’ imprisonment, compared to a maximum term of life for rape.

Crown Counsel Leslie-Ann Faulkner said Mr. Greene resided with the girl’s mother and called the girl multiple times the night of the incident.

He also went to the girl’s room, but she turned him away and fell asleep, the prosecutor said.

The girl woke up in Mr. Greene’s bedroom as he was raping her, according to Ms. Faulkner.

The prosecutor added that Mr. Greene inflicted significant psychological damage on the girl, and prosecutors agreed to accept the plea so that the girl would not be forced to confront Mr. Greene during a trial.

But Mr. Redhead lamented several times during the sentencing that the Crown had been “overgenerous” in accepting the deal.

“My hands are tied that I can’t go beyond seven years,” he said.

The judge added that the prevalence of sex crimes in the Virgin Islands is too widespread and that women have an absolute right not to be abused.

“In this court, anyone convicted of a sexual offence, this court does not look kindly on that,” Mr. Redhead said.