A measure that aims to keep prostitutes from facing criminal charges has qualified for the November ballot in San Francisco.

The measure, which qualified Friday, would bar authorities from spending money to investigate or prosecute prostitutes for engaging in prostitution.

A San Francisco first-time offender program that allows men to avoid charges for soliciting a prostitute if they attend a class and pay a fine would also end under the measure.

The Erotic Service Providers Union recently announced it had gathered the 12,000 signatures necessary to put the measure on the ballot after failing to get a similar initiative before voters in 2006.

Mayor Gavin Newsom says the measure would hurt the city's ability to investigate and prosecute sex-trafficking crimes.