The writ of prohibition may be issued by the supreme and district courts to an inferior tribunal, or to a corporation, board, or person in any case, if there is not a plain, speedy, and adequate remedy in the ordinary course of law. It is issued upon affidavit on the application of the person beneficially interested.
N.D.C.C. § 32-35-02