A former gym teacher has been charged for allegedly having sex numerous times with a male student.

Megan Mahoney, 24, was facing 30 counts of statutory rape after being arrested on Monday for incidents which took place over three months between Halloween last year and January 9, 2014.

Authorities said that Mahoney, a teacher at Moore Catholic High on Staten Island, had sex with the 16-year-old boy multiple times - including at the school.

Arrested: Megan Mahoney, 24, was arrested on Monday on 30 counts of statutory rape for sexual liaisons with a 16-year-old student at a Catholic high school on Staten Island

She was arrested on Monday on four counts of 'criminal sexual act' meaning mutual oral sex, according to the New York Post.

Mahoney had engaged in inappropriate sexual behavior with the boy at least twice a week.

The 24-year-old, who also coached the girls' basketball team, resigned from the school in January after she was spotted with the boy by his ex-girlfriend at a local pizzeria.

The NYPD investigation found some encounters had happened at the school.

Mahoney could serve up to four years in jail for each felony charge. She was released on bail.

Moore Catholic High School was founded in 1962 and has 500 students and 28 teaching staff.