Cary Verse, a 40-year-old Bay Point resident, was arrested in Concord at about 10:30 a.m. He was transported to Coalinga State Hospital Friday afternoon.
Sheriff's spokesman Jimmy Lee characterized the alleged harassment as "unwanted sexual advances."
Verse was convicted of four sex offenses against male victims in the late 1980s and early 1990s.
The first offense was in 1988 when, at the age of 17, he pulled a knife on a 14-year-old boy and fondled him.
While serving time at a juvenile hall the following year, Verse escaped with another boy and then sexually assaulted him.
He spent a year in jail for the offense and, while on parole in 1990, received another three years' jail time for the sexual battery of a 14-year-old boy.
Two years later, again on parole, Verse bound and sexually assaulted a homeless man in San Pablo.
He completed his prison sentence in 1998, but because of his history of sexual offenses, he was sent to Atascadero State Mental Hospital to undergo treatment in the hospital's sexually violent predator program.
In 2004, Verse became only the second sex offender to win release under the State Department of Mental Health's conditional release program.
Those conditions included 24-hour satellite monitoring and restrictions on who he could associate with and under what conditions. He was also chemically castrated.
After living in two hotels and an abbey, Verse found a home on Willow Pass Road in Bay Point, where he lived for close to two years until he was pulled over in Walnut Creek for a broken tail light. During the stop, police found a 14-year-old boy riding as a passenger in his car, a violation of one of the terms of his release.
Verse had reportedly driven the boy several times before he was caught, but he did not harm him. Nonetheless, he was sent back to Atascadero in January 2007.
He was released again in June 2007 and returned to Bay Point under the same conditional release program.