This story was co-published with ProPublica.

Nick Rhoades was clerking at a Family Video store in Waverly, Iowa, one summer afternoon in 2008 when three armed detectives appeared, escorted him to a local hospital and ordered nurses to draw his blood. A dozen miles away, his mother and stepfather looked on as local sheriff's deputies searched their home for drugs — not illegal drugs, but lifesaving prescription medications.

Lab results and a bottle of pills found in the Rhoades' refrigerator confirmed the detectives' suspicions: Nick Rhoades was HIV-positive.

Almost a year later, in a Black Hawk County courtroom, Judge Bradley Harris peered down at Rhoades from his bench.

"One thing that makes this case difficult is you don't look like our usual criminals," Harris said. "Often times for the court it is easy to tell when someone is dangerous. They pull the gun. They have done an armed robbery. But you created a situation that was just as dangerous as anyone who did that."

The judge meted out Rhoades' sentence: 25 years in prison.

His crime: having sex without first disclosing he had HIV.

Officially, the charge, buried in Chapter 709 of the Iowa code, is "criminal transmission of HIV." But no transmission had occurred. The man Rhoades had sex with, 22-year-old Adam Plendl, had not contracted the virus.

That's not a surprise, because Rhoades used a condom.

And medical records show he was taking antiviral drugs that suppressed his HIV, making transmission extremely unlikely. A national group of AIDS public health officials later submitted a brief estimating that the odds of Rhoades infecting Plendl were "likely zero or near zero."

After his lawyers petitioned the court, Rhoades' prison sentence was changed to five years' probation. But for the rest of his life — he is 39 — he will remain registered as an aggravated sex offender who cannot be alone with anyone under the age of 14, not even his nieces and nephews.

Rhoades' is not an isolated case. Over the last decade, there have been at least 541 cases in which people were convicted of, or pleaded guilty to, criminal charges for not disclosing that they were HIV-positive, according to a ProPublica analysis of records from 19 states. The national tally is surely higher, because at least 35 states have laws that specifically criminalize exposing another person to HIV. In 29 states, it is a felony. None of the laws require transmission to occur.

Defendants in these cases were often sentenced to years — sometimes decades — in prison, even when they used a condom or took other precautions against infecting their partners. In 60 cases for which extensive documentation could be obtained, ProPublica found just four involving complainants who actually became infected with HIV. Even in such cases, it can be hard to prove who transmitted the virus without genetic tests matching the accused's HIV strain to their accuser's.

People with HIV have even done time for spitting, scratching or biting. According to the federal Centers for Disease Control and Prevention, spitting and scratching cannot transmit HIV, and transmission through biting "is very rare and involves very specific circumstances" — namely, "severe trauma with extensive tissue damage and the presence of blood."

Many law enforcement officials and legislators defend these laws, saying they deter people from spreading the virus and set a standard for disclosure and precautions in an ongoing epidemic.

"Shifting the burden of HIV disclosure from the infected person, who is aware of a known danger, to one who is completely unaware of their partner's condition smacks of a 'blame the victim' sort of mentality," Jerry Vander Sanden, a prosecutor in Linn County, Iowa, wrote in an email to ProPublica. "It would be like telling a rape victim that they should have been more careful."

Even many people with HIV support the laws. In a recent survey of HIV-positive people in New Jersey, 90 percent said that people with the virus bore most of the responsibility to protect their partners. More than half approved of the kind of laws that resulted in Rhoades' sentence.

But some health and legal experts say using criminal penalties to curtail the epidemic could backfire and fuel the spread of HIV. According to the CDC, 1.1 million Americans are currently living with HIV, but one-fifth of them don't know it. And studies show that about half of newly infected people got the virus from those who didn't know they had HIV. So relying on a partner to know, let alone disclose, their HIV status is a risky proposition.

The laws, these experts say, could exacerbate this problem: If people can be imprisoned for knowingly exposing others to HIV, their best defense may be ignorance. Such laws, then, provide a powerful disincentive for citizens to get tested and learn if they carry the virus.

The laws "place all of the responsibility on one party: the party that's HIV-positive," said Scott Schoettes, a lawyer who supervises HIV litigation for Lambda Legal, a national gay-rights advocacy group. "And they lull people who are not HIV-positive — or at least think they are not HIV-positive — into believing that they don't have to do anything. They can just wait for their partner to reveal their status and not, instead, take steps to protect themselves."

