The tax imposed under this article shall be fully paid and have priority out of the proceeds of any judicial sale of real estate before any other obligation, claim, lien, judgment, estate or costs of the sale and of the writ upon which the sale is made. The sheriff or other officer conducting the sale shall pay the tax imposed under this article out of the first moneys paid to the sheriff or officer in connection therewith. If the proceeds of the sale are insufficient to pay the entire tax imposed under this article, the purchaser shall be liable for the remaining tax.
72 P.S. § 8107-D