A one-time college wrestler who was sentenced to 30 1/2 years in jail in Missouri for not telling his sex partners that he had HIV, was released from prison just five years into his sentence, after an appeals court blasted his trial as fundamentally unfair.

Michael Johnson, now 28, left Boonville Correctional Center on Tuesday, confirmed Catherine Hanssens, the Executive Director and Founder of The Center for HIV Law & Policy, who worked on his appeals case.

“It’s great that he’s not in jail [but] its a horrible injustice that he was ever locked up at all,” Hanssens told The Post on Wednesday.

A former star wrestler at Lindenwood University in St. Charles, Johnson had been incarcerated since his October 2013 arrest on charges he violated Missouri’s HIV felony law by transmitting the virus to two men and exposing four others to it.

Johnson had apparently met the men through a dating app where he went by the name “Tiger Mandigo” and maintained he’d told them about his HIV status.

Despite there being no technology that can prove the source of infection, Johnson was found guilty in May 2015 of one felony count of recklessly transmitting HIV and four counts of exposure or attempted exposure.

The resulting sentence of more than 30 years was longer than the state average of 10 to 30 for second-degree murder.

The Missouri Court of Appeals for the Eastern District overturned the conviction in December 2016 because prosecutors had failed to disclose evidence at the proper time, calling the case a “trial-by-ambush” and blasting the “inexcusable” discovery violation.

To avoid another trial, Johnson took a no-contest plea and was later granted a suspended parole.

“I feel great,” Johnson told Buzzfeed News, which first reported his release. “Leaving prison is such a great feeling.”

Johnson said he hopes his case will spur politicians to change the law that sent him to jail.

“Maybe my trial did happen in some way to motivate some change,” he told the website.