UPDATED: Ontario's top court has struck down the ban on brothels.
The court says the ban puts prostitutes in danger and they should be allowed to work safely indoors.
However, it has given the government one year to rewrite the law if it chooses to.
At the same time, the Appeal Court says concerns about the nuisance created by street prostitution is real.
So it has upheld the ban on soliciting for the purposes of selling sex.
When it comes to living on the avails of prostitution, the court says the law can be reworded to specifically exclude the exploitation of prostitutes.
MORE TO COMETORONTO - A ruling that could effectively end prostitution-related prosecutions in Canada comes down Monday as Ontario's top court weighs whether current laws are constitutional.
Essentially, the Appeal Court will decide whether three laws put sex-trade workers in danger by banning brothels, soliciting, and living off the avails of the sex trade.
"It's a matter of life and death," said Valerie Scott, one of three women involved in the case.
"In what other legal occupation is a worker not permitted by law to take any security measures?"
In a comprehensive judgment in September 2010, Ontario Superior Court Justice Susan Himel ruled the laws were fundamentally unjust by making life more dangerous for sex-trade workers. Prostitution itself was not illegal in Canada, though many of the key activities were under the three laws that Himel struck down.
The provisions, Himel said, put prostitutes at risk by preventing them from working indoors, screening clients or hiring bodyguards.
"These laws, individually and together, force prostitutes to choose between their liberty interest and their right to security of the person," Himel wrote.
The government appealed, arguing in part last June that the laws are necessary to allow police to control street prostitution and to protect vulnerable women from harm at the hands of pimps. It also maintained that prostitutes make an economic choice they know is dangerous, and therefore have no constitutional protection for that decision.
Even Prime Minister Stephen Harper has weighed in.
"We believe that the prostitution trade is bad for society," Harper said after Himel's decision.
"That's a strong view held by our government (and), I think, by most Canadians."
Critics of the laws argued that scrapping them had the potential to save women from predators like serial killer Robert Pickton, convicted of murdering six Vancouver prostitutes. They also accused those who back the restrictions of fear-mongering.
"The prohibitionists are throwing kids at the wall, they're throwing white slavery at the wall, and the pimps with children in tow on their front lawn, they're throwing that at the wall, just hoping that something will stick," Scott said.
The Christian Legal Fellowship, which intervened in the appeal, argued the provisions reflected society's views that prostitution "offends the conscience of ordinary Canadians."
Terri-Jean Bedford, a dominatrix involved in the legal challenge, called Monday's decision "extremely" important.
"These laws discriminate against women," Bedford said. "If the decision is in our favour, they can take control over their bodies."
The Appeal Court suspended Himel's ruling pending its own decision, which will be binding in Ontario.
However, if the five-justice panel sides with the lower court, it would have a strong chilling effect on prosecutions elsewhere in the county, pending any decision by the Supreme Court of Canada.
While the case appears destined for Canada's highest court, Alan Young, the lawyer who launched the challenge on behalf of the women, said the government should have reviewed the laws, not engaged in "knee-jerk" appeals.
"It's a disservice to women in the sex trade that the government takes such a cavalier position," Young said.
The case has "crystallized" the issues around the sex-trade, Young said, and would spark a broader political debate.
"It's the beginning of a dialogue between Canadians, the courts and Parliament as to what we should do about something that we've unthinkingly just prohibited for the last 100 years without really evaluating what we're doing," Young said.
The Appeal Court ruling is to be released at 11 a.m.
Also on HuffPost