A former high school teacher in Utah who pleaded guilty to sexually abusing three of her teenage students received a sentence a prison sentence of two to 30 years on Thursday, said a prosecutor, according to Reuters.

Brianne Altice, a former Davis High School teacher, pleaded guilty in April to three counts of forcible sex. Under the plea deal, prosecutors agreed to drop the first-degree felony rape charge that carried a potential life sentence.

Prosecutors say one of the boys was 16-years-old and the other two were 17 when Altice engaged in sexual acts with them. The 36-year-old teacher was out on bail during the course of her trial, but was jailed earlier this year after she allegedly continued a sexual relationship with one of the boys.

Altice's attorney argued that she was a "troubled" person who gave into flirtatious comments from the boys because of a bad marriage and low self-esteem, the Salt Lake Tribune reported.

She sobbed as she apologized to the victims at the sentencing hearing on Thursday. "I am human, and I messed up during a very vulnerable time in my life," she said, according to the Associated Press.

While prosecuting attorney Cristina Ortega admitted that the students indulged in flirtatious behavior, she said Altice should have put an end to it. "She enjoyed the positive attention she was getting from them, but I think she failed to recognize that she was the adult, and this wasn't positive attention," she said.

Altice was fired soon after the allegations came to light, and her husband filed for divorce and custody of their child.