In a ruling that overturns 25 years of precedent, the U.S. Court of Appeals for the Armed Forces reversed an aggravated assault conviction of exposing multiple sex partners to HIV at swingers parties, The Associated Press reports. In the original case, Kansas airman David Gutierrez was not accused of infecting anyone; rather, he was convicted only because he tested positive for the virus.

In the new ruling, the court said that prosecutors didn’t prove that Gutierrez’s sexual activity was likely to transmit the virus. The defense argued that the risk of infecting a woman during intercourse was between 1 in 10,000 and 1 in 100,000 for each act of intercourse. After the prosecutors claimed that the risk was closer to 1 in 500, the court concluded that even in that scenario, transmission was not “likely.” Since the risk was not high, the sexual acts did not constitute aggravated assault.

Attorney Kevin McDermott told the AP that the ruling “effectively ended the prosecution of cases in the military that allege the likelihood of grievous injury merely [because] a service member has been diagnosed with [HIV has engaged] in intercourse without their partner’s knowledge of HIV.”

McDermott stress that the ruling was “not just a technicality. They actually overturned two prior court precedents that supported these prosecutions.”

The court upheld other charges against Gutierrez, including the conviction for adultery, even though his wife was also involved in the swinger lifestyle. He has been in prison since August 2010 but might be released in the upcoming weeks.