If the property taken is claimed by any person other than the defendant or the defendant's agent, and such person shall make affidavit of such person's title thereto and right to the possession thereof, stating the grounds of such right and title, and shall serve the same upon the sheriff, the sheriff shall not be bound to keep the property or deliver it to the plaintiff, unless the plaintiff on demand shall indemnify the sheriff against such claim by an undertaking executed by two sureties in the amount of the value of the property as specified in the affidavit of the plaintiff. No claim to such property by any person other than the defendant or the defendant's agent shall be valid against the sheriff, unless made as aforesaid, and notwithstanding such claim, when so made, the sheriff may retain the property a reasonable time to demand such indemnity.
N.D.C.C. § 32-07-10