Sheriff's Sergeant Charged With Child Pornography Shot Himself After Posting Bail

Sgt. Kreg Costa was arrested last week on more than two dozen child porn and illicit sexual conduct charges, authorities said.

A Florida deputy facing 29 sex charges related to child pornography has shot and killed himself after posting bail, authorities said.

Broward County Sheriff's Sgt. Kreg Costa died Wednesday night at Fort Lauderdale hospital after shooting himself in the head, spokeswoman Veda Coleman-Wright said in a statement. He pulled the trigger outside his Sunrise home after being released from jail earlier in the afternoon, she said.

Read: A Father Has Been Sentenced To Life In Prison For Selling His Daughters To Child Pornographer

The department began investigating Costa after colleagues noticed he rarely left his office during his night shift, authorities said. His computer was examined and showed he had been watching hardcore incest, bondage and child pornography while at work, according to The Associated Press.

Read: Amber Alert Issued For 3 Children Believed To Be Traveling With Accused Child Molester

Costa also had an online relationship with a 16-year-old girl and told her to record herself performing sexual acts, Coleman-Wright said. The girl told investigators that she first met Costa online when she was 15 and knew him by his Twitter handle @CallMeSir34.

He had been suspended without pay since April.

He leaves behind a wife and five children ranging in age from 1 to 12.

Watch: Cop Arrested On Child Porn Charges Spotted Asking Kylie Jenner For Autograph