HERNANDO COUNTY, Fla. (WFLA) — Hernando County deputies arrested a U.S. Navy sailor visiting the Tampa Bay area for the holidays after he allegedly had sex with a teenager, according to a release.

Deputies said 24-year-old Dylan B. Adams, stationed in San Diego, flew to the area to stay with family. However, before he left, he allegedly flirted with an underage girl on social media, the sheriff’s office said.

According to the Hernando County Sheriff’s Office, Adams knew the victim because they previously went to the same church in Pasco County.

The sheriff’s office said the man visited the minor’s home on New Year’s Eve while her mother was at work. While there, he allegedly had sex with the victim.

Deputies said the sailor then left the home, went to a pharmacy, and returned with “Plan B” medication for the victim to take after they had sex. He then allegedly gave the child the medication and left with the packaging.

Before he left, he told the victim to delete their social media messages, according to the sheriff’s office.

The victim reported the incident on Sunday. After deputies collected evidence from the victim and their home, Adams was taken into custody, where he confessed to detectives.

Adams was charged with three counts of lewd and lascivious battery on a person over 12/under 16. He has a bond of $30,000.