TERRE HAUTE, Ind. (AP) _ Authorities who arrested a western Indiana sheriff's deputy last week on child pornography charges say more than 40,000 child porn images were found on his computer and a storage device.

Thirty-one-year-old James Edward Haley Jr. was arrested Friday at his Terre Haute home on federal charges of distribution and possession of child pornography.

The Tribune-Star reports a federal magistrate on Monday set a Thursday detention hearing to determine whether Haley will be given pretrial release or held until trial.

Vigo County Sheriff Greg Ewing said Monday he's shocked and angry that Haley allegedly violated the public's trust by sharing pornographic images and videos of children as young as age 5.

Haley was hired by the department in 2011. He's been on paid administrative leave since his arrest.