If the boundary line between any counties is in dispute and a court of competent jurisdiction decides that any certain territory was not situated within the county in which the assessment was made, the county commissioners of the county which erroneously entered such property for taxation and collected taxes thereon by reason of mistake of fact or such dispute as to the boundary line shall, within sixty days after the final determination of the action or litigation, refund to the persons entitled thereto, or to any person that shall have purchased at tax sale any such property, all taxes or money so paid by him, with interest at the rate specified in § 54-3-5.1 for any and all years when assessments of such property were made in the proper county; and the pro rata share of the money so refunded shall be charged to the state and each taxing district which may have assessed any part of such tax.
SDCL 10-18-13