DES MOINES (AP) — An Iowa man with HIV sentenced to 25 years in prison for not telling a sex partner that he carried the virus that causes AIDS appealed to the Iowa Court of Appeals on Wednesday.

Nick Rhoades, 39, met and had sex with a man he had chatted with on the Internet in 2008. He was convicted in 2009 and is on probation after his sentence was reduced a year later. He is required to register as a sex offender for the rest of his life unless the conviction is overturned.

Rhoades' attorneys say the conviction should be thrown out because his defense attorney did not fully understand the law and should have never advised him to plead guilty. He claims he was not properly questioned by the judge about whether he understood the law when he pleaded guilty. His attorneys also argued Rhoades did not violate the specific definition of the state's law.

“Even though Rhoades used a condom in the sexual encounter and even though he never intended to expose, and in fact did not expose infectious bodily fluids to his partner, he was advised to plead guilty,” said Christopher Clark, an attorney with Lambda Legal, a national organization that fights for civil rights for lesbians, gay men, transgender people and those with HIV.

Iowa passed a law in 1998 that makes it a felony for someone with HIV to engage in intimate contact with another person. That is defined as the intentional exposure of the body of one person to a bodily fluid of another person in a manner that could result in the transmission of HIV. The law does not require that the other party become infected.

Clark argued that Rhoades, who lived in Plainfield when he was charged and now lives near Des Moines, did not intentionally expose the other man to bodily fluids in a way that could have transmitted HIV because he practiced safe sex by using a condom.

“This was a wildly inappropriate prosecution by the state, and that's why we're here making our arguments today and challenging it,” he said in an interview after Wednesday's hearing.

Assistant Attorney General Kevin Cmelik, who asked the court to uphold the conviction, said there are no facts to support Rhoades' claim that he didn't understand the plea. Cmelik also said the district court judge found that Rhoades' attorney had clearly informed him of the specifics of the law.

Cmelik said the appeal boils down to whether Rhoades' sex act violated the law.

“I would submit to the court the intentional exposure in this case is simply committing the act of having sexual contact,” he said. The Legislature intentionally broadly defined exposure in the law, he said.

Since Iowa's law took effect, at least 27 people have been convicted.

Lambda Legal has worked with other organizations to revise HIV criminalization laws across the country. Thirty-three states have one or more HIV-­specific criminal exposure laws, according to the federal Centers for Disease Control and Prevention in Atlanta.

Des Moines Democratic Sen. Matt McCoy has introduced bills in the past few years to reduce penalties and focus on people who purposefully try to infect others with the virus. He wants Iowa's law to sentence people convicted of intentional or attempted transmission of the virus to a maximum of five years in prison, putting HIV in the same criminal category as transmitting any other communicable disease, such as Hepatitis C. The HIV law has a maximum penalty of 25 years.

McCoy also wants to end a requirement that people convicted must be placed on a sex offender registry for life. His bills have never advanced out of committee, but he plans on trying again next year.

Clark said he hopes the court concludes that the Iowa law as written does not cover safe sex.

“HIV positive individuals do have a right to have sexual lives and do that in a safe and responsible way,” he said. “We're hoping for that outcome in this case.”