The arrests, which also included 40 civilians, came after a three-year probe.

Seven New York Police Department officers, including a member of the department’s vice squad, were arrested in connection with a gambling and prostitution ring, according to law-enforcement officials.

Officers from the Internal Affairs Bureau arrested the three sergeants, two detectives and two officers on Wednesday morning after a three-year probe into the alleged operation, officials said. Investigators also arrested 40 civilians. The officers are suspected of providing protection for the enterprise, an official said.