Can the jeopardy of being judged be fought against in court?
<p>Can the right to take people to the court be itself subject to judicial challenge?</p>

<p>In other words, if someone attempts to sue you, would you ever be able to successfully argue in the court to prevent them from doing so? (Let's exclude the obvious cases where a person is declared vexations / abusing the process and is prohibited from filing lawsuits).</p>

<p>Will the answer change if "attempts to sue" is replaced with "attempts to prosecute" — in jurisdictions where the right to prosecute is not exclusive to the state i.e. private prosecutions are allowed? Can the jeopardy of being prosecuted be litigated against?</p>

<p>The right to sue seems fundamental and untouchable, but what are the doctrines behind this?</p>

<p>(If the question is too broad, let's assume common law / English-centric jurisdictions).</p>

<p>In some jurisdictions, California probably being the most well-known in the US, there are <a href="https://en.wikipedia.org/wiki/Strategic_lawsuit_against_public_participation" rel="noreferrer">Anti-SLAPP</a> (Strategic Lawsuit Against Public Participation) statutes, which allow a defendant to file an anti-SLAPP claim (for sake of clarity I'm going to keep calling that person the "defendant") when the plaintiff's suit appears to have been filed for the purpose of infringing upon the defendant's rights by forcing them to bear the costs of litigation or settle the claim in order to avoid them, and itself has little merit or the plaintiff clearly does not expect it to succeed.  In California, if the Anti-SLAPP claim succeeds and the plaintiff's claim is dismissed as a SLAPP, the defendant is normally awarded attorney's fees from the plaintiff.  The Anti-SLAPP claim also halts discovery in order to reduce the costs on the defendant, so in effect it allows a defendant to challenge the plaintiff's right to sue them on the particular issue before the defendant has to bear the majority of costs.</p>

<p>TL;DNR: YES! </p>

<p>A "motion to dismiss" a suit asks the Court do exactly what you say. It asks the Court to dismiss the suit as legally invalid, even if the facts alleged in the suit are correct. A motion to dismiss is usually filed in response to the initial complaint. A defendant can ask for dismissal on a variety of grounds. These range from, "this court doesn't have jurisdiction over me," to "you waited too long to file," to "you didn't state a legitimate legal basis for the suit." If the Court dismisses the suit, it can do so "with prejudice," meaning the case cannot be refiled. </p>

<p>A "motion for summary judgment" is related. The party that files for summary judgment says, "the outcome of this case is so obvious that we don't need a trial to declare me the winner." </p>

<p>If you want more information on these motions, the Findlaw articles on a good place to start:   </p>

<p><a href="https://litigation.findlaw.com/going-to-court/what-is-a-motion-to-dismiss.html" rel="noreferrer">https://litigation.findlaw.com/going-to-court/what-is-a-motion-to-dismiss.html</a></p>

<p><a href="https://litigation.findlaw.com/filing-a-lawsuit/what-is-summary-judgment.html" rel="noreferrer">https://litigation.findlaw.com/filing-a-lawsuit/what-is-summary-judgment.html</a></p>

<p>Based on the comments, it appears you are interested in a mechanism for preemptively declaring that your conduct is not wrongful without waiting for someone to bring charges or a lawsuit against you.</p>

<p>In most common-law jurisdictions, a litigant who learned that a prosecutor was preparing charges against him, or that someone else was preparing a lawsuit against him, would have the option of bringing an action for a declaratory judgment, which asks the court to examine the facts or the parties' relationship and actions to determine the legal consequences.</p>

<p>In New Zealand, for instance,</p>

<blockquote>
  <p>Declaratory judgments are available to make binding declarations of right
  .... The effect of a declaratory order is to the same effect as the like declaration in a judgment in an action. It is binding on the person making the application and on all persons on whom the summons has been served, and on all other persons who would have been bound by the said declaration if the proceedings wherein the declaration is made had been an action.</p>
  
  <p>The jurisdiction under the Declaratory Judgments Act enables anyone whose
  conduct or rights depend on the effect or meaning of an instrument, including an agreement, to obtain an authoritative ruling.</p>
</blockquote>

<p><a href="https://www.courtsofnz.govt.nz/cases/mandic-v-the-cornwall-park-trust-board-inc/@@images/fileDecision?r=102.573741602" rel="nofollow noreferrer"><em>Mandic and Dohnt v The Cornwall Park Trust Board (Inc)</em> [2011] NZSC 135 (11 November 2011)</a></p>

<p>The exact relief available through a declaratory judgment will vary from one jurisdiction to the next, but for illustration purposes, Party A might bring a declaratory-judgment action against Party B seeking a declaration that:</p>

<ul>
<li><p>Party B is in breach of their contract, and that Party A is therefore free to stop performing;</p></li>
<li><p>Party B's patent/trademark/copyright is not valid, and that Party A is therefore free to copy without infringing;</p></li>
<li><p>Party A's proposed course of conduct is not a violation of governmental Party B's criminal or administrative laws.</p></li>
</ul>

<p>Having obtained that judgment, Party A would be free to proceed, and a subsequent action by Party B would be barred as res judicata.</p>

<p>If what you're looking for is a mechanism to prevent a court from even allowing an opposing party to file the lawsuit or charges against you at all, there probably isn't any way to do that.</p>

<p>If you are thinking of an action that can be taken beforehand, a <a href="https://en.wikipedia.org/wiki/Declaratory_judgment" rel="nofollow noreferrer">declaratory judgement</a> might be what you are looking for. Taking the example from the article: If company A is producing something and company B thinks this is infringing on one of their patents, company A does not have to wait for B to sue them. Instead they can ask a court to declare that they are not infringing and thus prevent B from suing them. Of course to do so, A would have to present the same evidence that they would have needed to win if B actually had sued them, if not more.</p>

<p><strong>Currently, yes.</strong></p>

<p>In New Zealand, when a private prosecutor attempts to file charges against an alleged criminal (proposed defendant), they may be rejected by a judge (the defendant may not even be aware at all).</p>

<p>The prosecutor then attempts to challenge the rejection by way of judicial review in a higher court (a separate civil proceeding against the court that rejected charges). At this stage the proposed defendant may be ordered to join this proceeding as a party (even if they do not ask to) — as ruled in <a href="https://forms.justice.govt.nz/search/Documents/pdf/jdo/3f/alfresco/service/api/node/content/workspace/SpacesStore/1fbd8bd8-e71b-4246-94e1-b5c6f7ee57d2/1fbd8bd8-e71b-4246-94e1-b5c6f7ee57d2.pdf" rel="nofollow noreferrer">this judgment of 18 July 2019</a>. If joined, the defendant would effectively argue against the jeopardy of being prosecuted.</p>

<p>(The judgment is now pending application for leave to appeal to the Court of Appeal, so it is not totally impossible that this answer will change).</p>

court litigation prosecutorial-discretion