Seven officers with the New York Police Department are accused of prostitution, corruption, and misconduct charges in connection with an illegal gambling and prostitution ring in Brooklyn and Queens, according to the New York Times.

The police said that more than 40 civilians were also in custody or being sought in connection with the investigation, which began with an anonymous officer's tip to the internal affairs unit in April 2015.

Authorities say retired NYPD detective Ludwig Paz and his wife—a former prostitute—ran brothels in Queens, Brooklyn, and Hempstead, Long Island, as well as numerous gambling rooms.

The current officers arrested reportedly were friends with detective Paz and provided him with inside information about impending raids and other police activities that would jeopardize his illegal operations.