What happens to liens on a foreclosed property comes down to one thing: where each lien sits in the priority order relative to the lien being foreclosed. Liens recorded before it (senior liens) survive the sale and transfer to the new owner. Liens recorded after it (junior liens) are extinguished at the auction, though the underlying debt can still haunt the borrower. Property tax liens and federal tax liens follow their own rules on top of this baseline.
How Priority Decides What Survives
Every lien recorded against a property sits in a hierarchy, and that ranking is what controls the outcome at foreclosure. The baseline rule is “first in time, first in right”: the lien recorded earliest generally outranks everything filed after it.1Internal Revenue Service. CCA 200922049 – Priority of Federal Tax Lien A mortgage recorded in January outranks one recorded in March. A judgment lien filed after both mortgages sits behind them.
The big exception is unpaid property taxes, which in nearly every state carry super-priority and jump ahead of all other claims regardless of recording date. Some states grant a similar limited super-priority to homeowners association assessments. Everything else follows the recording order.
Once you know where each lien falls relative to the one being foreclosed, you know its fate.
Junior Liens Get Wiped Out at the Sale
A junior lien is any lien with lower priority than the one being foreclosed. When a first mortgage holder forecloses, the sale extinguishes every lien recorded afterward: second mortgages, home equity lines of credit, judgment liens, and most mechanic’s liens. The buyer takes the property free of those claims.
There is one important catch. Junior lienholders must actually receive notice of the foreclosure and be included as parties. If a junior lienholder was never notified, their lien can survive the sale even though it should have been wiped out. This is one of the most common title problems that surfaces after a foreclosure auction, because the foreclosing lender’s attorney may have missed a recorded lien during the title search.
The Debt Itself May Not Disappear
Extinguishing a lien removes the property as collateral. It does not erase the debt. A second mortgage lender whose lien was wiped out still holds an unsecured claim against the borrower, and in many states can go to court seeking a deficiency judgment for the remaining balance.
Whether that actually happens depends on state law. A number of states have anti-deficiency statutes that limit or prohibit lenders from pursuing borrowers for the shortfall. These protections vary widely. Some block deficiency judgments only after non-judicial foreclosures. Others restrict them to purchase-money loans on a borrower’s primary residence, leaving second mortgages, home equity lines, and investment properties fair game. A few prohibit deficiency judgments almost entirely.
Even where allowed, junior lienholders often don’t bother chasing a borrower who just lost a home. But a creditor who already took the trouble to get a judgment lien has shown willingness to use the courts.
Senior Liens Survive and Transfer to the Buyer
Liens with higher priority than the foreclosing lien survive the sale in full. The buyer at the auction takes the property subject to those existing obligations. This is where foreclosure-auction buyers get into trouble if they haven’t done their homework.
The classic scenario: a second mortgage holder forecloses while the first mortgage is still unpaid. The winning bidder inherits the entire first mortgage balance and has to either pay it off or keep making payments. Fall behind and the first mortgage lender can foreclose all over again. The same principle applies to any lien that outranks the foreclosing one, including property tax liens and federal tax liens filed before the foreclosing lien.
Because surviving senior liens reduce what a property is actually worth to a bidder, auctions run by junior lienholders tend to sell for much less. Anyone bidding needs the full picture of outstanding senior liens before raising a paddle.
Federal Tax Liens Follow Their Own Rules
Federal tax liens are governed by federal statutes that override some of the usual priority rules. When a taxpayer owes back taxes, the IRS lien attaches to everything they own.2Office of the Law Revision Counsel. 26 US Code 6321 – Lien for Taxes At foreclosure, what happens to that lien turns first on whether the IRS received proper notice.
The 25-Day Notice Requirement
In a non-judicial foreclosure, whoever is conducting the sale must send written notice to the IRS by registered or certified mail at least 25 days before the sale date. If the IRS lien was filed more than 30 days before the sale and the IRS does not get this notice, the sale happens subject to the federal tax lien, meaning the lien survives and the buyer inherits it.3Office of the Law Revision Counsel. 26 USC 7425 – Discharge of Liens When proper notice is given, the sale can extinguish the IRS lien under the same local-law rules that apply to other junior liens.
The IRS Can Buy the Property Back Within 120 Days
Even when a foreclosure sale properly extinguishes an IRS lien, the federal government gets a second chance. If the sale satisfied a lien senior to the federal tax lien, the IRS has 120 days from the sale date (or the state-law redemption period, whichever is longer) to redeem the property by paying off the winning bidder. The redemption price covers what the buyer paid at auction, 6% annual interest from the sale date, and any net expenses the buyer incurred on the property.4Office of the Law Revision Counsel. 28 US Code 2410 – Actions Affecting Property on Which United States Has Lien
For non-tax federal liens such as those tied to SBA loans or federal student loan judgments, the redemption window stretches to a full year rather than 120 days.5Office of the Law Revision Counsel. 28 USC 2410 – Actions Affecting Property on Which United States Has Lien During that window the government can essentially undo the purchase, so buyers at auctions involving federal liens need to plan around it.
Property Tax and HOA Super-Priority Liens
Property tax liens sit at the top of the priority ladder in virtually every state. Unpaid property taxes take precedence over first mortgages, federal tax liens, and every other encumbrance, regardless of recording dates. When any lienholder forecloses, unpaid property taxes survive the sale and become the new owner’s responsibility. The flip side: a taxing authority’s own foreclosure wipes out nearly everything beneath it, including first mortgages.
Homeowners association assessment liens occupy a middle ground. More than 20 states have adopted some form of HOA super-priority statute, typically giving the association a limited senior claim (often capped at around six months of unpaid regular assessments) that can jump ahead of even a first mortgage. In states without those statutes, HOA liens are ordinary junior liens that get wiped out when a senior lienholder forecloses. Whether an HOA lien survives a particular foreclosure depends entirely on the state.
The Homeowner’s Statutory Right of Redemption
Separate from the IRS redemption right, many states give the foreclosed homeowner a statutory window to reclaim the property after the sale by paying off the full debt plus costs and interest. The period ranges from a few weeks to over a year depending on the state, and some states don’t offer statutory redemption at all. During that window the foreclosure buyer effectively holds the property in limbo: they own it, but could lose it if the former homeowner comes up with the money. In states with longer redemption periods, bidders typically shave their offers to account for the uncertainty.
Tax Fallout for the Foreclosed Borrower
Foreclosure can create a separate problem for the borrower that has nothing to do with the property’s liens: a tax bill from the IRS. When a lender forgives all or part of a loan balance after foreclosure, the IRS generally treats the forgiven amount as ordinary income.6Office of the Law Revision Counsel. 26 US Code 61 – Gross Income Defined A borrower who owed $250,000 on a home that sold at foreclosure for $180,000 could face a $70,000 income addition on their return if the lender cancels the remaining balance. The lender reports any cancellation of $600 or more to the IRS.7Internal Revenue Service. Topic No. 432, Form 1099-A, Acquisition or Abandonment of Secured Property
Several exclusions can shrink or eliminate the hit. The most common are bankruptcy (a discharge under a Title 11 case) and insolvency, where the borrower’s total liabilities exceeded the fair market value of their assets just before the cancellation. The insolvency exclusion only covers the amount by which the borrower is insolvent, not the full forgiven balance. A separate exclusion for cancelled debt on a principal residence expired at the end of 2025, so borrowers facing foreclosure in 2026 can no longer rely on it unless the cancellation arrangement was documented in writing before January 1, 2026.8Office of the Law Revision Counsel. 26 USC 108 – Income From Discharge of Indebtedness
Whether the loan was recourse or nonrecourse also changes the calculation and can shift the tax bill by thousands of dollars, which is why anyone facing foreclosure should run the numbers with a tax professional before filing.9Internal Revenue Service. Publication 4681, Canceled Debts, Foreclosures, Repossessions, and Abandonments