Manhattan District Attorney Cyrus Vance Jr.’s office moved Wednesday to dismiss nearly 6,000 prostitution and unlicensed massage and loitering cases following New York state’s repeal of an anti-loitering law, often called the “Walking While Trans” ban.

The new policy came as a victory for sex workers and advocates who for years had argued that the statute unfairly targeted people from vulnerable and underserved communities.