(CNN) -- A former sixth-grade teacher and mother of two pleaded guilty to having sex with a student, Southern California authorities said Friday.
Malia Brooks, who taught at Garden Grove Elementary in Simi Valley, pleaded guilty Thursday to three counts of lewd conduct with a child under 14, said Ventura County Deputy District Attorney Erin Meister.
The judge indicated that Brooks will likely receive a six-year prison term when sentenced on August 23, Meister said. Bail was set at $2 million for the 32-year-old Brooks, who remains in custody.
"Malia Brooks has a mental illness. For 31 years, she was a law-abiding citizen," her attorney, Ron Bamieh, said. "Something had to occur for her to drastically change who she was. It's not like she is attracted to 12 year-old boys."
Brooks agreed to the plea deal because she did not want to put the victim through a trial, Bamieh said.
A police investigation into allegations that Brooks carried on an inappropriate relationship with a male student began in February. Authorities say the relationship occurred during a four month period in 2012.
Brooks, who had been on administrative leave, resigned from the Simi Valley Unified School District earlier this month.
She was arraigned on charges Wednesday and plead guilty on Thursday, Bamieh said.