On May 1, 1904, when the tax in question was assessed, the land was owned by the plaintiff subject to two mortgages given by some former owner. The tax was assessed to the plaintiff as the owner of the land, and although there was a lien upon the land the plaintiff was primarily liable for the tax. The lien on the land was simply security for its payment. As stated by Shaw, C. J. in Hayden v. Foster, 13 Pick. 492, 495, *367the purpose of giving such a lieu “ seems to have been to provide a further and additional security, in the form of a real pledge for the payment of taxes on real estate. It is a remedy super-added to those of demand, distress and imprisonment” and of action of contract.
At the time of the foreclosure the plaintiff was no longer the owner, having conveyed its interest to another corporation. Under the terms of the foreclosure sale the land was sold subject to the tax in question. It is to be taken that the price paid at this sale was not the value of the land, but the value less the tax. After the sale the purchaser had land upon which was a lien for the payment of this tax. If the plaintiff paid the tax, the lien would be discharged and the purchaser would hold the land free from the incumbrance, and in that way would get a greater estate in the land than that for which he paid. The plaintiff therefore is placed in a situation where it may be compelled to pay money, the result of which payment is to release the purchaser’s property from a valid incumbrance, and this too when to do so will give the purchaser something for which he has not paid. As between the plaintiff and the purchaser no duty rests upon the plaintiff to discharge that lien, but on the contrary that duty rests upon the purchaser. To compel the plaintiff to pay this tax is to compel it to pay twice, once when the property was sold, and once to the collector. This it should be relieved from.
The only question is as to the form of relief. In proceeding to collect by suit, the defendant Shaw, as collector of taxes, is doing only what he has the legal right to do. He is a public officer, the tax is valid, and it is important in the public interests that taxes should be speedily collected. Moreover in this Commonwealth it is the general rule that equity will not lie to restrain the collection of a tax. Greenhood v. MacDonald, 183 Mass. 342. He cannot be restrained in this suit. As to him the bill is to be dismissed with costs.
But there is no difficulty in granting relief as against the other defendants who were the purchasers of the land. The lien upon the land has not yet expired. Upon the payment of the tax by the plaintiff, which it offers in the bill to do, it should be subrogated to the claim of the collector, and the land should stand *368charged with the payment to the plaintiff of the amount for which there is now a lien upon it. The result is that as to Shaw the bill should be dismissed with costs, and as to the other defendants there is to be a decree for the plaintiff; and it is
So ordered.