Mr. Johnson’s trial was rightly deemed unjust due to prosecutorial misconduct. But injustice remains deeply entrenched within the society that created the laws that criminalized his actions in the first place. At least 29 states, mostly in the Midwest and Deep South, have laws that make H.I.V. nondisclosure, exposure or transmission a crime.

These laws constitute one more layer of marginalization for those whom the criminal justice system already disproportionately prosecutes, convicts and harshly sentences: black people, trans women, migrants, people who sell sex, people who inject drugs and L.G.B.T.Q. youths. Such laws have not been shown to reduce H.I.V. transmission, but they do discourage those at risk from getting tested, which undermines public health rather than protects it.

The United States has the unfortunate distinction of being among the countries most aggressively prosecuting people living with H.I.V., after Russia and Belarus, according to a recent report by H.I.V. Justice Worldwide. In these places, people living with the virus could be just one disgruntled partner away from finding themselves in a courtroom.

In the United States there are thousands of cases where H.I.V.-specific charges were filed, or people faced heightened charges or punishments simply because they had the virus. We don’t know how many others have been threatened or blackmailed with criminal prosecution — the law becomes a weapon in abusive relationships — but those numbers are surely considerable. In almost all cases, this all-too-real risk is greater than any (highly unlikely) risk of actual H.I.V. transmission.

Prompted by concerns that the law was being applied contrary to scientific evidence, last summer a group of 20 H.I.V. scientists from around the world issued an expert consensus statement intended to assist experts involved in cases of alleged H.I.V. exposure, transmission or nondisclosure. They urged governments and people working in the justice system to ensure that the significant advances in H.I.V. science are taken into account in H.I.V.-related legal cases.