The alleged error of the court below is that it had no jurisdiction to render judgment for restitution of the money collected on the reversed judgment. This is put forth in different forms, but in no way variant in substance. The gist of the whole complaint is that the reversal by this court being for want of jurisdiction in the circuit court-such jurisdiction not affirmatively appearing-that court had no authority to act further in the matter than as directed by the mandate, and that that went only to the reversal of its judgment and the collection of the costs incurred in the appellate court. This position is supposed to be supported by those decisions whih h old that when a case is dismissed for want of jurisdiction in the circuit court to entertain the action or render the judgment entered the power of that court to award costs is gone. Mayor v. Cooper, 6 Wall. 247, 250; Hornthall v. Collector, 9 Wall. 560, 566; Railway Co. v. Swan, 111 U.S. 379, 387, 4 Sup. Ct. Rep. 510. But here the jurisdiction exercised by the court below was only to correct by its own order that which, according to the judgment of its appellate court, it had no authority to do in the first instance; and the power is inherent in every court, while the subject of controversy is in its custody, and the parties are before it, to undo what it had no authority to do originally, and in which it, therefore, acted erroneously, and to restore, so far as possible, the parties to their former position. Jurisdiction to correct what had been wrongfully done must remain with the court so long as the parties and the case are properly before it, either in the first instance or when remanded to it by an appellate tribunal. The right of restitution of what one has lost by the enforcement of a judgment subsequently reversed has been recognized in the law of England from a very early period, and the only question of discussion there has been as to the proceedings to enforce the restitution. Thus in Anon. 2 Salk. 588, it was held by HOLT, C. J., that 'where the plaintiff has execution, and the money is levied and paid, and that judgment is afterwards reversed, there, because it appears on the record that the money is paid, the party shall have restitution without a scire facias, and there is a certainty of what was lost; otherwise where it was levied but not paid; there must then be a scire facias suggesting the matter of fact, viz., the sum levied,' etc. The same doctrine has been fully recognized by this court in U.S. Bank v. Bank of Washington, 6 Pet. 8, 17. In that case the court, after observing that the party against whom an erroneous judgment has been enforced does not lose his remedy against the party to the judgment, said: 'On the reversal of the judgment the law raises an obligation in the party to the record, who has received the benefit of the erroneous judgment, to make restitution to the other party for what he has lost; and the mode of proceeding to effect this object must be regulated according to circumstances. Sometimes it is done by a writ of restitution, without a scire facias, when the record shows the money has been paid, and there is a certainty as to what has been lost. In other cases a scire facias may be necessary to ascertain what is to be restored, (2 Salk. 587, 588; Tidd, Pr. 936, 1137, 1138;) and, no doubt circumstances may exist where an action nay be sustained to recover back the money.' We are of opinion that the proceeding to enforce the restitution in the cases mentioned is under the control of the court, and that all needed inquiry can be had to guide its judgment in a summary proceeding, upon motion of the parties; the only requisite being that the opposite part shall be heard, so that in directing restitution no further wrong be committed. The restitution is not made to depend at all upon the question whether or not the court rendering the judgment reversed acted within or without its jurisdiction. In the case of Morris' Cotton, 8 Wall. 507, property on land was seized under the acts of 1861 and 1862, passed for suppression of the Rebellion, according to which the claimants were entitled to a trial by jury. Such trial was not allowed, but a decree forfeiting the property was passed by the court below. This was reversed by this court, which held that the district court had no jurisdiction to proceed in the case in the manner in which it did; and, although the proceeds of the sale of the property had been distributed, it directed in its decree of reversal that the court below should grant a new trial, and issue a writ for restitution of the proceeds to the registry of the court. In Ex parte Morris, 9 Wall.