One of the most powerful prosecutor’s offices in the country has just decriminalized prostitution, the latest development in a nationwide effort to keep law enforcement out of petty vice like marijuana use and sex work.

The Manhattan district attorney, Cyrus R. Vance Jr., made the announcement on Wednesday morning. He simultaneously asked a judge to dismiss thousands of open cases relating to prostitution, unlicensed massage, and loitering for the purposes of prostitution. Some of the cases “dated to the 1970s and 1980s, when New York waged a war against prostitution in an effort to clean up its image as a center of iniquity and vice,” according to The New York Times.

“Over the last decade we’ve learned from those with lived experience, and from our own experience on the ground: Criminally prosecuting prostitution does not make us safer, and too often, achieves the opposite result by further marginalizing vulnerable New Yorkers,” Vance said in a statement.

The Manhattan D.A. will continue to charge crimes related to sex trafficking and patronizing a sex worker, according to the New York Times. But it joins cities like Baltimore, Philadelphia, and neighboring borough Brooklyn in declining to prosecute sex workers. Going forward, sex workers will be referred to counseling sessions, but they will not be forced to attend.

Chirlane McCray, the wife of New York City mayor Bill deBlasio, has long advocated for decriminalizing prostitution. Last month she said, “The communities hit hardest by the continued criminalization of sex work and human trafficking are overwhelmingly LGBTQ, they are people of color, and they are undocumented immigrants. Sex work is a means of survival for many in these marginalized groups.”