ROCHESTER, N.Y. (WROC) — A Wyoming County man was sentenced to prison for attempting to have sex with an 11-year-old girl, federal officials announced Wednsday.

According to U.S. Attorney Trini Ross, 42-year-old Daniel Hays of Bliss, New York was sentenced to sever five years in prison and 10 years of supervised released following his conviction of attempted receipt of child pornography.

Authorities say during April and May 2021, Hays engaged in sexually explicit online and text communications with an individual who he believed to be an 11-year-old girl.

In reality, the child was an undercover New York State Police investigator working with the Department of Homeland Security.

Officials say during the conversations, Hays discussed having sex with the child, and asked the child to produce and send to him naked photographs.

On May 11, 2021, prosecutors say Hays traveled approximately two hours from Bliss to the child’s home in the Western District of New York, in order to have sex with the child.

Hays was arrested upon his arrival at the meeting place, at which point he was found to be in possession of candy that he purchased as a gift for the child.