A former high school teacher convicted of raping a 14-year-old girl will be re-sentenced after the Montana Supreme Court ruled Wednesday that his original 31-day sentence was inadequate under state law.

The ruling means defendant Stacey Dean Rambold could face a minimum of two years in prison for the rape of then-high school freshman Cherice Morales, who killed herself while awaiting Rambold’s sentencing. The case sparked public outcry after Rambold served only a month of the 10 years prosecutors called for him to serve.

The court ordered a new judge to carry out the re-sentencing, citing the actions of District Judge G. Todd Baugh. In his opinion of the case, the Billings-based judge suggested Morales shared some responsibility for her rape and had some control of the situation, calling her “older than her chronological age.”

“Judge Baugh’s statements reflected an improper basis for his decision and cast serious doubt on the appearance of justice,” the high court said in Wednesday’s ruling. “The idea that [Morales] could have ‘control’ of the situation is directly at odds with the law, which holds that a youth is incapable of consent and, therefore, lacks any control over the situation whatsoever. That statement also disregards the serious power disparity that exists between an adult teacher and his minor pupil,” the court ruled.

After his release in September, Rambold was required to register as a sex offender and remain on probation through 2028. He is expected to remain free until his reappearance in state District Court, according to the Associated Press.

Correction: A previous version of this post misstated when Rambold was released. (4/30)