Deputies have booked Ernest Leeper, 41, on assault with the intent to commit a sex offense.
Investigators say the suspect hid behind the door in the ladies room on Thursday and tried to attack a 59 year old county employee. The victim screamed and kicked him before he escaped from the area.
The Fresno County Sheriff's Office says Leeper is a registered sex offender. They say he was convicted of raping a woman nearly 20 years ago, in a public restroom at a business. Leeper currently wears an ankle bracelet.
Sgt. Kevin Smith said, "Parole agents started checking their GPS systems and located a sex offender in the building at that time of the incident."
Deputies say Leeper confessed to being at the Hall of Records on Thursday. But he claims he was there to wash his hands.