Is there a defence of persecution by law?
<p><em>Justice</em> derives from <em>just</em>, what is <em>right</em> and <em>fair</em>. If you are guilty (as in, you've committed the offence not been judged) of an offence but your arrest/prosecution is unfair in its application can this be used as a defence in common law?</p>

<p>For example, imagine a police force is racist. They catch 20 burglars but 10 are white and 10 are black and they only prosecute the blacks. The blacks they have caught definitely committed the offence, but can they mount a defence based on unfair application of the law? (If it can be proved, of course) Other examples might be the prosecution of certain political or religious groups over others.</p>

<p>It seems to me that the principles and history of common law tends towards the removal of protected groups (e.g. aristocracy) over time (Magna Carta being a famous example) as its principles mean blatant inequalities cause tensions that are the resolved by the system, so changes occur because blatant unfair application of the law comes to a head, but has this resulted in a explicit principle of law that can be used or is it simply a case of taking your chances as history turns?</p>

<p>Any insight or help would be much appreciated.</p>

<p>Yes, there is. And it's used quite often.</p>

<p>For example, take unreasonable searches and seizures. Generally, if the police want to search someone's home, they normally have to obtain a warrant. In Canada, this can often be obtained by a Justice of the Peace. For some background, the <a href="http://laws-lois.justice.gc.ca/eng/Const/page-15.html" rel="nofollow noreferrer">Canadian Charter of Rights and Freedoms</a> says this:</p>

<blockquote>
  <p>Everyone has the right to be secure against unreasonable search or seizure.</p>
</blockquote>

<p>So what happens if someone was searched unreasonably?</p>

<p>In such cases, the court would throw out the evidence. If the police searched someones home, and found a firearm, but they didn't obtain a warrant (and they didn't provide justification for not having done so), the evidence would be thrown out of court. This is to make sure that the rights of the accused are kept, and that a fair trial is run.</p>

<p>In <a href="https://scc-csc.lexum.com/scc-csc/scc-csc/en/item/1508/index.do" rel="nofollow noreferrer"><em>R v Feeney [1997] 2 SCR 13</em></a>, the Supreme Court of Canada ruled that searching a house without a warrant constitutes an unreasonable search:</p>

<blockquote>
  <p>The police, during a murder investigation in 1991, entered the accused’s house (an equipment trailer) without permission.  When they received no answer at the door, they entered, roused the accused, touched his leg, ordered him to get up and took him to the front of the trailer for better lighting. ...</p>
  
  <p>Warrantless arrests in dwelling houses are in general prohibited.  Prior to such an arrest, the police officer must obtain judicial authorization for the arrest by obtaining a warrant to enter the dwelling house for the purpose of arrest.  Such a warrant will only be authorized if there are reasonable grounds for the arrest, and reasonable grounds to believe that the person will be found at the address named, thus providing individuals’ privacy interests in an arrest situation with the protection this Court has required with respect to searches and seizures.  Requiring a warrant prior to arrest avoids the ex post facto analysis of the reasonableness of an intrusion and invasive arrests without a basis of reasonable and probable grounds are prevented, rather than remedied after the fact.</p>
  
  <p>The protection of privacy does not end with a warrant; before forcibly entering a dwelling house to make an arrest with a warrant for an indictable offence, proper announcement must be made.</p>
</blockquote>

<p>When a request to exclude evidence is made, a <em>voir dire</em> will often be held, with the jury absent, to determine if the evidence is admissible into court.</p>

<p>To respond to your second paragraph, "targeting" of individuals can happen, but the justice system normally has a lot of integrity. That's not a result of the justice system - it's more psychological and political if anything. Courts are impartial, and look at all aspects of the alleged crime that they are trying. I'm not aware of any charges that have been biased, at least here in Canada. <strong>There are many steps to keep the justice system transparent and accountable</strong>, so if any incident like that were to occur, it would be extremely rare and dealt with promptly. </p>

<p>You may have fun reading <a href="https://www.thestar.com/news/gta/2017/01/13/judge-blasts-toronto-police-over-kafkaesque-traffic-stop.html" rel="nofollow noreferrer">Judge blasts Toronto police over 'Kafkaesque' traffic stop</a>:</p>

<blockquote>
  <p>A judge has acquitted a man of failing to provide a breath sample, rebuking Toronto police officers’ “aggressive” and “verbally abusive” conduct following a simple traffic stop, which included telling the man he needed to exit his car because he had come to a “high drug” area.</p>
  
  <p>Calling the encounter, which was captured on the police’s in-car camera system, “truly Kafkaesque,” Ontario Court Justice Sandra Bacchus was also critical of the officers for turning off their microphones during “key seconds.”</p>
  
  <p>Those seconds were just before officers decided to ask the man for a breath sample after repeatedly demanding he exit his vehicle, despite there being no valid reason to do so.</p>
</blockquote>

united-kingdom common-law