*263Opinion.
The state of North Dakota could have dispossessed the respondent of his right as lessor to the crop in question but took no action to do so. *264The rights of the parties in this suit to the crop in question were before the trial court and were adjudicated in favor of the plaintiff and respondent as against the defendant. We are concerned here with the propriety of this adjudication. We are not concerned with the right 'of the land commissioner to make leases as he did with the appellant. This matter has recently been decided in what is called the Wittmayer Case, 54 N. D. 845, 211 N. W. 436.
The parties to this suit prior to the cancellation or attempted cancellation by the land commissioner of the respondent’s contract with the state were landlord and tenant, and there is here no dispute a-s to the binding character of the lease executed by them. The sole contention is, in substance, that the state having canceled the purchase contract of the respondent and having leased the premises to the appellant, all rights of the respondent were wiped out and that the appellant, in consequence, became the owner of the one-half share of the crop that worrld have been the undisputed property of the respondent had there been no cancellation of the contract. It will be seen at once that this contention places to one side the law applicable to the relations existing between the plaintiff and the defendant by virtue of their lease. The law applicable to the relation of lessor and lessee is in no way altered by the fact that the state has made claim to or substantiated a superior title to that of the lessor. In protecting the rights of the state as a fee owner or as a vendor under contracts for the sale of school lands, the legislature has made no exceptions to the general statutes governing the relations of landlord and tenant. It has not removed from the tenant the statutory duty of immediately informing the landlord of any proceeding to recover the property of which he (the tenant) received notice. Neither has it given to the tenant permission to attorn to the State so as to acquire a right to the crops superior to that of his landlord. Section 6091 of the Compiled Laws of 1913 is clearly applicable as between the plaintiff and the defendant. It reads as follows:
“Every tenant who receives notice of any proceeding to recover the real property occupied by him, or the possession thereof, must immediately inform his landlord of the same and also deliver to the landlord the notice, if in writing, and is responsible to the landlord for all damages which he may sustain by reason of any omission to inform *265him of the notice or to deliver it' to him if in writing. The attornment of a tenant to a stranger is void, unless it is made with the consent of the landlord or in consequence of a judgment of a court of competent jurisdiction.”
The stipulated record shows that the appellant, the tenant in this case, did not comply with any of the requirements of this section of our Code, which is mandatory in its nature. The appellant had notice of the action taken against the title of the respondent, his landlord, and was in duty bound to advise him of the same, a duty which he did not perform. The clear intent and purpose of this statute is to protect the landlord or lessor, if he be away from the premises, and the Legislative Assembly must have had in mind the fact that a lessor putting a lessee in possession would be apt to be away from the premises, and that the lessee or tenant would first receive notice of any attack upon or impairment, of the title of the lessor.
" Not only did the defendant neglect to inform his lessor of the threat of the state to dispossess him, but he immediately took steps to acquire a title to the crops superior to that of the lessor by becoming a tenant of the owner of the superior title, the State. The statute says that the attornment of a tenant to a stranger is void unless made with the consent of the landlord or in consequence of a "judgment of a court of competent jurisdiction. This provision of the statute was doubtless borrowed from California where it was enacted as early as 1855. See Thompson v. Pioche, 44 Cal. 508. As to. the effect of the statute the California court in that case said (page 515) :
“Whatever may be the rule at common law, it is clear that the statute must prevail. . . . The statute declares such attornment void— that is to say, void as between the landlord and tenant, but it is not necessarily void between the tenant and the party to whom he attorned.”
The court held that under such a statute it was not within the power of the tenant to destroy the relation existing between him and h'is landlord by attorning to another person, even to the owner of the land. Under such a statute it is the duty of the tenant who desires to improve his possessory right to first surrender possession to his lessor. Lowe v. Emerson, 48 Ill. 160; Ebersol v. Trainor, 81 Ill. App. 645; Stover v. Davis, 57 W. Va. 196, 49 S. E. 1023; 2 Taylor, Land. & T. § 629; *266Simmons v. Robertson, 27 Ark. 50; Bryan v. Winburn, 43 Ark. 28; 35 C. J. p. 1249.
Viewing tbe matter in this light and applying this interpretation to. the statute, the record shows that the appellant in this case neglected his duty in respect to the section quoted, having in view the possibility of profiting thereby to the detriment of the lessor, and that he attorned to the state as the owner of a paramount title. Whether or not this ever entered into the mind of the appellant, tire statutory requirement was never complied with under the stipulated facts and the attempted attornment was void. The appellant was at fault, and, in a respect, it may be said, that allowed the respondent unwittingly to permit the cancellation of the contract for the premises in question. This being the fact, the appellant should not be permitted to profit by his own fault. It is not necessary to set out in this connection the lease or any of the exhibits, being notices from the land commissioner, nor is it necessary to set out the leases with the state on the part of the appellant. The sole question is, did the cancellation of the respondent’s contract by the state, under the conditions stipulated and the facts found by the court, wipe out the respondent’s interest to his share of the crop of 1924, and permit the appellant to get the benefit thereof and take the same ? This we think it did not do and could not do. So far as this record shows the respondent still has the right to redeem from the foreclosure of the land contract.
The judgment of the lower court should be in all things affirmed and it is so ordered.
Birdzell, Ch. J., and Nuessle, Christianson, and Burke, JJ., concur.
Burr, J., being disqualified, did not participate; Honorable A. T. Cole, Judge of the First Judicial District, sitting in his stead.