JACKSONVILLE, Fla. (AP) — A former Florida deputy accused of having sex with a 15-year-old girl has been sentenced to 35 years in federal prison.

Travis Ryan Pritchard, 38, was sentenced Tuesday in Jacksonville federal court, according to court records. He pleaded guilty last year to producing an image of a child being sexually abused and possessing an image of a prepubescent child being sexually abused. The former Clay County deputy had faced up to 50 years in prison.

Pritchard began communicating with the girl through an online chat application in December 2019 after meeting her several months earlier at a convenience store, according to a criminal complaint. The two exchanged explicit photos and eventually began having sex on a weekly basis, with Pritchard sneaking into her Green Grove Springs home after her parents went to sleep, investigators said. Green Cove Springs is just south of Jacksonville.

The girl’s mother contacted police in April 2020 and reported that her teenage daughter was having sex with an adult man. A detective took over the girl’s chat account and continued to exchange messages with Pritchard, officials said. They made arrangements to meet at the girl’s home the night of May 1, 2020. The complaint said Pritchard arrived at her home in his patrol vehicle early the next morning and was arrested a short time later.

A forensic review of Pritchard’s cellphone yielded multiple conversations between the girl and Pritchard, as well as an encrypted secure digital folder that contained multiple depictions of child sexual abuse, investigators said.