The plaintiff may not obtain a deficiency judgment in a foreclosure of residential property with four or fewer units of up to forty contiguous acres [16.19 hectares] containing a residence occupied by the owner as a homestead. The plaintiff may obtain a deficiency judgment on agricultural land of more than forty acres [16.19 hectares] but solely for the difference between the amount of the debt and the fair market value of the land at the time of commencement of the action. The plaintiff may obtain a deficiency judgment in all other cases for the difference between the appraised value, as determined by a licensed appraiser appointed by the court at the request of the plaintiff, and the amount determined due. The cost of the appraisal is an allowable cost in the foreclosure action.
N.D.C.C. § 32-19-03