GAINESVILLE, Texas (KTEN) — A Gainesville police officer was arrested Thursday morning after being indicted for alleged indecency with a child by sexual contact.

Dustin Duncan submitted his resignation for violating the city's code of conduct.

Duncan was taken to the Cooke County Jail, where he posted a $40,000 bond.

"The Gainesville Police Department reaffirms its commitment to upholding the highest standards of integrity, professionalism, and accountability," Chief Kevin Phillips said in a written statement. "Any behavior that violates our code of conduct, the law, and in turn the trust placed in law enforcement officers will not be tolerated."

He added that no further details about the alleged crime can be provided while the Cooke County Sheriff's Office is conducting its investigation.