A New York City substitute teaching assistant was fired on Saturday night hours after she was accused of having sex with a mentally ill 14-year-old student inside her apartment in the Bronx.

The police charged the woman, Maria Contreras, 29, with six counts of second-degree rape for each time she had sexual intercourse with the student, who is male. She also faces two counts of second-degree criminal sex acts with a minor for oral sex the two performed on each other, the police said. All of the charges are felonies.

Ms. Contreras, who worked as a substitute paraprofessional at the Bronx Academy of Letters, was arrested shortly before 7 p.m. on Saturday and taken to the Bronx Special Victims Bureau, where she was awaiting transfer to central booking, the police said. It was not known whether she had a lawyer.

"These allegations are incredibly disturbing,” Devora Kaye, a spokeswoman for the Department of Education, said by email on Saturday night. “Ms. Contreras has been removed from her position and will no longer be employed” by the department. She said education officials are helping with the police investigation.