ELIZABETH, N.J. -- A New Jersey middle school teacher is accused of having sexual relations with one of her male students, authorities announced Friday.

Nataly Lopez, 27, of Elizabeth, has been charged with first-degree aggravated sexual assault, second-degree sexual assault and third-degree endangering the welfare of a child, the Union County Sheriff's Office said in a statement.

Lopez taught classes at Nicholas S. LaCorte-Peterstown School No. 3, but was employed by Source4Teachers, a private company that hires substitute teachers for the school district, the sheriff's office said.

She allegedly engaged in sexual acts with the student in her vehicle on two occasions and exchanged sexually explicit messages with him online, Union County Assistant Prosecutor Meghan Tomlinson said.

Get Breaking News Delivered to Your Inbox

Police said Lopez was arrested without incident at her home Thursday afternoon and held in Union County Jail pending her first court appearance. They have not released the age of the student in the case.

Elizabeth Schools Superintendent Olga Hugelmeyer said the district immediately banned Lopez from entering its facilities when they became aware of the allegations. "Law enforcement and social service agencies were notified, as was the substitute's employer," Hugelmeyer said in a statement to NJ.com.

If convicted, Lopez could face between 10 and 20 years in prison.