The opinion of the Court of Civil Appeals in this case is reported in 283 S. W. 244. The plaintiff in error, as plaintiff in this case, sought to recover as actual and special damages $32,000 and $20,000 exemplary damages against the defendants in error for trespass alleged to have been committed by them upon property belonging to plaintiff in error. A general demurrer was sustained to the petition by the trial court, and, an appeal having been taken and perfected, the Court of Civil Appeals affirmed the action of the district court. On account of the importance of the question involved, notwithstanding the opinion of the Court of Civil Appeals copies the material parts of the petition, and notwithstanding we have concluded that the Court of Civil Appeals did not err in affirming the judgment of the trial court, we here reproduce that part of the opinion of the Court of Civil Appeals which sets forth the petition, except as to formal parts, •to wit:
“Heretofore, to wit, on or about the 6th day of June, 1920, the plaintiff was the owner and in peaceable possession, of what is known as lot G of block 12 of Snyder subdivision of the city of Wichita Falls, Tex., and on or about said date the defendants, and each of them, unlawfully, wantonly, maliciously, and oppressedly dispossessed the plaintiff therefrom, and thereafter detained possession of said premises and the use thereof from him until on or about the 27th day of October, 1921, in the manner under circumstances and to the plaintiff’s injury and damage, as hereinafter is fully set forth.
“III. On or about said date of June 6, 1920, the plaintiff was engaged in constructing and erecting a building upon the premises above mentioned, to be used, when completed, the *156lower portion for merchandising purposes and the conduct of business, and the upper portion, or second story, when completed, to be used for dwelling and residential purposes. Sajid structure had proceeded to the point, -on said date, where the framework, wall, and structure for the roof and interior portions had been partially completed, but the roof had not been secured thereon, and the walls and openings therein had not been closed, although the material was on the ground therefor. Immediately adjoining the property of the plaintiff on either side, at said time, and for a long time prior thereto, there had been erected and in operation other buildings in which general merchandise, groceries, meats, drugs, and other businesses were conducted. On said date defendant Hines was the 'owner of a lot and parcel of property located within about 100 to 150 feet in the northerly direction along the same street, from the lot and premises of the plaintiff, upon which a residence occupied by the defendant Scott, who is a nephew of the defendant Hines, was and is located.
“On or about said date of June 6, 1920, the defendant Hines, at the instigation, and with the advice, counsel, procurement, and under the direction, of the defendant Scott, filed in the Seventy-Eighth district court in and for Wichita county, Tex., a petition for an injunction in a cause entitled H. B. Hines v. J. Caruthers, No. 3198B on the docket of said court, seeking to enjoin plaintiff in the construction and erection of the said building upon his said lot and premises, asserting therein that said structure was being erected in violation of an ordinance of the city of Wichita Falls, mentioned in said petition. On said date said honorable court, at the instance of the defendants, as aforesaid, entered a temporary injunction against the plaintiff therein, enjoining the further construction and erection of said building for use as a business building, and thereafter, on hearing the cause, on the 15th day of June, 1920, entered a final decree perpetually enjoining the plaintiff from further erection and construction of said building for use as a business building.
“Notwithstanding each and all of said proceedings were unlawfully and utterly void and without warrant in law, as hereinafter more fully set forth, the defendant, on or about the 12th day of August, 1920, wantonly and maliciously caused the plaintiff to be arrested and committed as for a ccmtempt of said unlawñil, illegal, and unwarranted proceedings, and the plaintiff was restrained of his liberty by the sheriff of Wichita county, Tex., under said proceedings until on or about the 27th day of October, A. D. 1921, when said proceedings 'and all of them were declared unlawful and void by the United States District Court for the Northern District of Texas, upon the application of plaintiff for discharge from said contempt and restraint and disobedience to said, injunction on habeas corpus proceedings in United States District Court. And plaintiff here now alleges that the said entire proceedings so wantonly and maliciously instigated by the defendants, as aforesaid, were and are utterly null, void, and without warrant in law, from tfieir inception.
“That during all of the time from and after the entrance of said temporary injunction on the 6th day of June; 1920, to the date of his discharge upon said application for writ of habeas corpus on the 27th day of October, 1921, the plaintiff, by reason of the malicious and wanton act of defendants, as aforesaid, was deprived ,of the use and possession and control of said premises, excepting said building was completed and the upper portion used for residential purposes.”
The plaintiff in error contends that, if the discharge of the plaintiff in error upon habeas corpus by the federal court, because of the invalidity of the proceedings in the state court, was within the jurisdiction of the federal court, then the alleged trespass was not justified, and the petition states a cause of action; while on the other hand, if the order of the federal court is void for want of jurisdiction, the alleged trespass was justified, and the action of the trial court in sustaining demurrer was correct. The disposition we shall make of this case does not require a discussion of any of the assignments of error, except the first,' which in effect challenges the correctness of the judgment of the Court of Civil Appeals in holding that the order of the United States District Court in a habeas corpus proceeding, wherein a jiidgment of the district court of Wichita county, Tex., was declared to be void, was void for want of jurisdiction, so that appellees were justified in their alleged wrongful trespass as set forth in the petition, and this assignment is submitted as a proposition. It will be noted that the petition states, in substance, that the state court attempted by injunction to inforce an ordinance of the city of Wichita Falls which was unconstitutional, and therefore void, and that plaintiff in error, having disobeyed the injunction thus bottomed, after due citation, was found guilty of contempt of court, and committed to jail. Whereupon he sued out a writ of habeas corpus in the United States District Court of the Northern District of Texas, where the judgment of the state court decreeing the enforcement of said alleged void ordinance and the process thereunder pertaining to his commitment were declared to be void, and plaintiff in error was released from restraint. The allegation of the plaintiff’s petition is that the federal-court under the habeas corpus proceeding declared the proceedings in the state court void, and the further allegation is made that such proceedings in the state court were void. The facts constituting the invalidity of the ordinance are not alleged, and we are not informed as to the evidence introduced before the federal court upon which it based its conclusion that the proceedings in the state court were void.
The office of a writ of habeas corpus is to give a person restrained of his liberty an immediate hearing, so that the legality of his detention may be inquired into and determined. It cannot be used to delay or postpone the trial or to change the forum or mode of trial. The sole function of the writ is to relieve from unlawful imprisonment, and it cannot properly be used for any other pur*157pose, generally speaking. It is an ex parte proceeding instituted by tbe person restrained of his liberty, and, therefore, no other person can be affected by the judgment rendered in such proceedings except the applicant, since it is a familiar principle of the fundamental law that no one is bound by judicial proceedings to which he is not a party except in the case of privies, as when a person holds under another the title to property or claims rights under another, where the title to the property or the rights have been adjudicated in a court of competent jurisdiction, where all parties in interest at the time were before the court. The writ of habeas corpus cannot be used to determine property rights. 29 0. J. par. 5, p. 12.
Where a person is in custody under process of the state court of original jurisdiction, and it is claimed that he is restrained of his liberty in violation of some provision of the Constitution of the United States, a federal court has jurisdiction to determine the legality of such detention, and the right to exercise the discretion whether it will discharge such person upon habeas corpus, and the exercise of that discretion cannot be questioned by any proceeding in. the state court. Upon the face of the petition, it clearly appears that the federal court had authority to issue the writ and make the order discharging the plaintiff in error from restraint, and this order it is our duty to respect, as we do. Compiled United States Statutes 1918, §§ 1279-1292. These statutes of the United States authorize the United States District Courts and the judges thereof to exercise concurrent jurisdiction with the state courts as to the issuance of writs of habeas corpus for the purpose of inquiring into the cause of the restraint of the liberty of any person in custody in violation of the Constitution of the United States. This discretion so exercised by the federal courts and the judges thereof cannot be inquired into, or challenged by, the state court when it has been exercised.
The general rule as indicated by the decisions of the Supreme Court of the United States, as well as by the authority of eminent law writers, is that the relief to be granted under the writs of habeas corpus will not be granted by a federal court, where the party’s remedy has not been exhausted in the state court. If a federal question is involved in the taking or enforcement of the judgment rendered in a state court, the party will be left such remedy as is provided by the local laws and under the supervision of the state court, subject to final appeal to the Supreme Cburt of the United States to determine such question. However, all of these authorities agree that, where the federal court has jurisdiction of the question, or has exercised the discretion to determine the question of jurisdiction in favor thereof, no state court can challenge the correctness of the judgment of the federal court in such proceeding. Any person who is a party to such a proceeding has a remedy by appeal to the Supreme Court of the United States to correct any error made by the district court or the Circuit Court of Appeals. 15 C. J. p. 1166, § 461; Blythe v. Hinckley, 173 U. S. 501, 19 S. Ct. 497, 43 L. Ed. 783. The same rule applies to a litigant in any proceeding in a state court wherein a federal question is involved. If the state court should make an error in the original trial, the aggrieved party has the right of appeal to the Court of Civil Appeals, and thence to the Supreme Court of this state, and still, if the relief to which he is entitled is not given him, he can go to the Supreme Court of the United States for it, where a federal question is involved. So in this matter the plaintiff in error, had he been denied enlargement by the federal District Court under the writ of ha-beas corpus, could have perfected an appeal to the Circuit Court of Appeals, and, had the relief sought been denied him there, he could have carried the case to the Supreme Court of the United States by writ of error, whose decision would have been final, but in all these habeas corpus proceedings no one’s property rights could be determined — not even the property rights of the applicant himself, and, of course, the property rights of no one who was not a party to the proceeding could be determined.
A state court has .concurrent jurisdiction with the District Courts of the United States to pass on federal questions, since the Constitution, laws, and treaties of the United ^States are as much a part of the laws of each state as its own local laws and Constitution, and, if the state court errs in a judgment involving a federal question, it is mere error, and would have to be corrected by appeal or writ of error to appellate tribunals, and could not be corrected through the medium of writs of habeas corpus or other bill to a federal court. Blythe v. Hinckley, supra. So in the original case the plaintiff in error was under the duty to give notice of appeal from the judgment perpetuating the injunction, and to perfect his appeal to the Court of Civil Appeals, and, if the Court of Civil Appeals denied him the relief he was entitled to have, it was his legal right to come to the Supreme Court of this state for relief, and, if the Supreme Court should have denied him the relief he was entitled to receive, the United States Supreme Court would have granted it upon proper presentation of his complaint. This course would have secured the relief to which the plaintiff in error was entitled. The Supreme Court of the United States, in the case of Glasgow v. Moyer, 225 U. S. 420, 32 S. Ct. 753, 56 L. Ed. 1147, says:
“The writ of habeas corpus cannot be made to perform the office of a writ of error. This has been decided many times, and, indeed, was *158the ground upon which the petition of appellant for habeas corpus to this court, before his trial, was decided. It is true, as we have said, that the case had not then been tried, but the principle is as applicable and determinative after trial as before trial. * * * Harlan v. Me-Gourin, 218 U. S. 442 [31 S. Ot. 44, 54 L. Ed. 1101, 21 Ann. Cas. 849], was an appeal from a judgment discharging a writ of habeas corpus petitioned for after conviction, and it was held that the writ could not be used for the purpose of proceedings in error but was confined to a determination of whether the restraint of liberty was without authority of law. In other words, ás it was said ‘upon habeas corpus the court examines only the power and authority of the court to act, not the correctness of its conclusions.’ ”
As illustrative of the idea we have attempted to express, giving full respect to the judgment of the federal court in this habeas corpus proceeding, which, in the language of the Supreme Court of the United States in the •case from which the above citation was taken, is that “the writ could not be used for the purpose of proceeding in error, but was confined to a determination of whether the restraint of liberty was without authority of law,” we refer to the opinion of Judge Brown in Higgins v. Bordages, 88 Tex. 458, 31 S. W. 52, 803, 53 Am. St. Rep. 770. In that case, which was an action in .trespass to try title by Bordages against William and Mary Higgins, involving the title to their homestead, the city of Beaumont had an ordinance requiring owners of property abutting streets «upon demand to pave the street next to the property, and, upon default, the city was authorized to have the pavement put down, and to charge the expense to the owners of the property, and declared that a lien existed on such property to secure payment of such expense. Higgins and wife, after due notice, paid no attention to the notice; whereupon the city had the pavement put down, and then brought suit and recovered judgment •against Higgins and wife for the expense and foreclosing a lien on the property. This judgment was by default. The judgment not having been paid, an order of sale was issued, and the property of Higgins and wife, which in fact was their homestead, was sold, at which sale Bordages became the purchaser, •and then brought the suit in trespass to try title to recover possession. Higgins and wife for the first time appeared in court, and assailed by proper pleading all of these proceedings on the ground that they were void under article 16' § 50, of the Constitution of the :state, which protects the homestead of a family from forced sale for the payment of all •debts, except for the purchase money, or a part of the purchase money, the taxes due thereon, or for work and material used in •constructing improvements thereon duly exe•cuted in writing. The district court gave ¡Bordages a judgment in accordance with his pyayer, and the Court of Civil Appeals affirmed this judgment, but the Supreme Court of Texas, speaking through Judge Brown, reversed the judgment of the Court of Civil Appeals as well as the judgment of the district court, and rendered judgment for Higgins and wife, quieting them in their right to possession of their homestead, and incidentally overruled the case of Lufkin v. City of Galveston, 58 Tex. 545, wherein the same question was presented, and upon the authority of which both the trial court and the Court of Civil Appeals rested their decisions.
If A, the husband of B, should institute suit for divorce against his wife based upon statutory grounds, wherein O. is named as corespondent, and upon a hearing before .a court of competent jurisdiction judgment should be rendered for A., in which there is recited the fact that the material allegations in the plaintiff’s petition were true, this judgment would be binding upon not only the parties but everyone else. However, the judgment would only establish a new status for A. and B. wherein they would be privileged to conduct themselves by virtue of their changed status as unmarried persons, and would be correspondingly charged with new obligations, but this judgment in favor of A., wherein this recitation is made with reference to C., would not be res adjudicata in a suit brought by A. for damages against C. for the alienation of his wife’s affections; nor would it be res adjudicata in a suit brought by C. against A. for damages resulting from having made G. corespondent in the divorce case willfully and without probable cause. The reason underlying these principles’of law as illustrated by the instances mentioned is that generally a former judgment will not be a bar to further litigation regarding the same subject-matter, unless the same vital point was put directly in issue, or was fairly within the scope of the pleadings. It is not conclusive of any matter, if the matter be not such that it had of necessity to be determined before the judgment of the court could have been given, since a judgment or decree is not conclusive as to collateral questions nor of any matter to be inferred by argument from the judgment. Philipowski v. Spencer, 63 Tex. 604. This was an injunction suit wherein exceptions to the plaintiff’s petition were sustained, and, in speaking of the petition, the Supreme Court, through Judge Walker, presiding judge of the Commission of Appeals, says:
“It did not show by any distinct allegation the material and essential fact necessary to constitute the proceedings referred to res ad-judicata, that the title of Mrs. Spencer to the land was involved in the issues determined in cause No. 1940 under circumstances that rendered the decision made in that case decisive of the question of her right and title to the land. It was but the mere construction of the pleader and a statement of his legal conclusions to *159allege that her title had been ‘fully and finally determined against her’ in said cause, and that ‘by putting her title in issue, and having the issue finally determined against her, she is estop-ped and barred to further litigate with plaintiffs.’ * * *
“A matter is not generally regarded as res adjudieata unless there be a concurrence of the four conditions following, namely: 1st. Identity in the thing sued for; 2d. Identity of the cause of action; 3d. Identity of persons and of parties to the action; 4th. Identity of the quality in the persons for or against whom the claim is made.” Wait’s Actions and Defenses, 785.
Quoting from the last authority, it is there said:
“ ‘The rule as sometimes* stated is, .that a judgment is not technically conclusive of any matter, if the matter is not such that it had of necessity to be determined before the judgment could have been given.’ * * * ‘And it has been frequently held that a defendant pleading a previous judgment must show that the cause of action was the same.’ ”
The author cites many authorities which are collated in the opinion of Philipowski v. Spencer, supra.
Had plaintiff in error pursued the same course in the injunction case as Higgins and wife did in the trespass to try title case, his premise being admitted to be true that the Wichita Falls ordinance was void, he would have been clearly within his rights, and relief would have been granted him. This relief would not have involved the sole question which was involved in the habeas corpus proceeding. In the habeas corpus proceeding, the defendants in error were not parties. In that proceeding the only relief sought by the plaintiff in error was the discharge from confinement in the county jail. It may be that some of the evidence, and possibly all of the evidence, introduced in the habeas corpus proceeding were the proceedings in the injunction suit. However, we have no means of knowing what evidence was introduced. We only know that the federal court concluded that the plaintiff in error was entitled to the relief sought, and with that conclusion we have no disposition to quarrel. The federal court acted within its judicial discretion in granting the application for the writ and in hearing the case and in rendering the judgment, but this judgment did not involve the determination of any property rights involved in tbe present suit, and therefore could not be held to be res adjudieata of the matters involved in the injunction proceeding relating to the respective rights of the parties which concerned the property involved in the litigation. The order of the district judge who granted the temporary injunction in committing the plaintiff in error to jail for contempt was a mere collateral proceeding, and did not adjudicate the property rights of the parties, and these parties and the subject-matter of the litigation were within the jurisdiction of the state court. Evidently the state court erred in issuing the writ of injunction, since both parties to this proceeding admit that the ordinance of the city of Wichita Falls was unconstitutional, but this error could have been easily corrected, had the plaintiff in error pursued the plain remedy which he had of prosecuting appeal to the Court of Civil Appeals, and from thence to the Supreme Court of Texas, and from thence to the Supreme Court of the United States by writ of error. The judgment of the federal District Court in the habeas corpus proceedings is not res adjudieata of the property rights involved in this case. Rights of persons not parties to the suit, though indirectly affected by judgment, cannot be adjudicated in the suit. Trawick v. Harris, 8 Tex. 314; Richey v.. Hare, 41 Tex. 340; Morrison v. Chandler, 44 Tex. 26; Read v. Allen, 58 Tex. 382.
Recitals in a judgment cannot be looked to so as to bind parties not made parties to a suit, and who did not appear. So we hold in this case that the recital in the judgment of the federal District Court to the effect that the proceedings in the injunction case in the District Court were void cannot be looked to so as to bind the defendants in error who were not parties to the habeas corpus proceeding. As illustrative of our meaning we-refer to the decision in the case of Sullivan v. Briquette & Coal Co. (Tex. Civ. App.) 60 S. W. 330. In that case it was held that a judgment obtained in a separate action against a receiver and not in the general receivership proceedings is not evidence against those who were not parties to it to establish a prior lien in favor of the judgment creditor. Quoting from the opinion in that case, it is-declared:
“A decree in a proceeding to which the mortgagees were not parties would not be admissible-no r. sufficient evidence, by means of its recitals, to establish such facts over objections. The decrees were purely res inter alios acta.”
There is no allegation in the petition; in this cas,e to which a demurrer was sustained to support the conclusion that the injunction issued and finally perpetuated was-void. No facts are stated in the petition showing even prima facie that the state court was without jurisdiction, or that its judgment was void for any reason. Had these facts been stated upon a consideration of the petition, the sufficiency of which was challenged only by general demurrer, we must presume-that the district court would have overruled the demurrer, heard the evidence, submitted the issues of fact to a jury, and rendered judgment in accordance with the verdict, and' plaintiff in error would have secured relief sought, if in fact the ordinance was unconstitutional and therefore void. Had due pleading been filed and proof made of the trespass-committed by the appellees, plaintiff in er*160ror would have been entitled to bis damages, since the injunction suit did not involve any question of damage, and the judgment in that case could not be held to have been res adjudicata of the matters involved in this case, even though the parties were the same. The plaintiff in error was under no legal obligation to reconvene for damages in that original suit, and, therefore, this suit could be maintained and prosecuted to a judgment; likewise the judgment of the federal District Court involving only the liberty of the plaintiff in error to which the defendants in error were not parties cannot be held to be res adjudicata of the matters presented in the petition.
We therefore recommend that the judgment of the' Court of Civil Appeals affirming the judgment of the district court be affirmed.
CURETON, C. J. Judgments of the Court of Civil Appeals and District Court both affirmed, as recommended by the Commission of Appeals.