Brinkin, 67, changed his plea in a deal with the district attorney's office that will result in a sentencing recommendation of six months in county jail, six months of home detention, five years of probation and lifetime registration as a sex offender.

Brinkin, who worked as a senior contract compliance officer with the rights commission until his 2010 retirement, was arrested in June 2012. Authorities said e-mail attachments were found on his America Online subscriber's account that contained images of toddlers engaged in sex acts with men.

Prosecutors originally charged him with six felony counts of possessing and distributing child pornography, but dropped all but one felony count of possession as part of the plea bargain.

Brinkin must undergo sex offender therapy and is banned from working with kids, contacting a juvenile without parental consent, and living with someone responsible for a child without disclosing his offender status.

"He made a terrible mistake," Brinkin's attorney, Randall Knox, said outside court. "He is genuinely remorseful. He has a much greater understanding now of the damage child pornography inflicts."

Investigators were able to track the pornography linked to Brinkin to Australia, where at least one arrest was made.

During his 22-year tenure at the rights commission, Brinkin helped craft the city's Equal Benefits Ordinance, which became a national model for workplace equality for gays and lesbians. When he retired, the Board of Supervisors declared the week of Feb. 1, 2010, as Larry Brinkin Week.

Brinkin, who appeared in court with his husband, has been out on $240,000 bail since September 2012. He is scheduled to return for sentencing on March 5, and to surrender into custody at a later date.

Knox said he did not believe Brinkin's city pension would be affected by the plea because his conviction doesn't fall under "moral turpitude." Under Proposition C, approved by voters in 2008, a city employee convicted of a crime involving moral turpitude - usually theft, fraud or a breach of the public trust - cannot collect employer-funded retirement benefits.