Brianna Nicole Stanley, 23, was charged on Friday for allegedly having sex with the 12-year-old student at Carver Middle School in North Carolina

A North Carolina middle school teacher has been arrested for allegedly having sex with a 12-year-old student.

Brianna Nicole Stanley, 23, was charged on Friday with multiple sex crimes related to the student at Carver Middle School in Laurel Hill.

Stanley resigned from her teaching job on Thursday before she was arrested.

A parent had contacted the school last week with allegations that Stanley was having an inappropriate relationship with the child.

The gender of the child is not known.

The school immediately removed her from the classroom and Scotland County Sheriff's Office started investigating.

Stanley was charged with three counts of felony statutory sex offense against a child less than 13, five counts of felony indecent liberties with a student by a teacher, five counts of felony sexual activity by a teacher, and one count of felony third-degree child exploitation related to child pornography.

Authorities had posted about her arrest on the sheriff's Facebook account but later removed the post due to an influx of inappropriate statements about the child and teacher.

A parent had contacted the school last week with allegations that Stanley was having an inappropriate relationship with the child

Scotland County Schools issued a statement following Stanley's arrest, saying they were 'devastated' by the allegations.

'Early this week a parent contacted the Scotland County Schools administration with concerns about a potentially inappropriate relationship between a teacher and student at Carver Middle School,' the statement said.

'The teacher was immediately removed from the classroom and an investigation commenced. The school system also contacted law enforcement.

'The teacher submitted her resignation on Thursday, while the investigation was still ongoing. Also on Thursday, the school system received evidence of possible criminal misconduct by the teacher. This was immediately shared with the Sheriff’s Department and we have been informed that on Friday morning, the teacher was arrested.

'The school system is devastated by the allegations of this serious breach of trust by an employee. Our focus now is on supporting our students and supporting law enforcement in their investigation.'

Stanley was given a secured bond of $2.5 million.