OTTAWA -- The Supreme Court of Canada has struck down the country's prostitution laws in a unanimous 9-0 ruling, starting a clock for Parliament to reshape social policy dealing with the world's oldest profession.

The landmark Supreme Court decision gives Parliament one-year to produce new legislation, which means prostitution-related offences will remain in the Criminal Code until Dec. 19, 2014.

Justice Minister Peter MacKay said the government was "concerned" by the ruling, and is "exploring all possible options to ensure the criminal law continues to address the significant harms that flow from prostitution to communities, those engaged in prostitution, and vulnerable persons."

The court struck down all three prostitution-related prohibitions -- against keeping a brothel, living on the avails of prostitution and street soliciting -- as violations of the constitutional guarantee to life, liberty and security of the person.

The ruling comes more than two decades after the court last upheld the anti-prostitution laws. It represents a historic victory for sex workers -- mainly women -- who were seeking safer working conditions.

Chief Justice Beverley McLachlin, writing on behalf of the court, said Canada's social landscape has changed since 1990.

"These appeals and the cross-appeal are not about whether prostitution should be legal or not," she wrote. "They are about whether the laws Parliament has enacted on how prostitution may be carried out pass constitutional muster.

"I conclude that they do not."

In the 1990 reference, the Supreme Court upheld a ban on street solicitation, but the two women justices on the court at that time dissented.

This time, all six male Supreme Court justices sided with their three female colleagues.

The decision upheld last year's Ontario Court of Appeal ruling that said the law banning brothels exposed sex workers to added danger by forcing them onto the streets.

"The harms identified by the courts below are grossly disproportionate to the deterrence of community disruption that is the object of the law," McLachlin wrote.

"Parliament has the power to regulate against nuisances, but not at the cost of the health, safety and lives of prostitutes."

Sex-trade workers argued that much has changed since the high court last considered prostitution, including the horrific serial killings of prostitutes by Robert Pickton in British Columbia.

The Supreme Court appeared to acknowledge the Pickton case in the ruling, saying: "A law that prevents street prostitutes from resorting to a safe haven such as Grandma's House while a suspected serial killer prowls the streets, is a law that has lost sight of its purpose."

The court also struck down the law that makes living off the avails of prostitution illegal, rejecting the Ontario government's argument that it is designed "to target the commercialization of prostitution and to promote the values of dignity and equality."

As for communication for the purposes of prostitution, the high court noted that the law is not intended to eliminate prostitution, but to take it out of public view so it will not be seen as a nuisance.

In weighing that balance, the high court concluded "that the harm imposed by the prohibition on communicating in public was grossly disproportionate to the provision's object of removing the nuisance of prostitution from the streets."

Parliament could ask the Supreme Court for an extension on the effect of the ruling, if it has tabled legislation but can't meet the one-year deadline.

The ruling advised Parliament it needs to reshape the legal framework around prostitution.

"That does not mean that Parliament is precluded from imposing limits on where and how prostitution may be conducted," it said.

"Greater latitude in one measure -- for example, permitting prostitutes to obtain the assistance of security personnel -- might impact on the constitutionality of another measure -- for example, forbidding the nuisances associated with keeping a bawdy-house.

"The regulation of prostitution is a complex and delicate matter. It will be for Parliament, should it choose to do so, to devise a new approach, reflecting different elements of the existing regime."

The three principals in the case are retired dominatrix Terri-Jean Bedford, Vancouver sex worker Amy Lebovitch and former prostitute Valerie Scott, of Toronto.

Their lawyer, Toronto law professor Alan Young, hailed the ruling as "a resounding victory for the rule of law, and a victory for liberty and security of the person and finally a long overdue recognition that sex workers are deserving of equal protection of the law."

Bedford, clad in her trademark long black leather coat, cracked her whip, and mugged for cameras in the vast granite foyer of the Supreme Court.

"Now, the government must tell all consenting Canadians, all consenting adults, what we can and cannot do in the privacy of our home, for money or not, and they must write laws that are fair," said Bedford.

Young said all those affected by the law should come forward to consult with the government in the coming year.

Scott said politicians don't understand "how sex work, works" and should consult meaningfully with those in the trade in the coming year. "They won't be able to write a half-decent law. It will fail," she said.

Don Hutchinson, vice president of the Evangelical Fellowship of Canada, represents a group that opposes the decriminalization of prostitution, saying it will lead to increased human trafficking and victimization of people.

He said his group has the ear of the Harper government.

"Yes, there have been conversations with the Justice Department and with others in the government."

The Ontario Appeal Court not only struck down the bawdy house law, but also modified a law against living on the avails of the sex trade to specifically preclude exploitation.

The federal and Ontario governments appealed those two parts of the decision, arguing among other things that Ottawa was justified in the way it dealt with a "complex social problem."

The Ontario court decisions had been on hold pending the Supreme Court ruling.