EARLIER this year the French Socialist Party displayed its social liberalism by legalising gay marriage. This week it rediscovered its illiberal streak. On December 4th, the lower house of parliament voted to make prostitution a crime for those who pay for sex, subject to a fine of €1,500 ($2,030) for a first offence and €3,750 thereafter. “I don’t want a society in which women have a price,” said Najat Vallaud-Belkacem, the women’s minister. She wants nothing less than to “abolish” prostitution in France.

With Germany having second thoughts about its decision over a decade ago to liberalise the world’s oldest profession, the French have decided to follow Sweden, Finland and Norway in restricting prostitution. Paying for sex is not now illegal, although brothels, soliciting and pimping are. France has at least 20,000 sex workers, far fewer than the 400,000 or so thought to offer their services across the Rhine. But the nature of prostitution in France has changed radically over the past 20 years.

Today about 90% of those working the streets in France are foreigners, up from 20% in 1990. Women (and some men) are trafficked to France from Romania, Bulgaria, Nigeria and China by prostitution rings; many are subjected to violence, as are their families. Before they turn up on city streets or wooded parks such as the Bois de Boulogne, women are “bought and sold, swapped, detained, raped and tortured, deceived, trafficked, despoiled,” said Ms Vallaud-Belkacem. To protect prostitutes, the new law also decriminalises soliciting and offers help for those who want a way out.

An initiative of parliamentary Socialists (not of François Hollande’s government), the law has divided the opposition and prompted extra-parliamentary indignation. Prostitutes marched against it. “You sleep with us; you vote against us!”, chanted one angry group outside the National Assembly. A collection of literary types, calling themselves the “343 bastards”, caused a stir when they signed a petition denouncing the new law entitled “Hands off my whore!”, a play on an anti-racism slogan. Published in a magazine edited by a woman, Elisabeth Lévy, it accused the abolitionists of “a war against men”, and claimed to defend “not prostitution, but liberty”. Feminists slammed the stunt as indecent.

The French once had a famously tolerant approach towards prostitution. Filles de joie operated legally under Napoleon, and brothels were even inspected for health standards. It was not until the post-war period that the French began to clamp down, outlawing maisons closes, or brothels, in 1946. Ms Vallaud-Belkacem argues that the newly violent and criminal nature of prostitution rings necessitates a still tougher line. In 2012 as many as 51 human-trafficking networks were closed down, 30% more than two years ago, and 572 pimps were arrested. But the worry is that criminalising cash for sex could drive this murky business even further underground.