An IRS tax lien is not automatically senior to a mortgage, and it is not automatically junior either; under federal law, the lien's priority against a mortgage generally turns on when each interest arose and was perfected, with the mortgage typically first in time prevailing over a later-filed federal tax lien. The familiar claim that "IRS liens beat mortgages" is an overgeneralization: federal law gives the tax lien a particular force against later purchasers and encumbrancers, but it does not leapfrog a mortgage that was already recorded and protected before the tax lien arose. The practical answer for a homeowner, buyer, lender, or title insurer is therefore a date-and-record question, not a status question. This answer addresses federal tax liens under the Internal Revenue Code and general mortgage-recording principles as of November 13, 2026; it cannot verify any particular taxpayer's account, a specific property's chain of title, or state-specific recording and foreclosure rules, none of which were supplied.
The Core Rule: First in Time, First in Right
The priority contest between a federal tax lien and a mortgage is governed principally by 26 U.S.C. § 6323 and the federal priority doctrine often called "first in time, first in right." Section 6323(a) provides that a federal tax lien is not valid against a "holder of any lien" until notice of the lien has been filed in the proper office. In other words, a mortgage holder who has perfected its interest — typically by recording in the county or state recording system, or by taking possession where applicable — before the IRS files its notice of federal tax lien has priority over the tax lien. A mortgage recorded or otherwise perfected after the NFTL is filed generally takes subject to the federal tax lien, even though the mortgage may be valid between borrower and lender.
Two distinct "firsts" matter, and confusing them causes much of the popular misunderstanding:
The assessment date and the lien's creation. Under § 6321, a federal tax lien arises when an assessment is made and the taxpayer neglects or refuses to pay after demand, and under § 6322 it continues until the liability is satisfied or becomes unenforceable. This is the moment the government's interest comes into existence. The NFTL filing date. Under § 6323(a), the government's lien is not valid against a qualifying mortgage holder until notice is filed. The filing is what makes the lien visible and effective against most competing interests.
The mortgage's own priority moment is the date it is recorded or otherwise perfected under applicable state law, not merely the date the borrower signed the promissory note. A mortgage executed before the tax lien but recorded after the NFTL can lose, which is why lenders and title companies insist on prompt recording.
Where the "IRS Wins" Reputation Comes From
The intuition that IRS liens are senior has real roots, but they are narrower than the folklore suggests.
Later mortgages lose. A mortgage recorded after the NFTL generally is junior. If the IRS later forecloses its lien, the junior mortgage holder's interest can be extinguished, though the holder may have redemption rights under § 7425 depending on the type of sale and notice. Buyers and refinancing lenders routinely encounter this when a taxpayer with an existing tax lien tries to take cash out through a new loan.
The tax lien attaches broadly. Under § 6321, the lien attaches to "all property and rights to property" belonging to the taxpayer, including real estate, and it follows the property into the hands of certain transferees. The breadth of the attachment can feel like superiority even where a recorded mortgage has priority, because the tax lien still encumbers whatever equity remains after the mortgage.
Federal foreclosure rules can affect junior parties. Section 7425 governs the effect of IRS sales and nonjudicial sales on junior liens, and § 7425(b) can discharge junior interests when notice requirements are met. That procedural reach is sometimes mistaken for substantive priority over all mortgages.
Superpriority exceptions exist in discrete areas. Section 6323(b) grants limited protection to certain purchasers and holders in specific contexts — for example, certain purchasers of motor vehicles, holders of possessory liens for repairs or storage under stated conditions, and certain casual purchasers — but these are narrow statutory carve-outs, not a general rule that tax liens outrank all mortgages. Readers should not generalize from those provisions.
What a Mortgage Holder Must Actually Establish
For a mortgage to beat an earlier-created federal tax lien, the mortgage holder typically needs to show it is a "holder of any lien" within § 6323(a) whose interest was perfected before the NFTL was filed. Three practical elements recur:
1: A valid mortgage interest under state law. The instrument must be properly executed, acknowledged, and delivered according to the recording statutes of the jurisdiction where the property sits. 2: Perfection through recording or its equivalent. Recording in the correct office, and in the correct county for the property, is the usual method. A mortgage that is unrecorded and unperfected may not qualify even if signed first. 3: Timing relative to the NFTL. The perfection must precede the filing of the notice. The IRS files NFTLs in designated offices; the exact place of filing for real property is governed by § 6323(f), which generally points to the office designated for real property recording under local law, with special rules in some states.
A purchase-money mortgage taken by a buyer at closing is a common battleground: if the NFTL is already on file, the new lender is generally junior, and title insurers will except the federal lien from coverage or require a payoff, subordination, or discharge before closing.
Refinances, Subordination, and the "Revival" Trap
Refinancing is where the first-in-time rule creates the most confusion for ordinary homeowners.
Straight refinance with no new money. A lender replacing an existing first mortgage may argue its priority relates back to the original mortgage's recording date, at least for the amount of the original principal being refinanced. The strength of that relation-back argument depends on state law and on the terms of the transaction; it is not automatic under federal law. Some jurisdictions protect the refinancing lender's priority to the extent of the old debt, while others treat the new instrument as a new lien. A lender that pays off a prior first mortgage and records a new one may still face a federal tax lien that was junior to the old mortgage but senior to the new recording — a subtle trap.
Cash-out refinance. Any increase in principal beyond the original debt is new money and is generally junior to an intervening tax lien, even if the refinancing lender keeps first position on the old balance.
Subordination agreements. The IRS can agree to subordinate a federal tax lien to a mortgage or other interest, typically through a formal subordination agreement or a discharge of property under § 6325. Such arrangements are negotiated case by case through IRS collection procedures; they are not a matter of right, and whether one is available depends on the taxpayer's circumstances and the IRS's administrative practice, which this answer cannot confirm for any taxpayer.
Discharge of specific property. Under § 6325(b), a taxpayer can apply to have property discharged from the federal tax lien, for example to facilitate a sale, with payment or substitution of value. This is an administrative route, not a priority rule, and it requires IRS approval and payment arrangements.
Recording Systems, Race Notice, and State Variation
Federal law supplies the priority framework, but the mortgage's "first" is measured by state recording law. States differ in whether they are race, notice, or race-notice jurisdictions, and those differences affect whether an unrecorded mortgage can defeat a later interest. For federal tax lien purposes, § 6323(a) is generally read to protect a mortgagee whose interest is perfected under local law before the NFTL is filed. Two consequences follow:
A recorded mortgage before the NFTL usually wins, subject to the exceptions above. An unrecorded mortgage before the NFTL is vulnerable, because perfection has not occurred and the government's filing may take precedence under § 6323(a) even though the borrower signed the mortgage earlier.
Practitioners also watch the "proper filing office" requirement closely. An NFTL filed in the wrong office may not be effective against a mortgage holder under § 6323(f), though such errors are factual questions that must be checked against the actual filing and the property's location.
What Happens in Foreclosure and Sale
Priority determines who gets paid in what order, but it also determines what survives a foreclosure sale.
Mortgage forecloses first. If the mortgage is senior and forecloses, the federal tax lien junior to it is generally extinguished as to the foreclosed property, subject to the notice rules of § 7425. The IRS must be joined or given notice in certain circumstances; failure to do so can leave the tax lien in place, which is why title companies insist on proper service and notice. After a senior mortgage foreclosure, the tax lien typically drops off the property but the taxpayer's personal liability for the tax remains.
IRS forecloses first. If the IRS forecloses its lien and the mortgage is junior, the mortgage holder may be named and its interest extinguished, with rights governed by § 7425 and any applicable redemption provisions. The mortgage holder's practical remedy is often to pay the tax or negotiate, not to rely on a priority it does not have.
Sale proceeds. Where both interests attach, the senior lien is paid first from the proceeds, up to its amount, and the junior interest takes what remains. A recorded senior mortgage ahead of the tax lien therefore reduces the government's recovery from the property, which is precisely why the government pays attention to recording dates in its collection work.
Practical Distinctions That Get Lost
Several related concepts are often collapsed into "seniority" and should be kept separate:
Validity versus priority. A federal tax lien is valid against the taxpayer from assessment; § 6323(a) addresses validity against third parties such as mortgage holders. A mortgage can be valid between borrower and lender yet lose priority to the government. Attachment versus priority. The tax lien attaches to the property and the taxpayer's equity; whether it is paid before or after the mortgage is a priority question. Lien versus levy. A levy under § 6331 reaches the taxpayer's property and rights to property, and it can affect accounts and receivables; it does not simply rewrite mortgage priority. Personal liability versus in rem liability. The tax debt follows the taxpayer personally; the lien encumbers property. A senior mortgage foreclosure can remove the lien from the property without eliminating the debt.
These distinctions matter because a homeowner facing an NFTL may hear "the IRS is first" as if it were a universal rule, when in fact the recorded first mortgage typically remains ahead and the tax lien sits behind it, encumbering only the equity.
Common Scenarios, Briefly
Mortgage recorded 2019; NFTL filed 2022. The mortgage is generally senior; the tax lien is junior and attaches to the equity. A sale pays the mortgage first.
NFTL filed 2019; mortgage recorded 2022. The mortgage is generally junior; a later IRS foreclosure could extinguish it, and a refinancing lender will typically require a payoff or subordination.
Mortgage signed 2021 but not recorded; NFTL filed 2022. Perfection did not precede the filing, so the mortgage holder's priority is weak and may fail under § 6323(a) depending on state law and the facts.
Refinance replacing an old first mortgage after an NFTL. Priority for the refinanced amount may relate back under state law, but new money is generally junior; the lender should not assume automatic first position.
Purchase at closing with an existing NFTL. The new purchase-money lender is generally junior to the filed lien unless the lien is paid, discharged, or subordinated; title insurers will require resolution.
FAQ
Does the IRS always come before a mortgage? No. A mortgage perfected before the NFTL is filed generally has priority under § 6323(a); the tax lien is junior and attaches to remaining equity.
Does the assessment date or the NFTL date control? The NFTL date generally controls as against mortgage holders under § 6323(a), though the lien arises at assessment under §§ 6321–6322 and the mortgage's perfection date is measured under state law.
Can a refinance keep the old mortgage's priority? Sometimes, to the extent of the old debt and depending on state law and the transaction; new money is generally junior to an intervening tax lien.
Does a senior mortgage foreclosure wipe out the tax lien? Generally as to the property, subject to § 7425 notice rules; the taxpayer's personal liability remains.
Can the IRS agree to be junior? Yes, through subordination or discharge arrangements under § 6325 in appropriate cases, but availability is case-specific and administrative.
What should a buyer or lender check? The recording dates, the NFTL filing and its office, the chain of title, and any state-specific rules; a title company or tax attorney should confirm the actual priority for a specific property.
Bottom Line
The seniority question is answered by a timeline, not a hierarchy: a mortgage perfected before the federal tax lien notice is filed generally outranks the IRS lien, while a mortgage taken afterward generally does not. The government's lien is powerful and broad, and it can survive certain transfers and foreclosure events in ways that surprise homeowners, but it does not automatically displace an earlier recorded mortgage. Anyone facing an actual NFTL, refinance, sale, or foreclosure should have the specific dates, recording offices, and state rules reviewed by a qualified tax attorney or real estate professional, because the general rule above cannot resolve an individual title situation without those facts. This is general educational information, not legal or tax advice; consult a licensed attorney or enrolled agent in the relevant jurisdiction for guidance on a specific matter.