A former Redlands high school teacher admitted to having sexual relations with three students – including one her attorney said was the father of her baby – when she pleaded guilty to six sex charges in court Wednesday.

Laura Elizabeth Whitehurst, 28, had been charged with 41 counts of sex and oral copulation with a minor in crimes that took place in the mountain foothill city of Redlands, about 60 miles east of Los Angeles. Whitehurst was being held on $500,000 bail.

She pleaded guilty to four counts of unlawful sex with a minor and two counts of oral copulation with a minor. The remaining charges were dismissed during a hearing at San Bernardino Superior Court Wednesday morning.

She agreed to one year in jail, five years of probation, lifetime registration as a sex offender and sex offender counseling. She will be formally sentenced Aug. 28.

"The victims in this case would like to move forward, and this is a way for them to do that," Deputy District Attorney Melissa Rodriguez told reporters, saying both sides had wanted to avoid a drawn-out trial.

Whitehurst's attorney, James Gass, told news media outside the courtroom that Whitehurst wanted to retain custody of her baby girl, whom he confirmed had been fathered by a victim identified in court papers as John Doe. Gass said the victim will turn 18 within two weeks.

He added that the baby is being cared for by Whitehurst's parents.

MORE 4 YOU: Free mobile news, weather apps | LAUSD's Miramonte Abuse Scandal

Gass said Whitehurst was "somewhat emotionally traumatized" by the investigation and legal proceedings.

"She made some big mistakes. There are serious consequences, and she will pay them," he said.

After police publicized her July 1 arrest, saying they believed a 17-year-old student was the father of her weeks-old baby, two other ex-students came forward with allegations of past sexual relationships with her.

One victim was a 14-year-old student at the time the relationship began, and he had sex with Whitehurst in her English classroom, according to police.

Another victim spoke to news media about his experience with Whitehurst in 2007-2008.

"I didn't feel like a victim; I'm not scarred for life or anything," Michael Cooper told NBC4 earlier this month. "To be honest, I had a good time when it was going on."

Whitehurst was charged with sexual relations with all three boys, two of whom were students of hers at Redlands High School.

The sexual intercourse charges to which she pleaded guilty Wednesday were for the father of her baby; the two oral copulation charges were for each of the other victims.

The father of Whitehurst’s baby was a 16-year-old student at Citrus Valley High School at the time the affair began between the pair, police said. The boy attended the birth of the baby girl on June 18, according to court documents.

He and Whitehurst both admitted the affair to police during interviews, according to a detective's affidavit.

Officials with the Redlands Unified School District had interviewed Whitehurst and her victim about their relationship in May, but police were not contacted until the boy's mother made a complaint, according to the affidavit.

At an arraignment hearing July 9 when Whitehurst pleaded not guilty, her defense attorney told reporters she was a "clean-cut American girl."

If convicted of all original charges, Whitehurst would have faced up to 29 years in state prison, the San Bernardino County District's Attorney's Office had said.

More Southern California Stories: