Before a judge handed him a six-month sentence, a San Diego man who knowingly spread HIV was defiant, saying: "I am not a monster."

"I would never ever do something like what I'm accused of," Thomas Miguel Guerra said.

Judge Katherine Lewis, visibly angry, did not agree.

"There's no question in my mind that he's guilty," Lewis said. "There's no doubt in my mind, Mr. Guerra would have been convicted" if the case went to trial.

In sentencing him to the misdemeanor charge, Judge Lewis called a six-month sentence in the case a "travesty."

"I think that's a tremendous oversight in the law if this is just a misdemeanor," she said. "If any good comes out of it, that this law would change" and become a felony.

Guerra had earlier pleaded no contest to violating a state health code, San Diego County’s first such prosecution of willful HIV transmission. A no contest plea concedes that prosecutors could prove their case, but does not admit guilt. For sentencing purposes, it's treated the same as a guilty plea.

As outlined in the charges, his ex-boyfriend says Guerra intentionally deceived him about having HIV. The two started dating in April 2013, and Guerra claimed to be HIV negative, urging his boyfriend to have unprotected sex, the city attorney’s office says.

His boyfriend soon discovered message logs on Guerra’s computer, dating back to 2007, in which he references being HIV positive. Guerra even joked in text messages about having HIV and other people not knowing it, according to an arrest warrant.

At Monday's sentencing hearing, a prosecutor said the evidence against Guerra included 11,000 text messages he sent and 36 audio clips showing he was deceitful with sexual partners about being HIV positive.

In response, Guerra said in court that none of the 11,000 text messages were between him and his accuser.

He denied that the victim had not known he was HIV positive and called the victim's actions "reckless."

The two met on the gay dating app Grindr and after exchanging text messages, the two met up, Guerra said.

"If you are that reckless with your life, how can you blame someone else's actions?," Guerra said.

Guerra's attorney said he didn't bring the case to a jury because he feared jurors wouldn't understand his client's "dark humor." The attorney requested the judge sentence Guerra to electronic home confinement instead of jail custody.

The judge did not agree, calling it an egregious case and saying she wished she could sentence Guerra to more time.

She said Guerra showed a striking lack of remorse.

"I don't think in my 25-plus years in a law, I've ever seen somebody be so lacking of insight, blame or responsibility that you have demonstrated," she said.

The charge against Guerra came in August 2014, about a year after the couple broke up. As he was prosecuted, a judge ordered Guerra to stay off dating websites, specifically the gay dating app Grindr.