VANCOUVER - A B.C. judge has found a street patrol program funded by the City of Vancouver and a business-improvement group discriminated against homeless and drug users.

The B.C. Supreme Court judge made the finding as she overturned a decision by the province's Human Rights Tribunal that dismissed a complaint against the Downtown Ambassadors Program operated by the Downtown Business Improvement Association.

The complaint alleged that ambassadors actively dissuaded street people living in the downtown core from occupying public spaces, which disproportionately targeted aboriginals and people with addictions.

Judge Neena Sharma says the tribunal made an error of law, awarding costs against the city and the business association and sending the complaint back to be reconsidered by the tribunal.

Lawyer Jason Gratl, who represented the group Vancouver Area Network of Drug Users, says the ruling sets a strong precedent to guarantee the equal protection and treatment of homeless people.

The complaint dates back to a period when the program was running between 2000 and 2008 and culminated in a four-year investigation and legal battle that appeared to be over when the tribunal dismissed the case in 2012.