SAN FRANCISCO (CBS SF) — A San Francisco political consultant convicted of possessing child pornography in December was sentenced to six months in jail Friday morning after reaching a plea deal over the objections of prosecutors.

Enrique Pearce had considered withdrawing his plea after it became clear he would be unable to serve the jail sentence on house arrest, but Friday went forward with his sentencing.

READ MORE: Three Of Tonga’s Smaller Islands Badly Damaged By Tsunami; Concerns Mount Within Bay Area Tongan Community

San Francisco district attorney’s spokesman Alex Bastian confirmed the sentence today, noting that his office had sought prison time in the case and objected to the short sentence.

Pearce had entered a no contest plea on Dec. 23 to two charges related to possession or distribution of child pornography. Investigators say they recovered 4,902 images and videos of child pornography from computers seized in a search of his Tenderloin apartment in February 2015.

A stolen parking meter was also discovered in his apartment and Pearce pleaded guilty to buying or receiving stolen property.

READ MORE: San Jose Food Pantry Staying Open After Raising Funds to Pay for Permit

San Francisco Superior Court Judge Rene Navarro had agreed to sentence him to only six months of county jail, which can be served as home detention, and five years of probation.

After prosecutors made their objections known, the San Francisco Sheriff’s Department was unwilling to sign off on the home detention, meaning that Pearce would have to serve jail time.

Pearce worked as a consultant at Left Coast Communications. He is credited with having worked on political campaigns for U.S. Rep. Barbara Lee and San Francisco Mayor Ed Lee, as well as San Francisco supervisors Jane Kim and Norman Yee, among others. He also established Pearce Law Offices.

MORE NEWS: Belmont Neighborhood Search For Aggressive Mountain Lion

TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News Service contributed to this report.