A Staten Island teacher has been charged with 30 counts of statutory rape because of her alleged sexual relationship with a student.

The former high school gym teacher quit her job at Moore Catholic High School earlier this year after the scandal came to light.

The teacher in question, Megan Mahoney, 24, was arrested on Monday and charged with 30 counts of statutory rape for having a sexual relationship with a 16-year-old male student, according to the Staten Island Advance. Their relationship began in Oct. 31, 2013 and ended in Jan. 9.

Aside from being one of the high school's gym teachers, Mahoney was also an assistant basketball coach. According to court documents, Mahoney and the student had sex at least twice a week. She was also charged with four counts of criminal sexual act in the third degree for oral sex and one count of endangering the welfare of a child.

According to the New York Post, the illegal affair came to light after the teen's ex-girlfriend saw the two together at a pizzeria and called the police. When the Post interviewed him, the teenager did not know Mahoney had been arrested.

"I don't really know how I feel about it," he said.

Back in August, the Post first reported on the alleged illegal relationships happening at Moore Catholic High School, a prestigious private school. Aside from Mahoney, there had been allegations of other teachers' inappropriate conducts with students.

The school's athletic director and chief operating officer, Richard Postiglione, knew about the illicit relationship but did not alert authorities, opting to approach Mahoney and making her promise to end the relationship.

The charges against Mahoney carry a maximum sentence of four years.

Soon after her arrest, she was released without bail but declined to comment on the issue. Eric Nelson, her defense attorney, declined to comment as well. Mahoney is due back in court on Dec. 2.