ALBEMARLE COUNTY, Va. (WVIR) - A former Albemarle County teacher is admitting to having a sexual relationship with a student, and may spend two decades behind bars.

Amelia Tat appeared in Albemarle Circuit Court Friday, January 27, to finalize a plea deal. She is guilty of two counts of carnal knowledge without force of a 13 to 15 year old.

According to court documents, Tat was working as a science teacher at Jack Jouett Middle School early in 2015 when she began contacting a student over Instagram and Snapchat. Tat told the teenager in those online chats that she had feelings for him.

Tat and the victim eventually had sexual intercourse in her classroom.

The teacher continued the relationship with inappropriate text messages, and they had sex again in Lynchburg.

The victim’s mother found the text messages Tat sent, and called the police.

Police arrested Tat on June 29, 2016. Albemarle County police charged her with two felony counts of carnal knowledge of a minor, and one felony count of taking indecent liberties with a child by a person in a custodial or supervisory relationship.

Lynchburg police had also charged Tat with felony count of carnal knowledge of a minor, but that was incorporated into her plea deal.

Tat faces a maximum sentence of 20 years in jail, and a fine of $200,000. Her sentencing is scheduled for May 1.

She was later employed by Nelson County Public Schools following her time at Jack Jouett Middle School. Officials say Tat was suspended from her position as a teacher at Nelson County High School. Tat resigned on Thursday, January 26, 2017.