The New York Police Department will significantly limit the practice of seizing condoms for use as evidence in prostitution-related cases, ending a procedure that health officials had long criticized as undermining their efforts to protect prostitutes from disease.

The change, which the department announced on Monday, has the support of Mayor Bill de Blasio and the city’s five district attorneys. It allows for the continued practice of using condoms as evidence in cases involving sex trafficking.