BOONVILLE, Missouri — Michael Johnson, who was sentenced to an unprecedented 30.5 years for failing to disclose his HIV status to his sexual partners, was released today, 25 years early, after an appeals court condemned his original trial as “fundamentally unfair.”

“I feel great,” Johnson said with a big smile as he left Boonville Correctional Center on Tuesday, sweating in the intense Missouri heat. “Leaving prison is such a great feeling.”

Handed a cellphone to call his parole officer, Johnson looked at it and said, “When you get arrested and have your phone taken away, you have dreams when you think your phone is ringing.”

Johnson, a onetime college wrestler who was known online as “Tiger Mandingo,” was arrested in October 2013 for “recklessly” transmitting HIV to two men and exposing four others to it. Johnson is black, and four of the six men were white. As chronicled in a BuzzFeed News investigation, his trial was racially charged, and jurors were shown images of his penis. Despite an absence of genetic fingerprinting to connect him to the other men’s HIV strains, he was convicted of one of the two transmission cases and of all four exposure cases. The resulting sentence was longer than the state average for second-degree murder — though he is not accused of killing anyone.

In December 2016, the Missouri Court of Appeals for the Eastern District overturned his conviction because prosecutors had waited until the last moment to disclose evidence. To avoid another trial, Johnson took a no-contest Alford plea deal and was later granted a suspended parole.

Since his arrest in 2013, Johnson’s story has become a flashpoint in the debate about laws that criminalize HIV transmission. That year, medical scholars wrote that “empirical studies on the impact of these laws suggest that they do not decrease HIV infections or have any other positive public health impacts,” and that anti-HIV laws may actually result in higher rates of transmission.

In the subsequent six years, the evidence on these points has grown — and the politics of HIV have shifted substantially toward an understanding of the role that race plays, in both who contracts HIV and who is prosecuted for transmitting it.

In 2016, the Centers for Disease Control and Prevention published research projecting that if current trends continue, 1 in every 2 black men who have sex with men in America would become HIV positive in their lifetimes — despite having “fewer partners and lower rates of recreational drug use than other gay men.” Globally, a disproportionate number of the roughly 1 million people a year who die of AIDS are black.

Laws have changed, too. In California in 2017, Gov. Jerry Brown signed a bill that reduced knowingly exposing someone to HIV to a misdemeanor. And in North Carolina last year, activists successfully lobbied to bring that state’s HIV laws in line with scientific findings, reflecting, for example, that people who are properly medicated cannot transmit the virus.

In the state where Johnson was convicted, the Missouri HIV Justice Coalition introduced HB167 to modernize the state’s HIV laws. Written by a Republican legislator, the bill would have reduced punishment for knowingly transmitting HIV from a felony to a misdemeanor and would have taken into account factors such as whether the accused used a condom or was taking medication.

The bill didn’t pass, but it picked up an unlikely ally: Timothy Lohmar, the prosecuting attorney whose office had tried Johnson and asked the jury for a life sentence.

In support of the proposed legislation, Lohmar testified that he “had a case a few years ago that got a lot of national attention, and it wasn’t in a good way,” which he found “embarrassing.” He said, “I was hamstrung in a sense because I was forced to operate under the current laws that we now have. Which I would agree are antiquated, outdated, and based upon something that science would prove is not accurate,” such as the possibility that someone with an undetectably low viral level could infect someone else.

The bill’s sponsors say they will try again to get it passed in the next legislative session.