If an answer is made which raises a question as to a matter of fact essential to the determination of the motion and affecting the substantial rights of the parties and upon the supposed truth of which allegation the application for the writ is based, the court in its discretion may order the question to be tried before a jury, and may postpone the argument until such trial can be had and the verdict certified to the court. The question to be tried must be stated distinctly in the order for trial, and the county must be designated in which the same shall be had. The order also may direct the jury to assess any damages which the applicant may have sustained in case the jury finds for the applicant.
N.D.C.C. § 32-34-06