NEWARK, N.J. (AP) — A Massachusetts man who traveled to New Jersey to have sex with someone he thought was an 8-year-old girl has been sentenced to nearly 20 years in prison. Federal prosecutors say Richard Bly posted an online advertisement in February 2017, seeking parents who would let him have sex with their children.

A special agent posing as the mother of an 8-year-old girl exchanged numerous emails and texts with the 69-year-old Dracut man, many of which were graphic in nature.

The messages led to a planned meeting at a Ramsey hotel the following month. Bly was arrested by federal authorities after he checked in to the hotel, and eventually was convicted at trial of online enticement of a minor.

Bly was out on bail at the time of his arrest in New Jersey. He was facing similar charges in Massachusetts.

(Copyright 2019 by The Associated Press. All Rights Reserved.)