The man arrested Wednesday as part of a federal sex trafficking case involving a 17-year-old girl is a retired New Jersey police officer.

James Keenan, 47, was a patrolman with the Middletown Police Department from 1990 to 2016, township police spokesman Det. Lt. Paul Bailey confirmed Saturday.

Keenan was arrested by FBI agents in Hazlet on Wednesday and charged with sex trafficking of a child, attempted sex trafficking of a child and attempted enticement, according to police.

Keenan -- who still owns a home in Hazlet, tax records show -- had been living in Vancouver, Washington, where he collected his police pension of $79,876 per year, according to New Jersey pension records.

Keenan is being held without bail after the federal court Judge Tonianne Bongiovanni ruled he posed a danger to the community and was a flight risk, according to court records. He is set to be extradited to Oregon.

A grand jury indicted Keenan on April 5 in Portland, Oregon, police said in a release. The arrest came after a month-long investigation from local Oregon police and federal agents.

Craig McCarthy may be reached at 732-372-2078 or at CMcCarthy@njadvancemedia.com. Follow him on Twitter @createcraig and on Facebook here. Find NJ.com on Facebook.

Have a tip? Tell us. nj.com/tips