A New Jersey teacher sentenced to three years in prison for engaging in sex acts and sending numerous sexually explicit text messages to teenage students blames her strict Muslim upbringing for the crimes.

Linda Hardan, of Prospect Park, N.J., pleaded guilty in a deal with the Prosecutor's Office that could have seen the 22-year-old jailed for five years.

Passaic County Superior Court Judge Miguel de la Carrera agreed that there were mitigating factors in deciding on the reduced sentence.

"She had classmates and friends, but somehow, perhaps because of limitations on her dating life, she didn't find the proper outlet among males of her own age," the judge said, reports NorthJersey.com. "She did not learn how to interact with guys her age."

Hardan's lawyer, Alissa Hascup, argued for her to be treated by a therapist under strict supervision instead, but the judge focused on the harm done to the teen boys.

In one case, a 16-year-old boy dropped out of high school and has not returned due to Hardan's actions.

In another, a 14-year-old boy received 40 images of Hardan "in varying states of undress" via text message, and once drove the boy to nearby Paterson and committed a sexual act on him.

The prosecutor said the boy was "so upset, so disgusted that he got out of the car and walked home ..."