SAN DIEGO (CBS SF) — A San Diego man who knowingly infected another man with HIV was sentenced Monday to six months in jail.

CBS 8 reports that 30-year-old Thomas Miguel Guerra received the maximum penalty for violating a state health code, a misdemeanor charge, and willfully exposing a person to an infectious disease.

READ MORE: Meier Scores Franchise-Record 5 Goals As Sharks Rout Kings, 6-2

Prosecutors say Guerra claimed to be HIV-negative and urged his partner to have unprotected sex. The other man tested positive for HIV in May of 2013.

During his prosecution, a judge ordered Guerra to stay off dating websites.

READ MORE: COVID: Lower Levels Of Viral RNA In Wastewater May Signal Turning Point In Surge

Guerra earlier pleaded not guilty. He changed his plea to no contest on the day his trial was to start in April.

It’s the first time in San Diego County that the 20-year-old health code statue has led to a guilty verdict or plea.

MORE NEWS: UPDATE: Firefighters Battle Fire In Abandoned Home In San Jose

TM and © Copyright 2015 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2015 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten. The Associated Press contributed to this report.