OTTAWA -- Until the sex trade in Canada can be eliminated, federal laws should provide safer working conditions for sex workers, Justice Minister Peter MacKay said Tuesday.

Bill C-36 does just that, he argued -- a position that continued to draw sharp criticism from some advocacy groups Tuesday at the first day of Senate hearings into the proposed law.

The bill is the government's response to a Supreme Court decision last year that struck down the existing law as unconstitutional and gave the government a year to come up with a replacement.

The new law would make prostitution illegal, but with a caveat: it provides legal immunity for those who sell sex.

"It does so not because it authorizes or allows selling it but rather because it treats sellers as victims of sexual exploitation, victims who need assistance in leaving prostitution and not punishment for the exploitation they've endured," MacKay told senators.

Before the high court ruling last year, prostitution was legal, but almost all related activities -- including communicating in a public place for the purposes of prostitution, pimping and running a brothel -- were criminal offences.

The Supreme Court concluded, however, that the law placed prostitutes at undue risk and violated their Charter rights. The government was given until December to come up with new legislation.

That replacement flips the equation, giving prostitutes immunity from prosecution and the legal ability to conduct business related to sex work, provided they are acting of their own free will.

Those who buy sex or profit from it in an exploitative situation would still face charges.

"Prostitution is now de facto illegal, but the emphasis and the focus is on the purchaser and the perpetrator -- the pimps who are attempting to exploit and gain materially from prostitution itself," MacKay said.

But the provisions of the new law which ban advertising and criminalize the buying of sex are two elements which will render it unconstitutional anew, said Katrina Pacey, litigation director for the Pivot Legal Society.

The Supreme Court said laws which stood in the way of sex workers doing business safely were unconstitutional and the new rules do the same thing, she said.

In effect, the bill would encourage police to just park outside a sex worker's home and arrest people going in, she suggested. The new rules would also make it difficult for workers to find places to advertise where they work.

"You can see how this is an indirect attack on capacity of sex workers to work indoors," she said.

For their part, senators struggled with the idea of making it a crime to buy sex when prostitutes are allowed to sell it of their own free will.

It is a nuance the courts will likely explore, MacKay allowed.

"They will investigate, without doubt, and will look at the individual circumstances in every case," he said, adding the issue of whether any sex worker actually operates under free will must be part of that examination.

Criminalizing the clients could just make the exploitation worse, suggested Conservative Sen. Don Plett.

"Is the pimp going to say to the 14, 15 or 16 year old girl, 'I am losing many of my customers...you go out and hustle a little harder to make sure you keep as much activity going as possible,' he asked.

Hopefully the prostitutes will feel empowered enough to come forward and report such exploitative behaviour, MacKay responded.

And that's what women need, suggested Timea Nagy, who testified at the committee Tuesday.

Nagy, who describes herself as a victim of human trafficking who now works with other victims, said she hears the concerns of some sex workers who fear the new rules could create more dangerous conditions.

But she said those who choose to work in the sex industry have options and luxuries available that trafficking victims don't.

"They have been lured, manipulated and they are being kept against their will while serving 10-15 clients a day, like I did once, just so they can eat once a day," Nagy said.

"They are not doing this for money, to save up. They are doing this so they don't get beaten."

The new bill has already been studied by the House of Commons, where MPs heard from many of the same witnesses expected before the Senate this week.