The Supreme Court on Thursday delivered a big win for survivors of sexual assault in the military by closing a loophole that allowed three convicted rapists to walk free.

“I fought so hard to get the justice to have him put away for what he did,” Air Force veteran Harmony Allen told CNN about her rapist, Master Sgt. Richard Collins, in an article last year.

Collins raped Allen in August 2000, but he was not convicted until 2017. But a year later, a 2018 ruling by the U.S. Court of Appeals for the Armed Forces (CAAF) instituted a five-year statute of limitations on military rape cases between 1986 and 2006, and Collins walked free.

“To have that ripped away after finally getting it is so hurtful and crushing and it just questions my belief in the justice system,” Allen said.

CAAF’s 2018 ruling reversed decades of precedent. Under Article 120(a) of the Uniform Code of Military Justice, rape is one of several crimes that is punishable by death in the military, and thus has no statute of limitations. But in 2018, CAAF pointed out the Supreme Court’s 1977 ruling in Coker v. Georgia that the Eighth Amendment forbids a death sentence for the rape of an adult women. 

So if rape cannot be punished by a death sentence under the Constitution, CAAF reasoned, then military rape is not a capital offense and thus is subject to statutes of limitations. But the Supreme Court disagreed.

Related: The major flaws in the Air Force justice system that let generals go unpunished

“Respondents argue that the logic of the decision in Coker applies equally to civilian and military prosecutions, but the Government contends that the military context dictates a different outcome,” wrote Justice Samuel Alito in his opinion. “Among other things, the Government argues that a rape committed by a service member may cause special damage by critically undermining unit cohesion and discipline and that, in some circumstances, the crime may have serious international implications.”

Further, while Coker led to Congress changing the maximum penalty for rape in civilian cases from death to life imprisonment, Congress made no such change in the UCMJ, the justice wrote.

“On the contrary, in 2006 Congress noted that death would remain an available punishment for rape,” he added.

Alito pointed out that the “trauma inflicted by such crimes may impede the gather of the evidence needed to bring charges. Victims may be hesitant for some time after the offense about agreeing to testify. Thus, under current federal law, many such offenses are subject to no statute of limitations.”

A former Chief Prosecutor of the Air Force celebrated the decision.

“The unanimous nature of this opinion is a testament of just how wrong the lower court’s opinion was,” said Col. Don Christensen (ret.), president of the advocacy group Protect Our Defenders, in a press release. “Justice has been restored for three survivors and hope has been restored for countless others.”

Besides Collins, the other two convicted rapists immediately affected by the decision are Air Force Lt. Cols. Michael Briggs and Humphrey Daniels III.

Justice Amy Coney Barrett did not vote in the decision because the case was argued in October, before her confirmation.