San Franciscans rejected a measure that would have legalized prostitution in the city.

Measure K lost by an overwhelming majority on Wednesday with more than half the precincts reporting.

San Francisco's mayor and top prosecutor spoke out Wednesday against the controversial ballot measure that would have decriminalized prostitution in the city, saying it would remove the ability of law enforcement to curb human trafficking and provide services for victims.

Speaking on a dingy street corner in the Tenderloin District, the site of a now-closed massage parlor, Mayor Gavin Newsom and District Attorney Kamala Harris pushed a message that prostitution is not a victimless crime.

"We can not give a green light or a pass to predators of young women," Harris said.

"This is so much bigger than what happens between consenting adults behind closed doors," she added.

Harris said prostitution often accompanies drug crime, violence and quality of life in neighborhoods such as the Tenderloin.

She said passage of Proposition K would not be "compassionate."

Newsom echoed Harris' comments.

"If Prop K passes, can you imagine living here?" he asked, motioning to the surrounding Tenderloin streets.

"This is serious business," he said. "We're trying to clean up the Tenderloin."

"If people really knew what was happening in these massage parlors, there would be outrage," Newsom said.

Supporters of the measure, who plan to hold their own news conference this afternoon, have said the legislation aims to increase safety for women and help sex workers report violence without fear of arrest.

The proposition calls on police to make sex workers' safety a priority by instead focusing on enforcing laws against assault, rape, kidnapping and extortion, supporters say.

They argue it would actually strengthen the prosecution of sex traffickers and protect immigrant women from arrest and deportation.