Matt Brown / AP file Judge G. Todd Baugh reads a statement Wednesday in Billings, Mont., apologizing for saying a 14-year-old sexual abuse victim was 'older than her chronological age' and was 'in control' of the situation.

As protesters planned pickets outside the courthouse, a Montana judge Wednesday defended his decision to order a high school teacher to spend just 30 days in jail for having sex with a 14-year-old student — who later killed herself.

State District Judge G. Todd Baugh of Billings sentenced the teacher, Stacey Rambold, to 15 years in jail on Monday, then suspended all but 31 days of that term for the 2007 incident with the student, who killed herself in 2010. One of those 31 days was knocked off for time already served.

Judge G. Todd Baugh of Montana apologized for comments during a sentencing on Monday. Baugh sentenced teacher Stacey Rambold to 30 days for the 2008 rape of a student who later committed suicide. During the proceedings, the judge suggested that the 14-year-old victim "had control of the situation" and acted much "older than her chronological age."

Baugh told reporters gathered in his chambers Wednesday that the sentence was appropriate and that he had no intention of resigning his elected position — even as he apologized for having said in court that the victim was "older than her chronological age" and was "as much in control of the situation" as Rambold.

Calling himself "a blithering idiot," Baugh acknowledged that "what I said was demeaning to all women, not what I believe in and irrelevant to the sentencing."

"I owe all our fellow citizens an apology," he said.

More than 22,000 people had signed an online petition by Wednesday night demanding that Baugh, 71, resign "for the safety of our community, and the sake of sexual abuse victims whose confidence Baugh has lost." And protesters said they planned to go ahead with a demonstration Thursday outside the Yellowstone County Courthouse despite Baugh's apology.

Billings School Superintendent Terry Bouck agreed with the protesters, telling NBC station KULR, "I think [the sentence] was wrong."

"We're working hard to make sure every child is safe," said Bouck, who took office last year, five years after the incident. "We think it's appalling what happened ... and we are going to look at what we did in the past, and we're going to get better at it."

Rambold, 54, a technology teacher, pleaded guilty in April to a felony count of sexual intercourse without consent in a case that began in 2008, when officials at Billings Senior High School first learned of the sexual relationship.

The teacher was charged with three felony counts in October of that year. But as the case progressed, the girl committed suicide in February 2010 — depriving prosecutors of their leading witness.

With its case weakened, the Yellowstone County Attorney's Office agreed to defer prosecution for three years in July 2010 and to dismiss the charges if Rambold completed a sex offender treatment program.

But in November, he was kicked out of the program for violations that included missing meetings and having unsupervised visits with minors — his nieces and nephews.

Prosecutors reopened the case, and in April, Rambold pleaded guilty to a single felony count.

At a sentencing hearing Monday, prosecutors asked Baugh to send Rambold away for 20 years, but the judge said he didn't believe the violations were serious enough to warrant such a long term.

Baugh said he listened to recorded statements given by the girl and had concluded that, while she was troubled, she was "as much in control of the situation" as Rambold.

He added that she acted "older than her chronological age."

After the sentence was announced, the victim's furious mother fled the courtroom, repeatedly screaming, "You people suck!"

"I was horrified," she told KULR. "I don't believe in justice anymore. ... It was a joke."

After the 30 days, Rambold will be on probation for 15 years and must register as a sex offender.

Yellowstone County Attorney Scott Twito told The Billings Gazette that he was frustrated by the sentence but that "I have no legal authority in Montana whatsoever to appeal a sentence because I disagree with the sentence handed down by the judge."

He said his office was reviewing the paperwork to see whether there might be any errors of fact or law that could be the basis of an appeal.

Watch US News crime videos on NBCNews.com

This story was originally published on