A convicted sex offender is facing nearly 20 years in prison after pleading guilty to raping a 60-year-old woman in a Mill Valley laundry room.

Leroy Anthony Clark, 37, admitted to charges of forcible rape, sexual battery, false imprisonment and threatening a victim, according to the Marin County District Attorney's Office.

As part of the plea arrangement, the prosecution dismissed a residential burglary charge that could have meant a life sentence with the possibility of parole.

"It was not at all clear that the facts supported that charge, but it certainly played a part in how the case was resolved," said Clark's lawyer, Deputy Public Defender Michael Coffino.

Clark was arrested last June after an investigation by the Marin County Sheriff's Department. Authorities said the crime happened while the victim, a San Rafael resident, was visiting family at an apartment complex in Strawberry.

The woman told investigators the attacker forced her into a laundry room, claimed he had a gun and raped her.

Based on the description of the suspect, a sheriff's investigator thought he might be Clark, a 6-foot-4, 240-pound sex offender who was living in San Anselmo. The woman then identified Clark as the suspect after picking him from a series of photos.

Clark accepted the plea offer last week before Judge James Chou in Marin Superior Court. The sentencing is set for April 24.

In 2011, a jury acquitted Clark of raping and restraining an 18-year-old woman in San Rafael, but convicted him of misdemeanor sexual battery for touching her breasts.

In a secondary but related trial, a judge convicted Clark of failing to register as a sex offender at the time of the incident. Clark was required to register because of a 2009 misdemeanor sexual battery conviction in a case involving two teenage girls.