This is a suit to set aside a trustees ’ deed to real property for alleged fraud and irregularities in the foreclosure proceedings on a trust deed which was executed to secure a debt. The material allegations of the complaint were denied and two former judgments were pleaded as res judicata. Those former judgments determined that the challenged proceedings and deed of conveyance were valid and regular in every respect. In this ease the court adopted findings and rendered judgment against the plaintiffs holding that one of the former judgments is res judicata of the issues of this suit and therefore a bar to this action. From that judgment the plaintiffs have appealed.
The only question to be determined on this appeal is whether the judgment which was rendered in a former suit of unlawful detainer is res judicata of the issues which are involved in this case.
Prior to January 23, 1930, J. R. Covington and wife owned 50 acres of land in Glenn County, subject to a deed of ti’ust executed by them August 25, 1925, to secure a debt of $9,400. Edward F. Harris was the beneficiary under that trust deed, and John Raggio and C. W. Hawks were named as trustees. July 14, 1926, that trust deed was assigned to Tuxedo Land Company. January 23, 1930, the land was sold and conveyed to C..V. Seidell and Carrie I. Seidell, “subject to a Deed of Trust, dated August 25th, 1925.” The only consideration for that transfer of title was plaintiffs’ unsecured note for $500. Only a small portion of the debt secured by the trust deed was ever paid. Upon default of the terms of that deed of trust, the land was regu*915larly sold and conveyed by the trustees Baggio and Hawks on January 9, 1931, to Stockton Abstract and Title Company, pursuant to the provisions of the deed of trust. The last-mentioned company deeded the property to Edward F. Harris, the original beneficiary of the deed of trust, on March 25, 1931. He in turn sold and conveyed it on January 26, 1932, to the Anglo-California Trust Company, which was subsequently consolidated with the Anglo-California National Bank of San Francisco, which thereby became the owner of the property in question.
The validity of the trustees’ deed and the regularity of the foreclosure proceedings on the deed of trust have been three times determined adversely to the plaintiffs in this case by the courts of review in this state. In 1931 C. V. Seidell brought suit against the Tuxedo Land Company, which was then the owner and holder of the trust deed, to enjoin the sale of the land by the trustees on the ground that the note was void for lack of consideration and proper signatures, and because neither Edward F. Harris nor Tuxedo Land Company was the owner of the note or deed of trust, and therefore lacked authority to foreclose the lien. Judgment was rendered against the plaintiffs in that suit. On appeal that judgment was affirmed by the Supreme Court. (Seidell v. Tuxedo Land Company, 216 Cal. 165 [13 P.2d 686].) The court said:
“Plaintiffs instituted this action for the purpose of enjoining the sale of said real property under proceedings brought to foreclose said deed of trust. The regularity of said proceedings is not questioned.” (Italics ours.)
In that case it was determined that Edward F. Harris was the former owner of the deed of trust and note secured thereby, which he duly assigned and transferred to Tuxedo Land Company; that no part of that note was paid except the sum of $700; that the only consideration which the plaintiffs paid for said land was their unsecured note for $500; that the proceedings on foreclosure of the deed of trust wrere valid and regular in every respect. Judgment was affirmed and the plaintiffs were fined $150 for instituting a frivolous appeal.
C. V. Seidell then brought suit against the Tuxedo Land Company to set aside the trustees’ deed of January 9, 1931, on the grounds of fraud and illegality of the foreclosure proceedings. The issues in that case included all of the *916alleged irregularities with respect to the foreclosure proceedings and sale of property which are relied upon in the present suit. At the close of plaintiff’s case in that action a nonsuit was granted. From that judgment the plaintiff appealed. That judgment was also affirmed by this court in October, 1934. A hearing thereof was also denied by the Supreme Court. (Seidell v. Tuxedo Land Company, 1 Cal.App.2d 406 [36 P.2d 1102].) That judgment was set up as a bar to this action. Since it was founded on a judgment of nonsuit, the court did not hold that it is res judicata of the issues of this case.
After sale and transfer of title to Tuxedo Land Company on foreclosure of the deed .of trust, the land was conveyed to Edward F. Harris by deed dated March 25, 1931. Mr. and Mrs. Seidell then occupied the premises. Harris served statutory notice under section 2924 of the Civil Code upon them, demanding possession of the property, which was refused. May 3, 1931, Harris commenced suit under section 1161a of the Code of Civil Procedure against C. V. Seidell and wife for unlawful detention of the property. They answered the complaint, denying the material allegations thereof and filed a cross-complaint setting up in detail the same alleged fraud and irregularities in the foreclosure proceedings and sale of property under the deed of trust which were previously determined in the former suit to set aside the trustees’ deed. On motion of the plaintiff Harris, the cross-complaint was stricken from the record with permission to include all such matters of defense in an amended answer. That amended answer was filed. It included in detail all of said alleged irregularities of procedure on foreclosure of the deed of trust, and the alleged fraud and illegality of the trustees’ deed which are relied upon by the plaintiffs in this suit. That unlawful detainer action was tried and determined on its merits adversely to Mr. and Mrs. Seidell. Elaborate findings were adopted upon all the issues in that case. A careful examination of the pleadings and findings of that case convinces us that every essential issue of this case was determined by the judgment in that unlawful detainer action. On appeal the judgment in the last-mentioned suit was also affirmed by this court. A hearing was denied by the Supreme Court. (Harris v. Seidell, 1 Cal.App.2d 410 [36 P.2d 1104].) The opinion in that case refers to and approves the decision previously rendered in Seidell v. Tuxedo Land Company, 1 Cal.App.2d *917406 [36 P.2d 1102], The regularity of the foreclosure proceedings and the validity of the trustees’ deed were upheld in the unlawful detainer suit. Those alleged irregularities and the invalidity of the deed were specifically included in the defendants’ answer as necessary issues to be determined. The court said in that regard: “The fact and validity of the sale under the deed of trust was made an issue by defendants.” In that suit between parties, all of whom are included among the parties to this action, every essential issue which is presented by the pleadings in this case, affecting the regularity of the foreclosure proceedings and the validity of the trustees’ deed, was involved in and determined adversely to these appellants. That judgment is therefore res judicata of the issues of this suit, and becomes a bar to the maintenance of this action.
The appellants contend that the judgment in the unlawful detainer suit is not res judicata of the issues of irregularities in the foreclosure proceedings and the invalidity of the trustees’ deed in this equitable action to cancel the deed, because the former action at law was merely possessory in its nature and could not determine alleged defects of title. In other words, it is asserted the Seidells could not lawfully dispute the regularity of sale in the unlawful detainer suit since that would violate the well-established rule that a tenant may not dispute the title of his landlord; that the trustees’ deed is conclusive of those facts, and because the former judgment does not bar the occupant of the land from the right to a determination of the alleged irregularities of the proceedings on sale of the property in this equitable action to cancel the deed. We do not agree with that construction of the law under the circumstances of this case. It appears that the Seidells actually did plead those alleged irregularities in their answer which was filed in the former suit, and sought to prove them at the trial to defeat the right of possession on the part of Edward F. Harris. The court adopted elaborate findings upon those issues. The court found that Harris acquired legal title and the right to possession of the real property through his grantor, Stockton Abstract and Title Company, which became the owner thereof by purchase from the trustees Baggio and Hawks at the foreclosure sale of the land under the provisions of the trust deed; that the proceedings on sale were regular and valid in every particu*918lar, and that the Seidells therefore had no interest in the property or right of possession.
The doctrine of res judicata is applicable to this case. The judgment in the unlawful detainer suit bars the appellants from now contending the trustees ’ deed to the real property was void on account of the alleged irregularities of procedure in the foreclosure of the deed of trust. The doctrine of res judicata is that an existing final judgment on the merits of a cause rendered by a court of competent jurisdiction is conclusive of the rights of the parties thereto and of their privies on all material issues which were tried and determined and upon all issues which might have been properly tendered therein, in all subsequent actions or suits in any tribunal of concurrent jurisdiction involving the same points either directly or incidentally. (Estate of Clark, 190 Cal. 354, 360 [212 P. 622]; Hess v. Moodey, 35 Cal.App.2d 401, 408 [95 P.2d 699] ; 15 Cal.Jur. 97, § 166; 2 Freeman on Judgments (5th ed.) 1321, § 627; 15 R.C.L. 973, § 450.) In the Hess ease, supra, the plaintiff brought suit to quiet title. The judgment in a former suit between the defendant Moodey and Dale Consolidated Mines was pleaded as a bar to the action. The evidence showed that Charles Gross filed a location on a mining claim. He conveyed one-half interest therein to Harry Reese. Gross was in possession of the property. He deeded his interest to Reese who thereafter conveyed it to Dale Consolidated Mines, subject to a note for $16,000 secured by a deed of trust executed by Gross and Reese. The mining company then took possession of the property. Upon foreclosure sale under the terms of the deed of trust Esther Wright became the purchaser and she conveyed the land to the plaintiff Hess, who took possession thereof. Prior to the foreclosure proceedings the defendant Moodey purported to file a location on the same claim and asserted he thereby became the owner of the land and was entitled to the possession thereof. After the foreclosure proceedings and the execution of the deed of trust Moodey brought suit against the Dale Consolidated Mines, claiming that the foreclosure proceedings were defective and invalid. Judgment was rendered against Moodey in that action. That judgment was offered in evidence in the case of Hess v. Moodey as a bar to the defendant's claim of title. The court held that the former judgment was a bar to Moodey’s claim based on alleged irregularities *919of foreclosure proceedings. The syllabus correctly states the determination of the court in that regard as follows:
“Where all the interest of one of plaintiff’s predecessors passed to plaintiff by foreclosure sale under a deed of trust and by the termination of an unsuccessful action by the predecessor against plaintiff to postpone the foreclosure, and a judgment had been obtained by said predecessor against defendant declaring that the latter had no interest in the property, there was sufficient privity between plaintiff and his predecessor, and the judgment obtained by said predecessor against defendant was conclusive upon the parties to this action. ’ ’
The preceding case is authority determining that the Seidells are bound by the previous judgment in the case against Tuxedo Land Company with respect to the alleged irregularities in the foreclosure of the deed of trust.
Regarding the application of the doctrine of res judicata, it is said in 15 Ruling Case Law at page 975:
“A matter, whether consisting of one or many questions, which has been solemnly adjudicated by a court of competent jurisdiction, must, in any subsequent litigation between the same parties, where the same question or questions arise, be deemed to have been finally and conclusively settled, except where the litigation is a direct proceeding for the purpose of reversing or setting aside such adjudication. Where parties have once litigated in a competent tribunal and been defeated, they cannot thereafter litigate the same question in another tribunal of independent or concurrent jurisdiction and having no appellate jurisdiction, so long as the original judgment remains unreversed, and in full and operative effect. In harmony with these principles it has been ruled that if a material fact, decisive of the case, is tendered as an issue and not withdrawn, a determination thereon adversely to the party tendering it is conclusive against him in a subsequent suit involving the same issue, whether he introduced evidence in the former action in support of such issue or not. A judgment of a court of competent jurisdiction is conclusive on the parties not only as to the causes of action therein determined, but also as to the defenses therein pleaded and passed on by the court.’’
In the present case there is no doubt that the identical questions relied upon by the appellants in this proceeding *920were pleaded by them and determined against them in the former judgment which the court found to be res judicata and a bar to their defense in this suit.
The action of unlawful detainer is a statutory proceeding, and is governed solely by the provisions of the statute creating it. (Klein v. Loeffler, 96 Cal.App. 383 [274 P. 373] ; Bekins v. Trull, 69 Cal.App. 40 [230 P. 24]; 15 Cal.Jur. 848, §§ 275, 276.) In the Klein case it is said:
“ ‘ ... It was designed for the purpose of providing a speedy and summary remedy to determine the right to the possession of real property in the cases specified in the statute. It cannot be used for any other purpose than those enumerated therein.’ ” (Italics added.)
In 1929, the statutes of California authorizing summary proceedings for possession of real property were supplemented and the scope of the action of unlawful detainer was enlarged by the adoption of section 1161a of the Code of Civil Procedure requiring the owner who acquired title under the provisions of a deed of trust to prove that the property was “sold in accordance with Section 2924 of the Civil Code, under a power of sale,” and that “title under the .sale has been duly perfected.” (Italics ours.) Section 1161a reads in part:
“In either of the following cases, a person . . . may be removed therefrom as prescribed in this chapter.
“3. Where the property has been duly sold in accordance with Section 2924 of the Civil Code, under a power of sale contained in a deed of trust executed by him, or a person under whom he claims, and the title under the sale has been duly perfected. ’ ’
Section 2924 of the Civil Code, referred to in the preceding statute, provides for the proceedings on sale of real property under deeds of trust, for breach of covenants, including the time, manner and contents of the notices of breach and sale by “the trustee or other person authorized to make the sale.”
In an action for unlawful detainer, section 1161a there-. fore necessarily requires proof that the property was “duly sold in accordance with Section 2924 of the Civil Code,” and that “the title under the sale has been duly perfected.” (Italics ours.) Under such unlawful detainer statutes it has been held that title, to the extent required by section 1161a, “not only may, but must, be tried in such actions if the provisions of the statutes extending the remedy beyond the cases *921where the conventional relation of landlord and tenant exists are not to be judicially nullified.” (Nineteenth Realty Co. v. Diggs, 134 Cal.App. 278, 289 [25 P.2d 522]; Mortgage Guarantee Co. v. Smith, 9 Cal.App.2d 618 [50 P.2d 835].) In the case last cited, a hearing was denied by the Supreme Court.
The case of Cheney v. Trauzettel, 9 Cal.2d 158 [69 P.2d 832], upon which the appellants rely, is not in conflict with the authorities last cited. In fact, the Diggs case is cited and approved in support of the statement that title may be determined in an unlawful detainer case under section 1161a “to the limited extent” provided by that statute. The extent to which title is involved under subdivision 3 of that section requires a showing that “the property has been duly sold in accordance with Section 2924 of the Civil Code” and that “the title under the sale has been duly perfected.” The Cheney case was an unlawful detainer action under section 1161a by the purchaser at the sale under a deed of trust. The defendant set up a claim of title in a cross-complaint which was stricken from the record. The answer asserted that the “sale was merely colorable.” (Italics ours.) We assume this means it consisted only of equitable defenses. Judgment was rendered in favor of the plaintiff. On appeal the judgment was affirmed. The Supreme Court properly said: “Irrespective of the merits of the defenses raised by the answer, the alleged equitable grounds of attack on plaintiff’s title have no place in the present summary proceeding.” (Italics ours.) Evidently neither the cross-complaint nor the answer alleged any irregularities in the proceedings on sale under the deed of trust. The court says in that regard, “compliance with all the statutory requirements in respect of the conduct of the sale is admitted. ” We therefore conclude that the Cheney case does not preclude the right to challenge the regularity of the statutory proceedings on sale of land under a deed of trust, in an unlawful detainer suit under section 1161a. That is exactly what was done in the unlawful detainer action which was held by the trial court to be res judicata in this proceeding.
In this case the challenged unlawful detainer judgment determined issues tendered by these appellants in their answer which constituted legal defenses of alleged specific violations of the statute in failing to give the notice of sale re*922quired by section 2924 of the Civil Code, lack of consideration for the note secured by the trust deed, and other asserted defects going to the validity of the trust deed and note secured thereby, and to the proceedings on the sale of that property under the provisions of the deed. All of those issues of law, as distinguished from equity, affecting the legality of the note, deed of trust and the sale were properly determined against the defendants in that unlawful detention suit. If the answer contained equitable issues of fraud, as the Supreme Court said in the Cheney ease, supra, they had no place in that unlawful detainer proceeding, and the findings thereon were immaterial and may therefore be disregarded. They were harmless.
Many other California cases are cited by the appellants in support of their contention that the alleged irregularities of the foreclosure proceedings may not be determined in an unlawful detainer suit for the reason that a tenant cannot ordinarily dispute the title of his landlord. It is unnecessary to analyze those cases since they were determined before the adoption of section 1161a of the Code of Civil Procedure, and therefore have no application to the present case.
The appellants should be estopped from now denying the right of the court to determine the issues of alleged irregularities in the foreclosure proceedings in the unlawful detainer suit, because they tendered those issues as a defense to that action, and tried the case on the theory that they were competent.' On appeal from the judgment in that case they. contended that those issues were valid and controlling. That judgment was. affirmed. It is certainly inconsistent for them to contend now that the defense which they urged was improperly considered.
There is no merit in appellants’ contention that the court lost jurisdiction to determine the question of res judicata by the previous order of another judge sitting in the same court and cause denying defendants’ motion to dismiss the action on the ground that the facts and law were previously litigated and decided in the unlawful detainer suit. That motion was made before this cause was tried. No evidence in support of the plea of res judicata had then been adduced. That intermediate order was not a final judgment from which the defendants were authorized to appeal. (§ 963, Code Civ. Proc.) It is immaterial that a judge, other than the one who finally tried and determined this suit, first denied the motion *923to dismiss the action and then determined that this suit was not barred by the judgment in the unlawful detainer action. Upon motion for new trial that judgment ivas set aside, and the cause was tried de novo by the judge who finally rendered the judgment from which this appeal was perfected. The question of a conflict of courts of concurrent jurisdiction is not involved in this action. The cases which are cited in support of that principle are not in point. All of the proceedings in this case were conducted in the same court and cause. One judge first tried and determined the cause and then granted a new trial. The former judgment was thereby nullified. Another judge then retried the case and finally determined the issues. The final judgment prevails.
The court did not err in permitting the defendants to amend their answer to deny specifically that they had knowledge of the alleged defects of foreclosure proceedings relied upon by the plaintiffs. The defendants inadvertently omitted to deny specifically a general statement of the complaint that they had “full notice and knowledge ... of all the facts, matters and things in this complaint hereinbefore alleged.” It is apparent from the denials of the original answer that the defendants did not concede there were any irregularities in the foreclosure proceedings on the deed of trust. It would be inconsistent to assume that they nevertheless had notice of such defects merely because they failed to deny specifically that general allegation of the complaint. The court, in the exercise of its discretion, properly granted defendants’ motion to amend their answer to deny specifically that statement.
It is a well-established rule which is founded on good reason and justice that a court should exercise great liberality in permitting amendments of pleadings at any and all stages of the trial to present adequately all issues which are properly involved in the litigation. (Robertson v. Burrell, 110 Cal. 568 [42 P. 1068] ; Redondo Improvement Co. v. City of Redondo Beach, 3 Cal.App.2d 299, 302 [39 P.2d 438] ; 21 Cal.Jur. 183, § 127.) There was no abuse of discretion on the part of the court in allowing the filing of an amended answer in the present case.
The judgment is affirmed.
Schottky, J. pro tem., concurred.