“I want what I do to be recognized as a job, a legitimate way of making a living,” Ms. Kim said recently. “This is better than stealing for a living, isn’t it?”

South Korea has always outlawed prostitution, stipulating fines or a prison sentence of up to a year for prostitutes and their customers and harsher penalties for pimps and brothel owners. Still, it tended to look the other way as red-light districts prospered.

That changed after 14 young prostitutes, trapped in their rooms, died during a fire in 2002. Amid public outrage, the government began a more aggressive campaign against the sex trade, and an overhauled statute took effect in 2004. It called not merely for preventing prostitution, but for eradicating it.

Police crackdowns have since become more frequent. The number of red-light districts in the country fell to 44 in 2013, from 69 in 2002, according to government figures, and the number of women working in those districts fell to 5,100 from 9,100. In 2013, the police investigated more than 8,600 cases of prostitution. The government has cited these figures as evidence that the new law is working.

But prostitutes and other critics of the law say those numbers failed to account for the many women selling sex at bars, on social networking services and through smartphone dating apps. These represent a more shadowy side of the sex industry that those critics contend is expanding because of the crackdowns on red-light districts and leaves the women involved more vulnerable to abusive customers, pimps and others. (In South Korea, homosexuality largely remains a taboo subject; the issue of male prostitutes catering to male clients is seldom discussed in public and has not been raised in the current debate.)