A teacher in Alabama, who was arrested over five years ago for having sex with two students, has been sentenced to state prison for her crime.

Carrie Cabri Witt, who had previously argued that it was her constitutional right to have sex with the students, received a 10-year sentence on Thursday. However, she will only spend 18 months in state prison, followed by 18 months in a community corrections programme. The remainder of her seven year sentence will be served on probation, while she will also have to register as a sex offender.

Witt, a teacher at Decatur High School, was taken into custody in March 2016 after being accused of having sex with two students, aged 17 and 18. She pleaded guilty to one count of a school employee engaging in a sex act with a student under the age of 19, while a second count was dismissed by prosecutors, reports People magazine.

After her arrest, her attorneys had defended that the constitution gave her the right to have sex with students, citing the Alabama law under which anyone over 16 without a specified infirmity is capable of consenting to sex. The defence also argued in court filings that state statutes which prohibit a school employee from having sex with a student are unconstitutional.

The attorneys told the court that Witt did not violate any of the other laws that are there to protect people who are incapable of consent because of age, mental impairment, physical incapacity, and in cases of coercion or fraud.

Meanwhile, one of the victims also testified in favour of the convict and said he didn't agree with the law that prohibits teachers and school employees from having sex with students. "The crime doesn't fit the punishment," he said while insisting that the sex was consensual.

However, prosecutors disagreed and said that the statute preventing teachers from establishing sexual relations with their pupils is constitutional and necessary to protect high school students from sexual advances by school employees.

A judge refused to dismiss the case, after which Witt pleaded guilty ahead of her scheduled trial. The 48-year-old apologised for her crime during her sentencing and told the court that she is "ashamed" of her actions.

"I don't think I've ever been more ashamed of myself," she said, noting that her character and her "ability to be a mother" have been criticised since her arrest.

Crime Scene police line
Crime scene police line | Representational Image Photo: GETTY IMAGES / SCOTT OLSON