Senior IRS lien question in a foreclosure auction

If you win a foreclosure auction significantly above the mortgage amount but the property has a senior federal IRS tax lien filed before foreclosure, do the excess funds pay off that federal lien? $500K mortgage, $100K senior IRS lien, property value $900K (so has equity), $700k winning bid. This would be conducted at the county courthouse on a property foreclosed by the bank. Thanks