An inmate at the Maine State Prison in Warren died Tuesday, according to the Maine Department of Corrections.

Ronald Leslie Farrar, 65, who is from Waldo County, had served five years of a 20-year sentence for gross sexual assault and unlawful sexual contact involving a 3-year-old girl. He was sentenced in 2008 and was scheduled to be released in 2025 at the earliest.

The death is being investigated by the Maine State Police, and the Office of the State Medical Examiner was notified. A spokesman for the state police said the death appears to be from natural causes.

Farrar died at the Pen Bay Medical Center in Rockport.

Farrar was among the first in Maine to be sentenced under the 2006 “Jessica’s law,” which prescribes harsher penalties for repeat offenders and for sex offenses against young children. The law is named for a 9-year-old Florida girl who was murdered by a registered sex offender.