Sullivan, J. '
This proceeding in error is brought to reverse a judgment recovered by the Anheuser-Busch Brewing Association against Frederick Hier in the district court of Saline county. The case is the outgrowth of other litigation, the history of which will be found in Anheuser-Busch Brewing Association v. Hier, 52 Nebr., 424, 55 Nebr., 557. The claim which accrued to Bennett Hier by reason of the association having executed its judgment against him, and having failed to make restitution when the judgment was reversed, has been assigned to Frederick Hier, who instituted the present action for its enforcement. The trial court, by a general finding, decided the issues of fact in favor of the defendant, and set off its judgment against the plaintiff’s claim on the theory that the two demands should be deemed compensated and reciprocally extinguished to the extent that they equaled each other. We are of opinion that the asserted right of set-off should have been denied. Upon every material point the findings of fact are supported by sufficient evidence, and must, therefore, be permitted to stand. Nevertheless, the judgment should have been in favor of the *321plaintiff instead of against him. While plaintiff has not distinctly characterized his cause of action, it would seem to be necessarily founded on contract. The execution of the decree against Bennett Hier was a lawful act, and no subsequent event could change its nature and make it wrongful. Field v. Anderson, 103 Ill., 403; Zimmerman v. Winterset Nat. Bank, 56 Ia., 133. The defendant having without any positively tortious act, obtained money which, in equity and good conscience, belonged to Bennett Hier, the law conclusively presumes a promise to make restitution. This constructive promise, springing from a legal duty, is the basis of plaintiff’s claim; and hence, under ordinary circumstances, there could be no doubt about defendant’s right to plead a set-off. But, upon general principles, it seems to us the law of set-off is not applicable to cases of this kind. The statutory provisions on the subject of set-off, and the equitable doctrine of compensation, were designed to effect, in one action, an adjustment of certain co-existing cross-demands. They were not intended to take away or restrict the power of the court to enforce restitution. Bennett Hier -was deprived of his money by an erroneous judgment of the distinct court. When that judgment was reversed, justice required that the wrong done by the court’s mistake should be righted. The court, without authority and in violation of law, took the money of one litigant and gave it to the other; and it can not now, with any show of judicial propriety or decency, permit a suit for restitution to result in a ratification of its own wrong. When a party applies to a court for restitution of what he has lost by an erroneous decision, his rights must, it would seem, be determined by the same principles whether the application be by motion or by petition. The requirements of justice must, of course, be the same in the' one case as in the other. Our attention has not been called to any case in which it is held that a court will aid a suitor in holding on to an advantage gained through its own misconstruction of the law; and we suppose no *322such case can be found in the books. The supreme court of North Carolina, having occasion to consider this question in Perry v. Tupper, 71 N. Car., 385, 387, used the following language: “The defendant having been put out of possession by an abuse of the process of the law, the law must be just to itself, as well as to the defendant, by restoring him to that of which he was wrongfully deprived. When the defendant is restored to the possession, then, and not until then, will the court be in condition in which it can honorably to itself pass upon the further rights of the parties.” And again, in Lytle v. Lytle, 94 N. Car., 522, 525, the court said: “It is well settled, that where a party is put out of the possession of land, in pursuance of a judgment or order improvidently granted, and the judgment is afterwards declared void or set aside, the court will promptly, as far as practicable, restore the party complaining to the possession of the land. The law forbids injustice, and it will not allow its process to work injury to a party against whom it goes by improvidence, mistake or abuse. It will always restore such party promptly, and place him as nearly as may be in the same plight and condition as he was before the process issued.”
Our conclusion is that the right to plead a set-off did not exist, and that the judgment should, therefore, be reversed.
■ Reversed and remanded.