The Canadian Supreme Court has sided with advocates who claimed prostitution laws endangered workers in the sex industry.

The court voted 9-0 to strike down three anti-prostitution mandates: brothels, living on the avails of prostitution (making a financial living) and street soliciting.

Advocates who work in Canada's sex industry brought the suit after a number of prostitutes were killed by a serial killer in British Columbia.

The killer, a pig farmer, had lured several of the women and killed them. The advocates were seeking what they called "safer working conditions" and argued that brothels offer protection.

They claimed the laws forced prostitutes out into the street, and essentially made them work and live as homeless people.

The court agreed with them, but the changes won't go into effect for one year, per Canadian law, to give Parliament a change to make new legislation that would address the changes.

Prostitution itself is not illegal in Canada, but prior to these rulings, many of the activities associated with it were prosecuted as criminal offenses.