No sale shall be valid where the taxes and interest have been paid prior to said advertisement, or where the taxes, interest, and costs have been paid after advertisement and before sale, or when such taxes are not legally due and collectible. Every such sale shall discharge the lien of every obligation, claim, lien or estate with which said property may have or shall become charged, or for which it may become liable, except no such sale shall discharge the lien of any ground rent, municipal claim or tax remaining unpaid or mortgage which shall have been recorded before such taxes became liens, by return and docketing, as herein provided, and which is or shall be prior to all other liens, except other mortgages, ground rents, municipal claims, and/or other taxes. Any real estate sold under this act may be redeemed by the owner, his heirs or legal representatives, or by any lien creditor, or his heirs, assigns or legal representatives, or by anyone interested in said real estate for the benefit of the owner thereof, at any time within two years after such sale, by the payment to the county treasurers of the full amount which the purchaser paid to said treasurer for taxes, interest, and costs and fifteen per centum of the amount of tax in addition thereto. In case the purchaser has paid any taxes of any kind whatsoever, assessed and levied against said property, the same shall be reimbursed to said purchaser before any redemption shall take effect. No sale of seated lands for taxes, under the provisions of this act, shall be prejudiced or defeated by proof that there was personal property to be found on the premises sufficient to pay the taxes assessed thereon, nor shall such sale be prejudiced by reason of the fact that such lands so assessed as seated lands were at the time unseated.
When any real estate is so sold, no lien whatsoever against such real estate shall be deemed to be discharged during the period for redemption; but if such real estate is not redeemed, then all liens against the same, except such liens as are hereinbefore specifically saved, shall be deemed to be discharged from the date that the right of redemption expired.
When any real estate is so redeemed by a lien creditor, or his heirs, assigns or legal representatives, or by any person interested for the benefit of the owner, the county treasurer shall issue to the person redeeming such real estate a certificate, stating the fact of such redemption, a brief description of the real estate redeemed, and the amount of the redemption money paid, which certificate may be entered in the office of the prothonotary of the county as a judgment against the owner of the real estate for the amount stated therein. The lien of any such judgment shall have priority over all other liens against such real estate except such liens as would not have been discharged had no redemption been made.
72 P.S. § 5971i