A Hudson Valley man who was accused of having sex with a young girl and prostituting her across two states is heading to prison.

On Thursday in Ulster County Court, 39-year-old Gregory C. Williams, who last resided at the Capri Motel in Port Ewen but previously lived in the City of Kingston, was sentenced to two years and four months to seven years in state prison. The sentence is the maximum allowed by law for his conviction for promoting prostitution.

In Dec 2015, the Ulster County District Attorney’s Office Family and Child Advocacy Center began investigating a report that a 16-year-old female was being sexually abused and prostituted in the Ulster County area.

The investigation determined that Williams was in sexual relationship with a young girl, police say. The 39-year-old was also accused of trafficking the 16-year-old as a prostitute in Ulster County, Long Island, and Virginia.

According to the Ulster County District Attorney’s Office, this marks the first felony conviction for child trafficking since the Ulster County Department of Social Services was selected to receive funds under the Safe Harbour Program run the by New York State Office for Family and Child Services.