BILLINGS, Mont. (AP) — A Montana judge lacks the authority to impose a new sentence on a man sent to prison for a month for raping a 14-year-old girl, who later committed suicide, the state’s high court has ruled.

Friday’s decision came as the judge sought to change the former teacher’s sentence after his original ruling, in which he said the student was “older than her chronological age,” drew widespread criticism.

An appeal of the case already was pending from prosecutors who contend that former Billings teacher Stacey Rambold, 54, should serve two years, at a minimum.

But Judge G. Todd Baugh sought to undo the 30-day sentence on his own after his remarks triggered a public backlash and calls for his resignation.

Rambold will continue to serve out the original sentence while the appeal is pending, Yellowstone County Attorney Scott Twito said.