A Florida police sergeant took his own life after he was released from jail, having being arrested on child pornography and child molestation charges.

Sgt. Kreg Costa, of the Broward County Sheriff's Office, died at Broward Health Medical Center after allegedly shooting himself at his home, WSVN reports. Costa spent almost a week in jail on 29 charges of child pornography and child molestation.

Costa posted $250,000 bail and left the jail, only to return home and shoot himself, according to WSVN. Costa allegedly dialed 911 before he killed himself.

ADVERTISEMENT Thanks for watching! Visit Website

Costa was first investigated after staff at the BSO Weston district, where Costa worked, started noticing Costa in his office late at night with his uniform belt and gun removed, reports WPLG.

BSO detectives tracked Costa's online movements, and discovered he had visited several pornography sites, including sites that contain pornographic images of children.

Costa is also said to have engaged in an explicit email exchange with a 16-year-old girl, where he reportedly asked the teenager to record herself while she engaged in sex acts.

"It's really sad," one neighbor said. "He could have gone and talked to somebody somewhere, instead of doing something like that in his home. Can you imagine what his wife and kids are gonna go through now?"

ADVERTISEMENT Thanks for watching! Visit Website

ADVERTISEMENT Thanks for watching! Visit Website

Costa was a married father of five at the time of his death. His children range in age from 1 to 12 years old.

Investigators claim Costa left two suicide notes at the scene, and are reportedly labeling this incident a suicide.

Sources: WPLG, WSVN / Photo credit: Broward County Sheriff's Office via Scoop Nest