SAN FRANCISCO (AP) — A measure that aims to keep prostitutes from facing criminal charges has qualified for the November ballot in San Francisco.

The measure would bar authorities from spending money to investigate or prosecute people for engaging in prostitution.

The measure, which qualified Friday, would also end a local program that allows those caught soliciting a prostitute for the first time to avoid charges if they attend a class and pay a fine.

The Erotic Service Providers Union recently gathered the 12,000 signatures necessary to put the measure on the ballot.

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