When you buy a house, you take out the first mortgage. This mortgage, recorded first, serves as the first lien on your property. Sometimes, you may need to take out a second mortgage on your home. This mortgage is then recorded second, turning into the second lien. Whether or not a lien is first or second depends on the date the lien was recorded. As such, priority follows the recording date. The priority of a lien decides which lien holders receive payment first following a foreclosure sale. Most of the time, the first mortgage holder gets all of the sale's proceeds, leaving little to nothing for second or third lien holders, also known as junior lien holders.