A 19-year-old Florida woman who faced criminal charges for an alleged sexual relationship with a 15-year-old female student came to a plea agreement with prosecutors on Thursday morning, which a judge accepted, according to NBC affiliate WPTV in West Palm Beach.

Under the terms of a deal, Kaitlyn Hunt pleaded no contest to five charges — two counts of misdemeanor battery, two counts of felony interference with child custody, and a count of contributing to the dependency of a child, according to a copy of the plea agreement provided to NBC News by assistant state attorney Brian Workman.

The case attracted national attention after Hunt's family and legal team said that the charges stemmed from anti-gay prejudice.

Hunt has been in custody since Aug. 20 for allegedly violating a court order not to make contact with the alleged victim, an unidentified girl Hunt met when they were both students at Sebastian River High School in Sebastian, Fla., according to an Indian River County Sheriff's Office arrest affidavit.

ndian River County Sheriff viaAP In this booking mug released by the Indian River County Sheriff's Office on Monday, Aug. 19, shows Kaitlyn Hunt, 19, of Vero Beach, Fla.

The plea deal includes a four-month jail sentence for Hunt, followed by two years of house arrest with electronic monitoring, and then nine months of monitored probation.

Unless Hunt violates the terms of the deal, she will not be a convicted felon under Florida law and she can petition to have the court seal her file and expunge the case after 10 years, according to the agreement.

The agreement also provides that Hunt will not have to register as a sex offender but that "she will have to undergo a psychological evaluation and successfully complete any recommendation treatment as a condition of her supervision."

Workman said Hunt and her parents consented to the terms of the deal.

"I believe this is a fair and balanced offer that protects the victim while giving Ms. Hunt the ability to avoid the most severe consequences of her crimes by demonstrating that not further punishment is necessary," Workman said.

A Facebook page Hunt's mother, Kelley Hunt Smith, had set up earlier this year, used as a way to bring attention to the case, appears to have been deactivated.

Smith had previously said in a message uploaded to Facebook earlier this year that her daughter's friendship with the unidentified underage girl began when they were both players on the school basketball team. At the time, Hunt was 18 and the unidentified girl was 14, according to the arrest affidavit.

The relationship was initially platonic, but the two "eventually expressed their affection for one another in intimate ways," Smith's statement said.

Smith said that when the girls’ basketball coach found out about the relationship, she booted Hunt from the team, and then contacted the younger girl’s parents.

The younger girl's parents pressed charges against Hunt earlier this year, according to Thomas Raulen of the Indian River County Sheriff’s Office.

According to Florida law, a person under the age of 16 is not legally able to consent to sexual relations.

"It was never the intent of the (victim's family) to harm the defendant and this case was never about gender or sexual orientation. It was about age-appropriate relationships and following the rules and laws of our society," according to a statement the victim and her family issued through their attorney Charles Sullivan, Jr.

Related:

Florida mom alleges anti-gay bias after daughter expelled, arrested