Sex workers hold signs reading 'Prostitutes are angry. Don't touch our customers', during a protest against new bill. (Photo: AP)

French lawmakers on Wednesday approved a bill against prostitution and sex trafficking that bans buying sex, not selling it. Customers will face fines and be made to attend awareness classes on the harms of the sex trade.

The legislation, which passed 64-12 in the parliament's lower house, the National Assembly, makes French law one of the toughest against sex buyers in Europe.

Prostitution in itself is legal in France - though brothels, pimping and the sale of sex by minors are illegal.

The new measure does away with a 2003 law that banned passive soliciting by sex workers on the street and thus put the legal onus on prostitutes.

This new bill focuses the punishment on the client, introducing a 1,500-euro ($1,700) fine that would rise to 3,750 euros for a sex buyer's second offense.

The convicted client will be obliged to attend classes highlighting the dangers associated with prostitution. The measure will also make it easier for foreign prostitutes - many currently illegally in France - to acquire a temporary residence permit if they enter a process to get out of the prostitution business.

Supporters of the bill argue that it will help fight trafficking networks.

"The most important aspect of this law is to accompany prostitutes, give them identity papers because we know that 85 percent of prostitutes here are victims of trafficking," Maud Olivier, a lawmaker with the governing Socialists and a sponsor of the legislation, told The Associated Press.

Olivier said that many of the sex workers who arrive in France have their passports confiscated by pimps.

"We will provide them with documents on the condition they commit to leave prostitution behind," she added.

But opponents fear that cracking down will push prostitutes to hide, leaving them even more at the mercy of pimps and violent clients.

France's parliament started debating the bill in 2013, but the final vote was delayed due to sharp divisions between the lower parliamentary chamber and the Senate.

Written by a group of lawmakers from both right and left and backed by the Socialist government, the legislation has been inspired by Sweden, which passed a similar measure in 1999. Norway and Iceland also followed the Swedish model.

Other countries such as Germany, Switzerland and the Netherlands, where brothels are legal, are interested in the French experience.

Also Read: Beyond bare chests and bellows: What is FEMEN and why do they go topless?