A former Arizona elementary school teacher was sentenced to 20 years in prison Friday after pleading guilty to having sexual contact with a 13-year-old student, KTVK reported.

>> Read more trending news 

Brittany Ann Zamora, 28, was sentenced by Judge Sherry Stephens, who opted for 20 years instead of the maximum sentence of 27 years sought by prosecutors, KNXV reported. Zamora also will be on lifetime probation after her release from prison and must register as a sex offender, the television station reported.

"I am a good and genuine person who made a mistake and regret it deeply," Zamora said in a Maricopa County Superior Court hearing Friday. "I lived my life respecting and trying to obey every law. I'm not a threat to society."

Zamora pleaded guilty to sexual conduct with a minor, attempted molestation of a minor and public sexual indecency in June, KTVK reported. She was originally charged with 15 felony counts, including eight counts of sexual misconduct with a minor, the television station reported.

The plea agreement came after Zamora had several sexual encounters with the teen in a classroom at Las Brisas Academy in Goodyear, and in her car in 2018, KSAZ reported.

Although Zamora apologized to the victim, his family and her family, her attorney read a statement outside the courthouse after the sentencing that blamed the teen and painted the former teacher as a victim, KTVK reported.

"This was not between a young child and Brittany — this was a teenager," attorney Belen Olmeda Guerra said.