delivered the opinion of the court:
This case is one of a class of cases arising out of the sale of liquor by a white man to an Indian citizen of the State and of the United States, to whom an allotment of land had been made in Wisconsin. The action is for the recovery of the amount óf a fine paid by plaintiff after a plea of guilty had been entered by him on an indictment charging the sale and imposed by the District Court of the United States for the Western District of Wisconsin. The demurrer of defendants alleged that the averments of the petition did not state facts sufficient to constitute a cause of action. Because *7.of the admissions of the pleading the demurrer was overruled. Subsequently the pleadings were amended and requests for findings of fact made by the parties. The cause having been heard, this court dismissed the petition.
The questions are again presented on the plaintiff’s motion to set aside the judgment and to grant a new trial and to enter judgment for the recovery of the fine in his favor.
By an act approved February 8,1887,24 Stat.L., 388, Congress provided for the allotment of lands in severalty to Indians on the various reservations and to extend the protection of the laws over Indians. The act made every Indian (situated as therein referred to), after the allotment, a citizen of the United States and of the State where the allotment became operative, entitled to all the rights, privileges, and immunities of other citizens and to the equal protection of State laws. Later, by an act approved January 30, 1897, 29 Stat. L., 506, the sale of any ardent or intoxicating liquor to any Indian to whom an allotment of land had been made while the title to the land was held in trust by the Government for any Indian ward was prohibited and made punishable by fine and imprisonment. Soon after the passage of this allotment act the courts of the United States, where allottee Indians were found, took cognizance of sales of liquor to them as a violation of the Federal law, and indictments were found against persons charged with violating the terms of the’ act prohibiting such sales. Meantime one Farrell was convicted of selling spirituous liquors in South Dakota to a mixed blood Indian Sioux, who was alleged to have been in charge of an Indian agent of the United States, and the Court of Appeals for the Eighth Circuit, affirming the judgment of conviction, decided that under the power to regulate commerce with the Indian tribes Congress had authority to pass the act under which the iiidictment was framed. Farrell v. United States, 110 Fed. Rep., 942.. Later, the contention was made in the Supreme Court of the United States that the act of 1897 was unconstitutional as applied to the sale of liquor to an Indian who had received his allotment of land under the act of 1887, ante. The appellate court held that Congress had renounced its constitutional power to regulate the traffic in intoxicating liquors to Indian *8allottees while the United States held title to their lands in trust. This reversed the decision of the Circuit Court of Appeals on the theory that there could be no divided authority over the property of the Indians; that the power to punish for the sale of liquor to an Indian implied equal power to punish the sale by an Indian, and that subjection to both State and National law conflicted, inasmuch as two sovereignties could not create independent duties and compel obedience to each at one and the same time. Matter of Heff, 197 U. S., 488.
Plaintiff is a resident and citizen of Wisconsin, and by the plea of guilty to the indictment against him charging the sale of spirituous liquors to a Chippewa who was then in charge of an Indian agent, he received a sentence of the District Court in Wisconsin to be imprisoned and pay a fine. It is alleged in the petition by plaintiff that he was under such duress that he was compelled to pay the amount of the fine imposed to avoid imprisonment. Further, that the court was without jurisdiction, for the reason that the Chippewa to whom the liquor was sold was not at the time of the sale under the charge of an Indian agent, and that prior to the sale the Chippewa had received his allotment of land in severalty from the reservation belonging to the tribe of Chippewas, with all the rights and privileges of a citizen of the United States and also of the State of Wisconsin.
The material thing first before this court is the matter of jurisdiction of the court imposing the sentence and the right of the plaintiff now to collaterally attack the judgment. On this point the authorities are conflicting. The court will not undertake to review them all. A few leading cases will be noted for a better understanding of the conflicting authorities and for a clearer view of the issues.
Early in the history of the country Chief Justice Marshall, in Kempe’s Lessee v. Kennedy, 5 Cranch, 173, declared that the courts of the United States are all of limited jurisdiction and that their proceedings are erroneous unless the jurisdiction be not shown upon them, and judgments rendered in such cases might certainly be reversed, but that the Supreme Court was not prepared to say that such judgments were absolute nullities which might be totally disregarded.
*9In the case of Cuddy, 131 U. S., 280, it was said that the judgment being attacked collaterally on the record disclosing a case of contempt and not showing one beyond the jurisdiction of the court, it must be presumed, in the proceeding before the appellate court, that the evidence made a case within its jurisdiction to punish. The court added the statement that—
“ We do not mean to say that this presumption as to the jurisdiction of facts, about which the record is silent, may not be overcome by evidence. On the contrary, if the appellant had alleged such facts as indicated that the misbehavior with which he was charged was not such as under the Revised Statutes made him liable to fine or imprisonment, at the discretion of the court, he would have been entitled to the writ upon proving such facts to have been discharged.”
In Kilbourne v. Thompson, 103 U. S., 168, the court said that the tendency of modern decisions everywhere was to the doctrine that the jurisdiction of a court is always open to inquiry when the judgment is relied on in any other proceedings.
In Mayfield’s case, 141 U. S., 107, the court held that the facts stated on the trial were sufficient to show that the trial court had no jurisdiction of the subject matter and that the judgment was void.
In Wise v. Withers, 3 Cr. U. S., 337, the court declared that courts-martial had no jurisdiction over a justice of the peace, as a militiaman, and that it was a principle that a decision of such a tribunal in a case clearly without its jurisdiction could not protect officers who executed it. In this case a citizen of the United States was tried by a court-martial for refusing to enroll as a militiaman and was fined. He was permitted to show collaterally that he was not subject to militia duty, as the judgment was void.
In Rose v. Himely, 4 Cr., 341, it was said that the operation of every judgment must depend upon the power of the court to render that judgment.
In the case of Dow v. Johnson, 100 U. S., 158, the court declared that evidence was admissible to contradict the recital in the judgment that defendant was a citizen and resident of the State. In Thompson v. Tolmi, 2 Pet., 163, the *10court said that if there was a total want of jurisdiction the proceedings were void and might be rejected when collaterally drawn in question. In Ex parte Neilson, 131 U. S., 176, it was said that if the court rendering a judgment had not jurisdiction either because the proceedings or the law under which the proceedings were taken were unconstitutional, or for any other reason the judgment was void, it might be questioned collaterally. In the case of Voorhees, 10 Pet., 475, the court said that the line which separates error in judgment from the usurpation of power is very definite and precisely that which denotes cases where a judgment is reversible only by an appellate court, or declared a nullity collaterally when offered in evidence. In the case of Williamson v. Berry, 8 How., 541, it was said that the principle that a record can not be impeached by pleading is not applicable where there is want of jurisdiction; that the want of it makes a record utterly void for any purpose; that the power of the court was of necessity examinable to a certain extent by that tribunal compelled to decide whether its sentence had changed the right of property. In the case of Scott v. McNeal, 154 U. S., 34, it was said that the appointment of an administrator for a person supposed to be deceased, but in fact living, is absolutely void and may be shown to be by evidence aliunde.
Every presumption exists in all cases in favor of the regularity of judicial proceedings and that jurisdiction over the subject matter and parties has been rightfully acquired and exercised. White v. Crow, 110 U. S., 188. But in Evers v. Watson, 156 U. S., 531, the court in recognizing presumptions in favor of regularity assumed that what was done in that case might be attacked collaterally — the burden being put upon plaintiffs to show that the decree mentioned there was void. The court declared that the holding must not be understood that if jurisdiction had not been apparent upon the record advantage could be taken of it after a final decree in a collateral proceeding. A number of cases were cited showing that the courts of the United States, though of limited were not of inferior jurisdiction; and that if jurisdiction were not alleged in the pleadings their judgments *11and decrees were erroneous and might be reversed for that cause, but that they were not absolute nullities, and that a decree while it remained unreversed was a valid bar to the suit there under consideration.
On the other hand it has been held that whether a ruling be right or wrong as a judicial act done in the exercise of a jurisdiction conferred by law, even if erroneous, it is not void or open to collateral attack but subject only to correction in an appropriate appellate proceeding. Chesapeake & Ohio R. R. Co. v. McCabe, 213 U. S., 207; In re Metropolitan Trust Co., 218 U. S., 312. Like any other ruling in the progress of a case, it was said in Ex parte Roe, 234 U. S., 70, that such ruling would be regularly subject to appellate review after final judgment. Where the action is one at law the review must be had by a writ of error. Missouri Pacific Ry. Co. v. Fitzgerald, 160 U. S., 582.
In the Matter of Heff, 197 U. S., 488, it was shown that a conviction had been had against him for selling liquor to an Indian who had received his allotment and a patent for land under the act of February 8, 1887, supra. There was no suggestion in the case of a violation of the internal-revenue laws, but the conviction was sought to be upheld under the act of 1897, supra, as a mere statute of police regulation. The facts and circumstances in the case were practically the same as in the case at bar. Hell’s contention was that the act of 1897 was unconstitutional as applied to the sales of liquor to an Indian who had received an allotment and patent of land. It was held that the Indian was no longer a ward of the Government, but a citizen of the United States and of the State in which he resided, and as such not within the reach of Indian police regulations on the part of Congress. Under the authority of The Slaughter House cases, 16 Wall., 36, it was likewise held that as a matter of constitutional law an Indian was entitled to the benefit of and to be subject to the laws of the State in which he resided the moment he became a citizen of the United States; and that by virtue of the fourteenth amendment a citizen of the United States became by residence therein a citizen of the State entitled to all the rights, privileges, and immunities of other citizens *12of the State, and to the equal protection of the State laws. There was but one dissent to the proposition that when our Government granting privileges of citizenship to an Indian it placed him outside the reach of police regulations on the part of Congress, and that the emancipation from Federal control thus created could not be set aside at the instance of our Government without the consent “of the individual Indian and the State.” That case reached the appellate court on habeas corpus proceedings and was the declared rule when the case at bar was presented to this court on demurrer unless overruled In re Lincoln, 202 U. S., 178. The court said in the Lincoln case that conceding full jurisdiction of the appellate court in habeas corpus it was a question in every case whether the exercise of that jurisdiction became appropriate; that the ordinary procedure for correction of errors in criminal cases by writ of error should be pursued unless special circumstances called for a departure. Accordingly, it was held that on a petition for the writ of habeas corpus by one convicted in a district court of the United States for selling liquor to Indians in Indian country, the party should have proceeded by writ of error as the customary mode of procedure. The writ of habeas corpus was denied the last petitioner upon the assumption that trial courts would follow the rulings of the appellate court and if not the proper appellate power would correct the error, and upon the further ground that it would be a grievous misuse of the time of the appellate tribunal to commit every petty criminal case to be brought directly to the court of last resort upon such a writ.
In Toy Toy v. Hopkins, 212 U. S., 542, the Supreme Court said that if the facts were, as stated in that case, nevertheless the circuit court was authorized to hear and pass upon such facts as made out a want of jurisdiction under the applicable statutes and its decision was open to review in the appellate court by writ of error, but the judgment could not be attacked collaterally as absolutely void. The court then suggested that the explanation of the Heft' case given in Lincoln’s case deprived the case of Heft of any weight.
*13In United States v. Celestine, 215 U. S., 278, the Supreme Court distinguished the case of Heft' from that of Celestine. But in the case of the latter it was declared that in- the absence of a subjection in terms of the individual Indian to state laws and denial of further jurisdiction over him by the United States a statute will not be construed as a renunciation of jurisdiction by the United States of crimes committed by Indians against Indians on Indian reservations. In United States v. Sutton, 215 U. S., 291, Celestine’s case was followed with the further statement that under the Washington enabling act jurisdiction and control over Indian lands remains in the United States, and Congress have power to prohibit and punish the introduction of liquor therein; and, further, that the limits of an Indian reservation are not changed by allotments during the trust period, and where the lands alloted are subject to restrictions the prohibition against liquor continues to be effective. The ruling went to the extent that the mere grant of citizenship did not make it clear that Congress intended to renounce entirely its jurisdiction over the individual members of the dependent race. These last two cases of themselves seem to have conferred a power on the court to proceed so far in as the matter of citizenship was involved.
Under the last utterances bearing upon the question no proof can be admitted in this collateral proceeding to show that the sentence was illegal. The indictment against plaintiff was obtained under the act of 1897, as in Heff’s case. By pleading guilty, plaintiff was chargeable with laches in not offering proof to the trial court of the facts now set forth in the petition in this case. True, neither laches nor consent could have conferred jurisdiction where there was no offense; and the district court that may have erroneously taken jurisdiction as in Heff’s case was more responsible for the voluntary plea than the indicted person if Heff’s case governed. But according to the latest decisions of the appellate court plaintiff could only get relief by direct proceedings for that purpose. He cut himself off from any direct proceeding by pleading guilty and receiving his punishment. As it is now definitely settled that there can be no collateral attack on *14the judgment there is nothing for this court to do but to dismiss the petition.
Refinements predicated upon strict rules of administrative and judicial regularity have been brushed aside by our highest court in numerous cases for the benefit of the citizen from whom money has been taken and wrongfully put into the Public Treasury. Thus, a party who obtains from a disbursing officer public moneys without right thereto and with full knowledge that they are such becomes indebted to the United States. Bayne v. United States, 93 U. S., 642. In general, assumpsit will lie whenever the defendant has received money which is the property of the plaintiff and which the defendant is obliged by natural justice and equity to refund. Moses v. Macfarlan, 2 Burr., 1012. Illegal tax exactions may under certain circumstances be recovered, as in De Lima v. Bidwell, 182 U. S. 1; Dooley v. United States, ibid, 222. Restitution of property obtained under an illegal contract, because ultra vires, can not be adjudged by force of the illegal contract, but the obligation to do justice rests upon all persons, natural and artificial, if one obtains the money or property of others without authority of law. Independently of express contract, the law compels restitution or compensation. Earling v. Emigh et al., 218 U. S., 27.
The motion to prove facts tending to show that, the district court in Wisconsin was without jurisdiction to impose a fine on the plaintiff for selling liquor to an Indian in charge of an Indian agent can not be allowed because the admission of such testimony would expose the judgment, presumptively correct, to collateral attack. That is reason enough to dismiss the petition, as we are precluded by the decisions of the appellate court in that regard from admitting such proof. Again, if the grant of citizenship to the Indian to whom the liquor was sold did not make the allottee amenable exclusively to State laws in that regard, a final reason exists for dismissing "the case.
The petition is, therefore, dismissed.
Campbell, Chief Justice, concurs in the result.