DRESDEN, Maine — A Dresden man was sentenced Friday to 18 years in prison for raping a 14-year-old at a Delaware motel in 2015.

James I. Allen, 36, also was sentenced to six months of work release and then nine years of probation, said Carl Kanefsky, a spokesman for the Delaware Department of Justice.

Sussex County Superior Court Judge Richard Stokes also ordered Allen to register as a sex offender, have no contact with the victim or other minors except for supervised contact with his biological son, and have no access to the internet, Kanefsky said.

Allen faced a maximum sentence of 100 years in prison after pleading guilty to three counts of third-degree rape and one count of sexual exploitation of a child.

Allen, who also faces federal charges including production of child pornography, coercion and enticement of a minor and transfer of obscene material to a minor, was arrested Feb. 1, 2015, at a Comfort Inn on Route 113 in Georgetown, Delaware, where police say he had sexually assaulted the teen, who had reportedly run away from home.

The News Journal reported at the time that when police went to the motel, they found the victim and Allen in a room, along with a lifelike baby doll, a car seat, diapers and other infant care supplies.

The teen told police she met Allen on Facebook and had met him at the motel about a week earlier.

In October 2015, Allen was indicted by the federal grand jury on charges of production of child pornography, coercion and enticement of a minor, receipt of child pornography, possession of child pornography and transfer of obscene material to a minor. The crimes allegedly occurred over a seven-month period.

Assistant U.S. Attorney Edmond Falgowski, who is prosecuting the federal case against Allen, did not immediately respond to a request for comment about the pending federal charges.