A 32-year-old woman hanged herself inside a Brooklyn police holding cell, after she was arrested on marijuana charges, police sources said.

The woman, whose name was withheld pending family notification, used her pants to form a crude noose, which she slung around a horizontal cell bar at the 73rd Precinct station house in Brownsville at 6:47 p.m., sources said.

The woman was found dead 40 minutes after she was placed alone in the cell by officers.

A source said officers typically check on the cells, but it’s not clear what happened in this case.

After a detective made the horrifying discovery, the woman was taken to Brookdale Hospital, where she was pronounced dead.