A photo of HIV in the human body. Creative Commons

A San Diego man who prosecutors say knowingly spread HIV -- the virus that can cause AIDS -- was sentenced Monday to six months in prison. Thomas Miguel Guerra, 30, was found guilty by a judge of violating a California health code requiring people who are HIV-positive to disclose their status to sex partners, KNSD-TV reported.

This was the first time a case of willful HIV transmission has been prosecuted in San Diego County since the law was adopted 20 years ago. Prosecutors claimed that Guerra hid his HIV-positive status from his now ex-boyfriend and urged his partner to have unprotected sex with him. Guerra and his ex-boyfriend, who was unnamed, had started dating in April 2013. The victim tested positive for HIV in May of that year, the Associated Press reported.

HIV (human immunodeficiency virus), is commonly spread through sexual intercourse. About 50,000 people become infected with the virus in the U.S. every year, the U.S. Centers for Disease Control and Prevention say. In 2012, more than 13,700 people diagnosed with AIDS died in the U.S., bringing the total number of U.S. deaths to more than 658,000 since AIDS was first discovered, the CDC says.

Judge Katherine Lewis said it was a “travesty” that Guerra faced only a misdemeanor charge and that she wished she could have given him more prison time. "I think that's a tremendous oversight in the law if this is just a misdemeanor," Lewis said.

Prosecutors said they hoped the case would “[help] to educate people that they have a legal obligation -- as well as a moral and ethical obligation -- to inform their sex partners of their HIV status," the Los Angeles Times reported.

Here are five things to know about Guerra’s case and HIV disclosure laws around the U.S.:

1. Evidence against Guerra included 11,000 text message and 36 audio clips. The texts and audio seemingly proved that Guerra was aware of his HIV status and purposely misled sexual partners to believe he was virus-free.

2. Guerra pleaded no contest to the charges in March. His attorney said he preferred the case not go to trial because he thought jurors wouldn’t understand Guerra’s “dark humor,” a reference to what Guerra said were the jokes he texted to others about knowingly and intentionally spreading HIV, KNSD-TV reported.

3. At least 35 states have laws against HIV-positive people placing others at risk. Proponents of such laws say they deter people from spreading the disease, however critics say the laws stigmatize those who have HIV.

4. The law Guerra violated was California Health and Safety Code 120290. It states that "any person afflicted with any contagious, infectious or communicable disease who willfully exposes himself or herself to another person … is guilty of a misdemeanor.”

5. Guerra may have to pay the victim’s medical costs, pending a hearing June 3. The victim claims he is taking “an outrageous number of medications” in light of his HIV-positive status, the Los Angeles Times reported.