The record lienholder of any lien against property on which a lien has been filed under this chapter may pay the amount due on the lien at any time before a sale upon the foreclosure of the property. Upon payment of the lien by a lienholder, the holder of the lien shall assign it to the lienholder, and the lienholder then is entitled to all the rights which the person filing the lien had before the lien was paid.
N.D.C.C. § 35-13-06