There are two grounds upon which the judgment in this action should be sustained: First, a party’s right to follow property upon which he has a lien into the hands of one who has received the property with knowledge of that lien, and who is not a bona fidei purchaser for value; second, the well-recognized exception to the general rule that money paid under a mistake of law cannot be recovered back, namely; where the money is so paid to an. officer of the court,
*598We should premise by saying that there was no question of either statutory or common-law restitution in this case. .Consequently, the rejection of the record in the proceedings taken for restitution, as reported in Gillig v. George C. Treadwell Co. (151 N. Y. 552), was of no moment. That record, in our view of the case, was immaterial. In the legal sense, restitution is of something paid under an order or judgment of the court. The -payment here by the' sheriff was not made under any direct' order or judgment. It was made in the ordinary way, under process in legal proceedings, and it was so made by the sheriff in misconception of the attachment statute. That misconception was accentuated by erroneous decisions of the Special and General Terms. Those decisions, however, contain no direction to the sheriff. They merely denied the application for a direction. To avoid confusion, therefore, as to the precise point to be determined, we must eliminate all these decisions and treat the case simply as that of a sheriff paying money to a junior attachment and execution creditor which the law required him to pay to the senior. The law always required him to so pay to the senior. It required him to do so quite as much before as after the decision of the Court of Appeals. That decision did not make the law. It declared it as it was throughout. It was, consequently, the law throughout that, under the attachment statute, the levy upon property of the Treadwell Company made under the receiver’s attachment at once inured to the benefit of Gillig. Gillig thus acquired a lien which, as was said in Haebler v. Myers (132 N. Y. 368), existed by operation of law, and was “ property in the broad sense of that word.” We must keep quite clearly in mind the fact that the property upon which this lien thus existed was i/n custodia legis. That fact disposes entirely, of the point in support of which such cases as Patrick v. Metcalf (37 N. Y. 332); Butterworth v. Gould (41 id. 450); Cohen v. Hershfield (9 N. Y. Supp. 512), and Dumois v. Hill (2 App. Div. 528) are cited. These cases undoubtedly hold, and with clear reason, that, where two individual claimants' apply to the same debtor for payment, and the debtor pays the claimant not entitled thereto, the unsuccessful claimant cannot maintain an action ■for money had and received against the successful claimant .to recover the money so paid. But the sheriff here was not a debtor, and the attaching creditors asserted no opposing claim against him. He was *599a public officer, the executive arm of the court, holding property which was in the custody of the law. He could exercise no discretion as to his duty, no choice as to the claimants. He was simply bound to follow the statute. When he failed to do so, and, in violation of his statutory duty, paid to one party money which the law required him to pay to another, such payment discharged no obligation, either personal or official. His act was nothing more nor less than an illegal withdrawal of property in custodia legis through his ignorant mistake of the law’s requirement. The payment thus illegally made foreclosed no one. It was subject to the legal rights of the party entitled to the money. That party’s lien followed the payment and attached to the money in the defendant’s hands. It is quite clear, therefore, that the plaintiff, as a party so entitled to the money, may compel, not strictly restitution, hut restoration. He is not limited to an action against the official who misapplied the property. Having a lien thereupon, he may follow and recover it or its proceeds, certainly from one who received it or its proceeds without consideration and with full notice of the true ownership.
The plaintiff’s right to recover upon the second proposition aboVe stated is equally clear. A plain intimation to this effect was given by the Court of Appeals in deciding that a case for restitution under section 1323 of the Code of Civil Procedure had not been made out. (Gillig v. George C. Treadwell Company, 151 N. Y. 556.) Upon this intimation the plaintiff applied in this department for án order requiring the receiver to pay over the money to him ; but decision upon the application was, to quote- the language of the order, “ withheld,” and, instead of granting the relief asked, the court gave Gillig leave to bring this action. We think the court might well have afforded the plaintiff the summary relief which he asked, and, there being no dispute about the facts, the delay and expense of an action seem to have been unnecessary. The rule that money paid under a mistake of law cannot ordinarily be recovered back is entirely inapplicable to the present state of facts. This action is not against the sheriff, nor is it brought in the right of the sheriff. It is brought in the plaintiff’s own right to recover money, to which he is entitled, from one who lias possession of it without right. But even if the money had been paid by the sheriff to Gillig, and the latter, under a misconception of his legal rights under *600the statute, had paid it over to the receiver, an action to recover it back would lie, for the general rule is subject to the limitation that money paid under a mistake of law to an officer of the court can be recovered. In Ex parte James (9 L. R. [Ch. App. Cas.] 609) Lord Justice James applied this limitation to a trustee in bankruptcy with the observation that the general rule “ must not be pressed too far.” There a creditor had received money to which he w;as actually entitled under an execution sale against the bankrupt. He paid this money over to the trustee under the mistaken supposition that the latter was entitled thereto as matter of law. “ I am of opinion,” said Lord Justice James, “that a trustee in bankruptcy is an officer of the court. He has inquisitorial powers given him by the court, and the court regards him as its officer, and he is to hold money in his hands upon trust . for its equitable distribution among the creditors. The court then, finding that he has in his hands money which in equity belongs to some one else, ought to set an example to the world by paying it to the person really entitled to it. In my opinion the Court of Bankruptcy ought to be as honest as other people.” This decision was followed in Ex parte Simmonds (L. R. [16 Q. B.] 308), where Lord Esher observed that, although the court will in general permit an individual litigant to do a “ shabby thing,” namely, to keep the money thus acquired, it will not allow its own officer to do this. “ It will,” said this learned judge, “ direct its officer to do that which any high-minded man would do, viz., not to take advantage of the mistake of law. This rule is not confined to the Court of Bankruptcy. If money had by a mistake of law come into the hands of an officer of a court of common law the court would order Mm to repay it as soon as the mistake was discovered.” ' The • doctrine of these cases commends itself to both reason and justice.
In quoting with approval the expressions óf these learned English judges, we mean no reflection, even indirectly, upon the receiver or his learned counsel. Indeed, the diligence and tenacity of these gentlemen, in the pursuit of property for the benefit of the trust estate represented by them, are commendable. It would, however, be a reproach upon the administration of justice should the court, when the question is squarely before it, hesitate to admonish its officer to desist from further efforts to augment his trust estate at *601the expense of one who is clearly entitled to the money which that officer holds.
We think, therefore, that the direction below was right and that the judgment appealed from should be affirmed, with costs.
Williams and Patterson, JJ., concurred; Van Brunt, P. J., and Rumsey, J., concurred in result upon second ground stated in opinion.
Judgment affirmed, with costs.