The Montana Supreme Court on Wednesday overturned a one-month sentence that was widely condemned as too lenient for a former high school teacher convicted of raping a 14-year-old student.

The court ordered a new judge to re-sentence defendant Stacey Dean Rambold, who has been free since completing the previous term last fall.

Yellowstone County Attorney Scott Twito said that according to state sentencing laws, the decision means Rambold must serve a minimum of two years in prison.

The high court's decision cited in part the actions of District Judge G. Todd Baugh, of Billings, who suggested the young victim shared responsibility for her rape because she had some control over the situation.

Rambold's attorney, Jay Lansing, was traveling and not immediately available, his office said.

State prosecutors said Rambold should have received a minimum of two years under state law.

Baugh relied on a different section of the same statute when he gave the defendant 15 years with all but 31 days suspended and a one-day credit for time served. Rambold was required to register as a sex offender and was to remain on probation through 2028.

A disciplinary complaint against Baugh from the Judicial Standards Commission is pending with the state Supreme Court. Justices said that will be dealt with separately.

Baugh sparked outrage when he commented that victim Cherice Moralez was "older than her chronological age."

The teen committed suicide in 2010 before Rambold went to trial.

Rambold went before Baugh in August after he violated a deferred-prosecution agreement by getting booted out of a sex-offender treatment program.

Baugh appeared to show sympathy for the defendant and agreed with Lansing's recommendation that Rambold receive a 15-year sentence with all but one month suspended. Prosecutors had sought a 20-year term with 10 years suspended.

Baugh also made comments pinning some of the responsibility in the case on Moralez, whom the judge described as "older than her chronological age."

The disciplinary complaint pending before the high court would have Baugh removed from the bench for alleged bias.