When any past due or delinquent tax on land is paid by any occupant, tenant, or person with an interest in the land other than a lien, or a person acting on that person's behalf, which, by agreement or otherwise, ought to have been paid by the owner, lessor, or other party in interest, such occupant, tenant, or person may recover by action the amount which such owner, lessor, or party in interest ought to have paid, with interest thereon at the rate of 12 percent per annum, or may retain the same from any rent due or accruing from the person to such owner or lessor for land on which such tax is so paid. A person making a payment under this section may file with the county recorder or registrar of titles of the proper county a notice stating the amount and date of such payment, and stating the interest claimed in the land, with a description of the land against which the taxes were charged; and the same shall thereupon be a lien upon such land in favor of the person paying the same until the same is paid. The county recorder shall record such notice in the indices maintained by the county recorder. The registrar of titles shall record the notice on the certificate of title for the land. Upon the payment of any such lien, the person filing such notice shall satisfy the same of record.