Schoettes also says that the laws unfairly single out HIV, further stigmatizing and reinforcing misconceptions about living with the virus.

"There's no reason why we should be singling out HIV for this kind of treatment," he said. "It's based in just a lot of fear and misconception."

Being HIV-positive can still carry a powerful stigma. Since July 2010, the U.S. Department of Justice has opened at least 49 investigations into alleged HIV discrimination. The department has won settlements from state prisons, medical clinics, schools, funeral homes, insurance companies, day care centers and even alcohol rehab centers for discriminating against HIV-positive people. Individuals with HIV may also fear that news of their status will spread to third parties, leading to rejection, embarrassment or ostracism for themselves or even their loved ones.

In September, a disability rights group accused the Pea Ridge, Ark., school district of kicking out three siblings after officials learned that members of their family had HIV. The family's lawyers declined to comment. The school district did not respond to requests for interviews but issued a statement acknowledging that it had "required some students to provide test results regarding their HIV status in order to formulate a safe and appropriate education plan for those children."

In romantic or sexual settings, people with HIV often report fear of rejection, abandonment and stigmatization.

"My first girlfriend in middle school — her mom banned her from seeing me, and it took me five years before I felt comfortable to try again," said Reed Vreeland, a 27-year-old New Yorker who was born with HIV. Vreeland works as the communications coordinator for the Sero Project, a nonprofit advocacy group that campaigns against HIV exposure laws, which it denounces as "HIV criminalization."

In 2006, Vreeland started dating a classmate at Bard College in upstate New York. He disclosed his HIV status on their second date.

"What's going through your head is being scared of being rejected," he said. "It's scary to give someone that power."

Vreeland and his girlfriend continued to date. Last spring, they married at a ceremony in the Bronx. "It took me a long time to propose, because I thought I would die," he recalled. "I was saying, 'Well, OK, why should I propose if I'm scared of dying in 10 years? And if we do have a kid, then I might die and leave my kid without a father, like I grew up without a mother.'"

The fear is "choking" and "silencing," he said. "You're conscious that saying three letters will change the way people will see you."

In some cases, people with HIV have been met with violence — and even death — after disclosing their status. Last month, in Dallas, 37-year-old Larry Dunn was sentenced to 40 years in prison for murdering his HIV-positive lover. Police said he used a kitchen knife to stab and kill Cicely Bolden, a 28-year-old mother of two, after she told him about her HIV status. "She killed me," he told investigators, according to his arrest warrant, "so I killed her."

Until recently, criminal punishment was virtually unheard of for infectious diseases other than HIV. Federal and state officials have the authority to quarantine the sick to contain epidemics, but this power was typically granted to health authorities, who are versed in the latest science, not police and prosecutors. Very few criminal statutes take aim at diseases. At least two states have catchall laws against exposing others to "communicable diseases," but only if exposure happens through routes most commonly associated with HIV, such as sex, sharing needles or donating blood. And while some states have laws that specifically punish exposure to tuberculosis, syphilis or "venereal diseases," HIV exposure is almost always punished more severely.

But since 2007, three states have added hepatitis B and C to laws criminalizing HIV exposure. Those diseases are most prevalent among the same groups of marginalized people most at risk for HIV: intravenous drug users; gay men, especially those who are black or Latino; and black women.

Yet the laws may be unnecessary. In rare cases when someone intentionally tries to spread a virus, prosecutors have been able to put them away using ordinary criminal laws, such as assault or reckless endangerment. In 1997, a New York man named Nushawn Williams was accused of deliberately infecting at least 13 people, including two underage girls, with HIV. Williams pleaded guilty to two counts of statutory rape and one count of reckless endangerment. When his 12-year sentence ended in 2010, state officials kept him confined under laws that allow dangerous psychiatric patients to be locked up. He remains behind bars.

In Iowa, Rhoades' case has prompted some lawmakers to reconsider whether exposing someone to HIV should carry such a heavy punishment.

"Putting somebody in prison for 25 years when they didn't even transmit HIV is the most absurd thing that the state could be doing," said Matt McCoy, an Iowa state senator who has introduced legislation to reduce the penalties. "It's medieval."

Even Plendl, the man Rhoades had sex with, thinks the law is too harsh. "Do I think he needs to be locked up forever?" Plendl asked. "No. Do I think these laws need to be revisited? Yes."