# Lien

> A lien is a legal claim against property that secures a debt. How mortgage, tax and judgment liens work, why priority matters and how a lien is released.

URL: https://mortgage-math-us.com/glossary/lien/  
Last reviewed: 2026-10-29 · By the MortgageMath US Editorial team

## Quick answer

**A lien** is a legal claim against a property that secures a debt, giving the creditor the right to be paid from the property — through foreclosure or when it’s sold — if the debt isn’t repaid. Your mortgage or [deed of trust](https://mortgage-math-us.com/glossary/deed-of-trust/) creates a voluntary lien; others, such as tax or court-judgment liens, can attach without your agreement.

## Lien priority

Liens are generally paid in order of priority, which usually follows the order they were recorded — that is why a home equity loan or HELOC taken after your mortgage is called a second or junior lien. Property tax liens are a common exception and typically jump ahead of mortgages.

> **Worked example: Who gets paid in a foreclosure sale**
>
> A home sells for $300,000 (before costs) with a $280,000 first mortgage and a $40,000 second. The first lender is paid $280,000 in full; the second receives only $20,000 of the $40,000 it’s owed.

Priority is also why refinancing a first mortgage while keeping a HELOC needs the HELOC lender to sign a subordination agreement.

## Clearing a lien

Before closing, a title search looks for liens on the property, and existing ones must be paid off or released for the buyer to get clear title — which [title insurance](https://mortgage-math-us.com/glossary/title-insurance/) backs up. When you pay off a loan, the lender should record a release (a satisfaction of mortgage or a reconveyance); check the county records. The [home equity risks guide](https://mortgage-math-us.com/home-equity/home-equity-risks/) explains what a second lien adds.

## Related terms

- [Foreclosure](https://mortgage-math-us.com/glossary/foreclosure/) and [home equity loan](https://mortgage-math-us.com/glossary/home-equity-loan/)

## Sources

- [CFPB: What is a second mortgage loan or “junior-lien”?](https://www.consumerfinance.gov/ask-cfpb/what-is-a-second-mortgage-loan-or-junior-lien-en-105/)
- [CFPB: What is a security interest?](https://www.consumerfinance.gov/ask-cfpb/my-mortgage-closing-forms-mention-a-security-interest-what-is-a-security-interest-en-1999/)

_General information, not financial advice._
