A bill that would decriminalize prostitutes and fine their customers passed France's lower house of parliament on Wednesday by a wide margin.

The French parliament voted 268-138 to pass the bill, which now goes to the senate.

In an attempt to fight human trafficking networks, the proposed law would introduce a 1,500-euro (about $2,000) fine for customers and decriminalize the estimated 40,000 prostitutes in France. The bill scraps a 2003 law that bans soliciting on the streets, and would make it easier for foreign prostitutes to remain legally in France if they enter a program to get out of prostitution.

Prostitution is legal in France but soliciting, pimping and the sale of sex by minors is prohibited.

The bill is expected to face more opposition in the senate. Protesters, including prostitutes in masks, have demonstrated in front of the parliament building in recent weeks.

President Francois Hollande's Socialist government strongly backs the bill. A final vote could be several months away.