Plaintiff brings this action to determine adverse claims and quiet title to several hundred lots in additions to Mandan. Defendants Gussner assert an interest to certain lots, and counterclaim, under § 7526, Revised Codes 1905, for permanent improvements placed thereon by them. The trial court allowed defendants a recovery, aggregating $1,637.99, consisting of taxes paid and $500 for a stone foundation on lots 7 and 8, $450 for the value of a dwelling house on lots 14 and 15, and $400 for a barn upon lots 1 and 2, of the tracts in dispute. The amount of recovery was adjudged a lien upon the premises, and, subject thereto, title was quieted in plaintiff, conditioned upon the payment within a limited time of such allowance for betterments. Prom this judgment, defendants appeal, demanding a retrial of all issues of law and fact, and assigning as error “that portion of the third finding of fact, wherein the value of dwelling house on lots 14 and 15 is fixed at $450, and the value of the barns and fences on lots 1 and 2 is fixed at the value of $400.” To this respondent contends that nothing should be allowed for the stone foundation in question, nor for the improvements on lots 1 and 2, nor for taxes. We are satisfied, however, that these allowances as to foundation and taxes were proper and not excessive, *447and eliminate them from further consideration. The inquiry remaining' concerns improvements, consisting of a barn on lots 1 and 2 and a dwelling house and appurtenances on lots 14 and 15, with an additional question of law involved in the court’s refusal to dismiss the action, on motion made at the close of the case, for nonjoinder of parties plaintiff.
We will first consider this last question. Plaintiff deraigns title-from the patentee, and has had record title since 1882 to an undivided two-thirds interest in said property. Prior to the commencement of this; action, through various channels, the remaining undivided one-third interest was vested by deed of record in plaintiff. Charles McDonald! and William Simpson have a joint unrecorded interest with plaintiff in¡ all this property, by reason of advancements for taxes paid and expense® incurred and work done by them, aggregating $2,500 or $3,000. Plaintiff, McDonald, and Simpson have an understanding, whereby, at the-termination of these proceedings, and dependent on final judgment, a division of the property or adjustment of interests therein will be had. And to evidence the same, and to secure the advancements made, McKenzie executed and delivered an instrument, in form a deed of a one-third interest in the property, to Simpson, prior to the commencement of this action, and that pending trial said deed was returned for correction,, and another such deed to Simpson and McDonald, in lieu thereof, issued by a land company, in whose hands McKenzie had placed these property matters, but such deed is subject to correction after adjustment of expenses of the litigation and final determination is had of the property recovered. Simpson, in behalf of himself and McDonald has actively participated in the prosecution of this action, talking with plaintiff about it, procuring witnesses and evidence, and he and McDonald, pursuant to an understanding had, intend to pay their share of the expenses, of this litigation, including attorney’s fees. Simpson testifies to these matters and to his interest to the above extent in the outcome of the suit.
The action is brought in the name of the record owner, the plaintiff. Under any phase of the testimony, he is the real owner thereof, and any deed to an undivided portion thereof is but security against loss for advancements made plaintiff, and for a future adjustment of equities. The deed evidences a security transaction, and is but a mortgage. Jasper v. Hazen, 4 N. D. 1, 23 L.R.A. 58, 58 N. W. 454; O’Toole v. *448Omlie, 8 N. D. 444, 79 N. W. 849; Wells v. Gever, 12 N. D. 316, 96 N. W. 289; Merchants’ State Bank v. Tufts, 14 N. D. 238, 116 Am. St. Rep. 682, 103 N. W. 760; Smith v. Jensen, 16 N. D. 408, 114 N. W. 306; Miller v. Smith, 20 N. D. 96, 126 N. W. 499. And the interests of Simpson and McDonald under the record are bound by the judgment rendered herein, and are as fully litigated as though they were parties to this action. Boyd v. Wallace, 10 N. D. 78, 84 N. W. 760; Bigelow v. Draper, 6 N. D. 152, 69 N. W. 570; Hart v. Wyndmere, 21 N. D. 383, 131 N. W. 271, at page 277, and authorities there cited. We quote from the opinion in Boyd v. Wallace: “One who is not a party defendant on the record in an action, but who participates in the defense, and has an interest in the matter in controversy in the action, and participates in the defense for the protection of such interest, . . . and where it is known to the plaintiff that such party so participates for the protection of his own interest, is bound by the decree rendered in the action.” The converse of the proposition is equally true, and a party so acting through another as plaintiff is, under the same circumstances, himself bound by the judgment. ' Plaintiff’s interest makes him a proper and necessary party plaintiff. Simpson’s and McDonald’s equitable interests appearing, they were proper parties to the action, had they been made such; but no application therefor was made, and they not being necessary parties, and being bound by the judgment rendered under the record, neither the interests of plaintiff nor defendants are prejudiced by their omission as parties to the action. The motion to dismiss for failure to join Simpson and McDonald as parties plaintiff, and because the action is not brought in the names of the real parties in interest, is without merit.
Defendants counterclaim for improvements under § 7526 of the Code, providing: “In such case he may also set forth a counterclaim and recover.from plaintiff or a eodefendant for permanent improvements made by him or those under whom he claims holding under color of title in good faith adversely to the plaintiff' or codefendant against whom he seeks a recovery.” Based on this statute, defendant claims to recover the value of the dwelling house on lots 14 and 15, fixed by the trial court at $450, and claimed by appellant to be worth $1,800. An examination of the record discloses a purchase of lots 14 and 15 in 1906 for $800, with the lots of the value of $500. From other testimony, *449including a description of the house at the time of suit, we are satisfied with the trial court’s findings as to this item. And the evidence sustains the findings as to the right of defendants’ recovery; defendants claiming title to lots 14 and 15 based upon a deed, it a part of a purported chain of title reaching back many years; color of title having its inception in a void tax deed, issued in 1891.
But as to defendants’ claim for betterments for the bam placed upon lots 1 and. 2, a different question is presented. This barn is claimed to be owned jointly by Steven and George Gussner. It was placed upon these lots in 1903 and 1904, having been built elsewhere and moved thereon. In May, 1908, before the commencement of this action in September of' that year, the original owner of the land, who, years before had transferred by warranty deed his interest therein to plaintiff and others, quitclaimed to Steven Gussner, for an alleged consideration of $800, lots 1 and 2, and other lots. Steven Gussner transferred in the same month part of said lots to his wife, and lots 1 and 2, with other tracts, for a consideration of $500, to George Gussner. ' This deed to Steven Gussner constitutes defendants’ first color of title to lots 1 and 2, and it appears to be the first time defendants ever asserted ownership to these two lots.
Steven Gussner’s testimony on this is as follows:
Q. You knew at the time [1904] you didn’t own anything down there except lot 21 ?
A. That’s the first lot I bought.
Q. And these other lots belonged to-.
A. I understand they belong to Helmsworth'.
Q. Then you, in 1904, paid $48.95 taxes for 1903 on all these lots, didn’t you ?
A. Yes.
Q. At that time you had absolutely no claim to these lots at all ?
A. No.
Q. Now did you come to pay these taxes ?.
A. I was up to the courthouse and listening, and there was a lot of lots for sale, and I went to work and bought some tax title to it.
Q. You mean, in 1904, you bought these lots at a tax sale ?
A. Yes.
*450Q. Got certificates for them ?
A. Tes, sir.
Q. Now you were using these lots at that time, weren’t you ?
A. I never used them.
Q. You had fences around them ?
A. I put a fence around to keep the cattle out.
Q. You put a big barn on them ?
A. Yes, sir; I put a big barn on.
Q. That was six or seven years ago ?
A. Yes.
Q. That was put on the time you paid the taxes ?
A. Paid the taxes before.
Q. You have been using these lots all these years ?
A. They was always laying idle most of the time; the barn is on there now.
Q. Now, when you paid these taxes for 1904, you simply paid it to get the use of the lots ?
A. No; I came up there; I had to pay some taxes anyway, and I bought them.
Q. Now in 1907 you bought in these lots for the 1906 taxes, and paid $17.46 at the tax sale, didn’t you ?
A. Yes, sir.
Q. Now, what was your idea in doing that, to get title of your lots ?
A. Well, I got a fence down there, and so I kept the fence around there.
Q. You wanted to keep other people from moving on these lots ?
A. Yes, sir.
The reason for the defendants’ failure to claim ownership until the obtaining of the quitclaim deed in 1908 is further shown by the uncontradicted testimony of William Simpson, who testifies to a conversation had with Steven Gussner on or about the 3d day of December, 1907, two or three days after the-tax sale that year, in which the witness told Gussner that McKenzie was going to redeem from the tax sales, and that if he, (Steven) intended to get a tax deed he would never get it; Steven replying *. "I am not; I only want to use the lots. I am paying those taxes in order to get the use of the lots.” And nowhere in the record *451do the defendants claim ownership prior to the obtaining of the quitclaim deed in 1908. And the only claim in the answer of defendants as to the improvements to lots 1 and 2 is: “That on or about the 1st day of July, 1908, the said defendant George Gussner, together with defendant Steven Gussner, placed on said lots 1 and 2 a large frame barn, the reasonable value of which is $1,500, in good faith, and in the belief that the defendants George Gussner and Steven Gussner had good title to said lots 1 and 2; and the defendant George Gussner claims a lien on said lots 1 and 2 for the sum of $1,500, with legal interest thereon from the 1st day of July, 1908.”
It is plain that neither in the pleadings nor the proof is there any pretense or claim whatever of ownership of these lots 1 and 2, until five or six years after the bam in question was moved thereon. At the time the improvements were made, therefore, they could assert no claim whatever to lots 1 and 2. Defendants knowingly affixed these permanent improvements upon the property of others without leave or license or semblance of title. They were mere trespassers, and as such it is elementary that they are not entitled to compensation for improvements made thereon under the circumstances. See Nesbitt v. Walters, 38 Tex. 576; Stille v. Shull, 41 La. Ann. 816, 6 So. 634; New Orleans & S. R. & Immigration Asso. v. Jones, 68 Ala. 48; Stamper v. Bradley, 21 Ky. L. Rep. 806, 53 S. W. 16; Carpentier v. Mitchell, 29 Cal. 330; Fischer v. Johnson, 106 Iowa, 181, 76 N. W. 658; Hawke v. Deffebach, 4 Dak. 20, 22 N. W. 480; Wood v. Conrad, 2 S. D. 334, 50 N. W. 95; Seymour v. Cleveland, 9 S. D. 94, 68 N. W. 171; Skelly v. Warren, 17 S. D. 25, 94 N. W. 40; 22 Cyc. 16, under note 72; 27 Century Dig. Improvements, § 7. “A mere trespasser who makes no claim of right or title, and merely hopes some day to purchase the land, cannot burden it with charges for improvements.” 16 Am. & Eng. Enc. Law, 86.
The claim of the defendants Gussner for compensation for these improvements under the statute (§ 7526) cannot be allowed, and the contention of the respondent as to this item is sustained. The $400 allowed by the trial court for the improvements of lots 1 and 2 was erroneous, and the judgment appealed from is modified by a reduction in said amount ($400) as of the date of entry of judgment, and as so modified the judgment of the trial court is affirmed. Neither narty is to recover costs of this court on this appeal.