A New York police sergeant who was arrested this month on charges that he had sex with an underage girl he met online committed suicide on Thursday, the police said.

The sergeant, Joel Doseau, 43, who was suspended after his arrest, killed himself at his home in Canarsie, Brooklyn, a police official said. Earlier, the official had said he died at a home of a relative.

A family member went to the sergeant’s home after he had not been heard from for a few days and discovered his body. The official said the sergeant had inhaled gas fumes and appeared to have died from asphyxiation.

Sergeant Doseau was arrested on Aug. 5 and arraigned in State Supreme Court in Brooklyn on 40 criminal counts, including rape and sexual abuse. He had worked for the Police Department for 12 years at the time of his arrest.