Other lienholders should be separated into two categories: senior lienholders and junior lienholders. These descriptions are always made relative to the loan being foreclosed.
The IRS might be a junior lienholder in relation to a first mortgage being foreclosed, because the IRS lien was filed after the mortgage. On the other hand, that same lien might be a senior lien if the second mortgage is being foreclosed because the lien might have been filed after the first mortgage but before the second mortgage.
Senior lienholders want to receive full payment plus all attorney’s fees, accrued interest, and costs of collection. They are in a position of supreme power when a junior mortgage or lien is being foreclosed because the senior lien will remain on the property.
Junior lienholders will almost always receive no money at all after a foreclosure. They might be paid later, even many years later, if the borrower recovers from his or her financial problems. As a result, junior lienholders are motivated to keep the borrower out of bankruptcy so the junior debt will not be obliterated forever.
Some states give junior lienholders the right to redeem the property after a foreclosure. Let us assume that Dwight owes 1st National $80,000 on a first mortgage. He also owes 2nd National $10,000 on a second mortgage. Suppose the house is realistically worth $150,000. 1st National forecloses, and you are the only bidder at the auction. You buy the house for $80,100 and receive the title to the real estate free of the 2nd National lien.
Because the house is worth so much more than the combined debts, 2nd National might want to redeem the property if state law allows that.
2nd National might be able to pay you $80,100 and force you to sell the house to it. 2nd National will then be able to sell the house for something close to its true value, recover its redemption price of $80,100, pay off its second mortgage of $10,000, and make a profit.
In the real world, this rarely happens, but it is always a possibility.