OTTAWA -- The Supreme Court of Canada has highlighted the harms of over-policing on racial minorities in a ruling that set aside an Asian-Canadian man's convictions for possessing a gun, drugs and illicit cash.

Police had no reasonable cause to walk into a backyard at a Toronto housing complex and begin questioning 20-year-old Tom Le, the high court said in the 3-2 decision Friday.

Le was chatting in the yard with four young black men late one night in May 2012 when police officers showed up.

The officers were told by security guards who patrolled the housing co-operative that the place was a “problem address” over concerns about drug trafficking in the rear yard and that a suspect had recently been seen there.

Two officers entered the yard without consent or a judicial warrant, and began asking questions and requesting identification. A third officer patrolled the property's perimeter, then stepped over a low fence and told one man to keep his hands where he could see them.

An officer questioned the slightly built Le, demanded ID and asked about the contents of a satchel slung across his body.

After less than a minute, Le fled but he was soon tackled and apprehended a short distance away with the bag - containing a loaded handgun and a considerable amount of cash. Later, at the police station, Le handed police 13 grams of cocaine he was carrying.

At his trial, Le pleaded not guilty and argued the evidence should be excluded because police violated his constitutional rights to be free from arbitrary detention and unreasonable search.

The trial judge found that the police had legally detained Le, who went on to unsuccessfully challenge his conviction in the Ontario Court of Appeal. He then took his case to the Supreme Court.

In its decision, a majority of the high court said the actions of police that night seven years ago did amount to arbitrary detention and a serious violation of Le's rights - precisely the sort of police conduct the charter was intended to abolish. As a result, the evidence must be excluded.

The court cited recent studies of the common police practice known as carding - asking people who they are and demanding proof of their identities for no apparent reason.

“The impact of the over-policing of racial minorities and the carding of individuals within those communities without any reasonable suspicion of criminal activity is more than an inconvenience,” the decision said. “Carding takes a toll on a person's physical and mental health. It impacts their ability to pursue employment and education opportunities.”

The fact that racial minorities are routinely targeted, stopped and questioned by police is important social context in Le's case, the court said. Given that three officers entered the small private backyard without a warrant or permission to question five racial minorities, “these young men would have felt compelled to remain, answer and comply.”

It said the reputation of a community - or the frequency of police contact with its residents - does not in any way license police to enter a private home more readily or intrusively than they would in a community with higher fences or lower crime rates.

“Requiring the police to comply with the charter in all neighbourhoods and to respect the rights of all people upholds the rule of law, promotes public confidence in the police and provides safer communities,” Justices Russell Brown and Sheilah Martin wrote on behalf of the majority.

“The police will not be demoralized by this decision: they, better than anyone, understand that with extensive powers come great responsibilities.”

In their dissent, Justice Michael Moldaver and Chief Justice Richard Wagner said the police trespassed inadvertently in pursuing a legitimate investigation, and the charter breach stemming from the detention was “far from egregious.”

Reasonable and well-informed members of the public would consider a decision to exclude the evidence and exonerate someone “who was prepared to reach for a loaded weapon during a violent struggle with the police as not merely alarming, but intolerable,” Moldaver wrote.