Foreclosure wipes out some liens on a property and leaves others attached, and the dividing line is priority. When a lienholder forecloses, the sale eliminates every lien ranked below the one being foreclosed and leaves every lien ranked above it in place. A handful of liens, chiefly property taxes and certain government and association claims, get special statutory protection and can survive even a first mortgage foreclosure.
Priority Decides What Survives
Liens on real property are ranked by the date they were recorded in the county land records. The lien recorded first has the highest priority; each one recorded later ranks below it. Lawyers call this “first in time, first in right.”1Internal Revenue Service. Office of Chief Counsel Memorandum 200922049
When a foreclosure sale happens, the proceeds pay lienholders in that same order. The senior lienholder is paid first, then the next in line, and so on until the money runs out. The lowest-ranking creditors may get nothing.
In a typical home purchase, the mortgage recorded at closing is the senior lien. A later home equity line, second mortgage, judgment lien from a lawsuit, or mechanic’s lien for unpaid work each slots in below it based on its recording date. Where a foreclosing lien sits in that stack is the single most important fact for predicting what survives the sale.
Junior Liens Get Wiped Out
When a senior lienholder forecloses, the sale extinguishes every lien ranked below it. If a first mortgage lender forecloses, second mortgages, home equity lines, judgment liens, and other later-recorded claims are stripped from the property’s title. The buyer at auction takes ownership free of those junior encumbrances.
This is not a bug; it’s how the system is designed. The senior lienholder’s rights were established first, and each junior creditor accepted a subordinate position when it extended credit. Every junior creditor is on legal notice that a senior foreclosure could eliminate its security interest at any time.
One critical detail catches borrowers by surprise. Wiping out the lien does not wipe out the debt. The junior creditor loses its claim against the property, but the borrower still owes the money. That remaining balance becomes unsecured, no different from a credit card balance, and the creditor can still sue for it and pursue a deficiency judgment.
Senior Liens Stay Attached
Foreclosure only works downward. If a junior lienholder forecloses, every lien ranked above it stays attached to the property. The buyer at auction takes title “subject to” those senior liens and becomes responsible for them.
This is where inexperienced auction buyers get hurt. If a second mortgage holder forecloses, the winning bidder inherits the first mortgage. Miss a payment on that senior loan and the first mortgage lender can foreclose all over again. Because the buyer has to absorb this obligation, properties sold in a junior lien foreclosure typically draw much lower bids than those sold in a senior lien foreclosure.
Junior lienholders know this, which is why they rarely foreclose unless the property carries enough equity to clear the senior debt and still leave meaningful recovery. A second mortgage holder gains nothing by forcing a sale on a property where the first mortgage balance already exceeds the property’s value.
Super-Priority Liens That Outrank Everything
Certain liens jump to the front of the line regardless of when they were recorded. These “super-priority” liens override the first-in-time rule by statute, and some of them can survive even a first mortgage foreclosure.
Property Tax Liens
The most powerful super-priority lien is the property tax lien. Unpaid property taxes create a lien that ranks ahead of every other claim on the property, including the first mortgage. Federal law explicitly recognizes this: even a filed federal tax lien is subordinate to state and local property tax liens that secure “a tax of general application levied by any taxing authority based upon the value of such property.”2Office of the Law Revision Counsel. 26 USC 6323 – Validity and Priority of Lien
A mortgage foreclosure does not eliminate a property tax lien. The new owner buys the property still owing those back taxes, and the taxing authority can eventually foreclose on its own if they go unpaid. That’s why mortgage lenders track tax payments so closely, and why most will pay delinquent taxes themselves and add the amount to the borrower’s loan balance rather than risk losing their position to a tax sale.
HOA and Condominium Assessment Liens
Roughly 20 states and the District of Columbia give homeowners’ association or condominium association liens a limited super-priority status. In those jurisdictions, unpaid assessments for a specified number of months can jump ahead of the first mortgage. The super-priority amount is typically capped at six to nine months of delinquent dues plus collection costs. Anything beyond that cap falls back to its normal junior position.
When an HOA forecloses its super-priority piece, the first mortgage lender can lose a portion of its security. That gives servicers a strong reason to watch HOA delinquencies and gives associations real leverage when collecting.
Municipal Utility Liens
Unpaid charges for water, sewer, and other public utility services furnished to a property can also carry super-priority status. Federal law protects these liens against even a filed federal tax lien when the charges are for “utilities or public services furnished to such property by the United States, a State or political subdivision thereof.”2Office of the Law Revision Counsel. 26 USC 6323 – Validity and Priority of Lien Whether a municipal utility lien outranks a mortgage depends on state law, but in many places these liens are enforceable the same way property tax liens are.
Federal Tax Liens Follow Their Own Rules
An IRS tax lien attaches to all property owned by a person who fails to pay federal taxes after the IRS demands payment.3Office of the Law Revision Counsel. 26 USC 6321 – Lien for Taxes How it interacts with a foreclosure depends on when it was filed and whether the foreclosing party gave the IRS proper notice.
When the IRS Lien Is Junior
If the IRS filed its lien after the foreclosing mortgage, it’s a junior lien and can be wiped out by the sale. But there’s a condition: the foreclosing party must give the IRS written notice at least 25 days before the sale, sent by certified mail or personal service, and the notice must specifically identify the tax lien.4Office of the Law Revision Counsel. 26 USC 7425 – Discharge of Liens A generic, blanket notice doesn’t count.
If the foreclosing creditor skips the notice or sends it late, the federal tax lien survives the sale entirely. The buyer ends up owning property still encumbered by the IRS lien, which is exactly the surprise that can turn an auction bargain into a financial disaster.5Internal Revenue Service. Internal Revenue Manual 5.12.4 – Judicial/Non-Judicial Foreclosures
The 120-Day IRS Redemption Right
Even when proper notice is given and the IRS lien is eliminated by the sale, the federal government keeps a 120-day right of redemption. During that window, the IRS can effectively repurchase the property by reimbursing the auction buyer, then resell it to recover both the payment and the tax debt. The redemption period is 120 days or whatever period state law allows for redemption, whichever is longer.4Office of the Law Revision Counsel. 26 USC 7425 – Discharge of Liens The point is to keep properties from being sold at steep discounts just to dodge the tax lien.
When the IRS Lien Is Senior
If the IRS filed its lien before the foreclosing creditor recorded its own, the federal tax lien is senior and survives the foreclosure. A junior lienholder’s sale does not disturb a senior federal tax lien.5Internal Revenue Service. Internal Revenue Manual 5.12.4 – Judicial/Non-Judicial Foreclosures One important qualifier: the federal tax lien is not valid against a prior-recorded mortgage holder or a mechanic’s lienor until the IRS files a Notice of Federal Tax Lien in the appropriate records.2Office of the Law Revision Counsel. 26 USC 6323 – Validity and Priority of Lien A mortgage recorded before the IRS files its notice generally has priority over the tax lien.
Notice Failures That Keep Liens Alive
A foreclosure only extinguishes junior liens if the foreclosing party follows proper procedure, and notice is the single most important requirement. Junior lienholders must be informed of the pending sale. In a judicial foreclosure, that usually means naming them as parties to the lawsuit. In a nonjudicial foreclosure, state law typically requires written notice sent to all recorded lienholders.
If a junior lienholder isn’t properly notified, its lien survives the sale and stays attached to the property in the new owner’s hands. This isn’t just theoretical. Title searches miss liens, addresses change, notices get sent to the wrong place. When it happens, the auction buyer may need to go back to court to sort it out, which can mean added legal costs or even a second sale.
For IRS liens the notice rules are stricter still. Adequate written notice, at least 25 days out, identifying the specific tax lien. Miss either requirement and the federal tax lien passes through the sale untouched.5Internal Revenue Service. Internal Revenue Manual 5.12.4 – Judicial/Non-Judicial Foreclosures
The Lien Can Be Gone While the Debt Remains
Foreclosure removes a junior lien from the property, but the underlying debt is a separate matter. Once the lien is extinguished, the creditor loses its security interest in the real estate, yet it can still sue the borrower personally, obtain a deficiency judgment, and collect through wage garnishment, bank levies, or liens on other property.
The same is true for the foreclosing lender. If the property sells at auction for less than the outstanding loan balance, that lender can pursue a deficiency judgment for the shortfall in many states.
Anti-Deficiency Protections
Not every state lets lenders chase borrowers for the difference. At least a dozen states restrict or prohibit deficiency judgments on residential mortgages, particularly for purchase money loans used to buy an owner-occupied home. The rules vary. Some states ban deficiency judgments outright for certain loan types. Others allow them but cap the recovery at the difference between the debt and the property’s fair market value rather than the auction price. Others prohibit deficiency judgments only when the foreclosure was nonjudicial. Where anti-deficiency protection applies, foreclosure effectively wipes out both the lien and the debt for the borrower.
How Redemption Periods Change the Picture
In every state, a homeowner has an equitable right to stop foreclosure before the sale by paying off the full debt, interest, and fees. That right can’t be waived even if the loan documents try to eliminate it.
A smaller number of states also grant a statutory right of redemption that allows the former owner to reclaim the property after the sale. Periods range from as short as 30 days to a year or more. Some states shorten the period when the sale covered the full debt and lengthen it when there was a deficiency; a few shorten it for abandoned properties.
Redemption matters for lien questions because it creates uncertainty for the auction buyer. During the redemption window, the former owner can reclaim the property by paying the sale price plus applicable fees. If they do, liens that were extinguished by the sale don’t come back, but the cloud over ownership during that period can depress auction prices and complicate title insurance. The federal 120-day IRS redemption right works on the same principle but runs on its own timeline, independent of state redemption rules.4Office of the Law Revision Counsel. 26 USC 7425 – Discharge of Liens