( CNN ) -- An attorney for a Montana teacher who admitted to raping his 14-year-old student is asking the judge in the case to cancel a hearing scheduled for Friday . In a response filed Thursday with the Yellowstone County Court , attorney Jay Lansing joined prosecutors in saying that the new hearing would be `` without legal authority . '' The judge scheduled the hearing after admitting that the sentence he imposed may have been against the law . The case drew widespread attention when District Judge G. Todd Baugh imposed the 30-day sentence on Stacey Dean Rambold and made controversial comments about the victim , saying she `` seemed older than her chronological age . '' In an order this week , the judge said that it now appears the mandatory minimum is two years , not 30 days . He said the court , `` if necessary and appropriate , '' would amend the sentence at Friday 's hearing . Such a hearing , however , would `` create confusion and uncertainty for all parties left to interpret and execute the sentence of Mr. Rambold , '' Lansing argued . He said his client contends the sentence imposed , which prosecutors are appealing , is lawful and appropriate . Also Thursday , prosecutors filed an emergency petition with the Montana Supreme Court , asking it to stop the scheduled hearing . While acknowledging `` the district court 's effort to correct the error at the trial court level , '' they wrote that the `` only remedy prescribed by statute and case law is appeal before this Court . `` Further , the September 6 hearing , if permitted to be conducted , will undermine the State 's appeal and otherwise frustrate the just and orderly administration of ordinary appeal processes , '' the petition read . Rambold admitted raping the girl while he was her teacher at her high school . Cherice Moralez was 14 at the time . She took her own life shortly before her 17th birthday . CNN 's Miguel Marquez contributed to this report .
NEW : Prosecutors file an emergency petition to stop the hearing . District Judge G. Todd Baugh has scheduled the hearing for Friday . He says a 30-day sentence he imposed on a teacher who raped his student may be illegal .