If the property taken be claimed by any other person than the defendant or his agent, and such person shall make affidavit of his title thereto and right to the possession thereof, stating the grounds of such right and title, and 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 of him or his agent, shall indemnify the sheriff against such claim by an undertaking or deposit, in amount and sufficiency as required in the original affidavit for the delivery. No claim to such property by any other person than the defendant or his agent shall be valid against the sheriff, unless made as aforesaid; and notwithstanding such claim, when so made, he may retain the property a reasonable time to demand such indemnity.
SDCL 21-15-15