
86 N.W.2d 647 (1957)
Ida C. JOHNSON, Plaintiff and Respondent,
v.
Leroy JOHNSON, Defendant and Appellant.
No. 7705.
Supreme Court of North Dakota.
December 9, 1957.
*648 Friederich & Ziegler, Rugby, for plaintiff and respondent.
Heringer, Nelson & McClintock, Rugby, Duffy & Haugland, Devils Lake, for defendant and appellant.
MORRIS, Judge.
This matter comes to us upon an appeal from an order made by the District Court of Pierce County on April 26, 1957, continuing in effect a Restraining Order that had been entered by the court on April 12, 1957. The plaintiff instituted these proceedings by a Summons and Complaint. The Complaint states that the plaintiff is the owner and entitled to possession of a certain described tract of real estate situated in Bottineau County being three quarter sections of farm land. The defendant during the years of 1954, 1955 and 1956 occupied the land under an annual farm lease which was extended from year to year. It is alleged that on or about December 1, 1956 the plaintiff and defendant made a complete and final settlement as landlord and tenant,
"and that the foregoing lease or any extension thereof was terminated, and the defendant advised by this plaintiff that said premises would no longer be available to him for the farming season 1957 or subsequent years."
It is further alleged that the plaintiff entered into an agreement with a third party to have the farm operated for the year 1957 and that the defendant threatens to proceed with farming the land for 1957 contrary to the plaintiff's direction and wishes. It is also alleged that plaintiff will be unable to comply with the agreement made with other persons and irreparable damage will result from the action of the defendant. The plaintiff prays that until the final hearing of the case the defendant, his servants and agents be enjoined and restrained from interfering with the property or entering upon or cultivating the same or performing acts as a tenant and interfering with the plaintiff's use and occupation of the land and that upon a final hearing the injunction be made perpetual.
*649 Upon the filing of the complaint, which was verified and accompanied by an affidavit of the plaintiff setting forth in some detail the matters alleged in the Complaint, the court issued an Order to Show Cause for a hearing to be held on April 24, 1957 and restraining the defendant in the meantime upon the giving of a bond for $1,500. The defendant made a Return to the Order to Show Cause in the form of an Affidavit in which he set forth his possession and right to possession under the lease mentioned in plaintiff's complaint. He states that in 1956 he summer fallowed and prepared for crop 145 acres and did considerable discing and other cultivation on the premises, that he cleaned the necessary wheat for seeding the crop on the premises, and that he has at no time received any notice from the plaintiff canceling the contract under which he has been in continuous possession with the consent of the plaintiff and that it is his understanding that he was to farm the premises during the farming season of 1957. He also alleges that he has stored on the premises farm machinery that he has used and will be required to use in farming the land involved in this action.
The defendant in his Return further sets forth that on April 5, 1957 he was served with a Notice to Quit signed by the plaintiff which stated:
"You are hereby notified to quit and surrender the following described premises which you are holding over after the termination of your lease and after the expiration of your term * *.
"You are further notified to remove from said premises, or any part thereof any personal property now situated upon said premises which belong to you."
The defendant also alleges that the plaintiff has an adequate remedy at law and is not entitled to an injunction. A copy of the lease is attached to the Return.
After a hearing on the Order to Show Cause held in Rugby, the County Seat of Pierce County, on April 26, 1957, the court continued the temporary injunction until the trial of the case on its merits. The appeal is from this Order continuing the injunction.
At the threshold of our consideration of the matter lies a question of jurisdiction. The land covered by the lease the continuation of which is claimed by the defendant and the termination of which is claimed by the plaintiff all lies in Bottineau County. The action was brought in Pierce County and all subsequent proceedings have been taken in that county. These proceedings include a hearing at which the defendant appeared and submitted a Return to the Order to Show Cause. The defendant contends that the subject of the action is a right or interest in land situated in Bottineau County, that the District Court of Pierce County therefore has no jurisdiction of the subject matter. He argues that his appearance at the hearing was a matter of personal jurisdiction that did not and could not confer jurisdiction over the subject matter upon the District Court of Pierce County and that the latter court had no power to either issue originally or continue in effect after hearing the preliminary injunction. The plaintiff contends that this controversy involves only a matter of venue and not jurisdiction of the subject matter.
From the territorial days until the adoption of NDRC 1943 our statutes provided that actions for certain enumerated causes must be tried in the county in which the subject of the action or some part thereof is situated subject to the power of the court to change the place of trial as provided by statute. Among those enumerated were actions:
"For the recovery of real property, or of an estate or interest therein, or for the determination in any form of such right or interest, and for injuries to real property."
Code of Civil Procedure, Dakota Territory, Section 92. Section 7415, 1925 Supplement *650 to Compiled Laws. By Section 28-0401 NDRC 1943 this statute was changed to read:
"An action for any one of the following causes must be brought in the county in which the subject matter of the action, or some part thereof, is situated, subject to the power of the court to change the place of trial upon agreement of counsel or in other cases provided by statute:
"1. For the recovery of real property, or of an estate or interest therein, or for the determination in any form of such right or interest;"
The Code Revision Report covering the work of the Code Commission which was submitted to the Legislature when the Code was presented for consideration and adoption contains a reviser's note explaining the change as follows:
"With reference to actions relating to real property the statute has been revised to provide that the action must be brought in the county where the property is situated rather than that it shall be tried there."
When the change is considered in the light of the explanation afforded by the reviser's note it appears clear that it was the intention of the Legislature in adopting the change proposed by the Code Commission that the territorial restrictions enumerated in that section with respect to where certain actions must be brought are jurisdictional. In order for the court to acquire jurisdiction in the enumerated actions pertaining to real property the action must now be brought in the county in which that property or some part thereof is situated. It is this territorial jurisdiction which gives the court the power to act on the subject matter of the action. Neither acquiescence nor participation in proceedings before a court that does not have such power will authorize the court to determine any matter or make any adjudication with respect to property concerning which the law has not authorized it to act. Section 337, Freeman on Judgments, 5th Ed.
In Fritts v. Camp, 94 Cal. 393, 29 P. 867, 868, the court had under consideration the effect of a section of the California Constitution (art. 6, § 5) that provided as to superior courts that their process should extend to all parts of the state,
"`provided that all actions for the recovery of the possession of, quieting the title to, or for the enforcement of liens upon, real estate, shall be commenced in the county in which the real estate, or any part thereof, affected by such action or actions, is situated.'"
It was there held that a court outside of the county in which the land was situated had no jurisdiction and that the proper remedy of a defendant sued in the wrong county was not an application for change of venue but a motion to dismiss. In the opinion it is said:
"The court had no jurisdiction, and this is an objection which cannot be waived."
In Maguire v. Cunningham, 64 Cal.App. 536, 222 P. 838, 840, speaking of an action to quiet title, the court said:
"The filing of such an action in a county other than that in which is situated the real property involved is so completely a nullity that the venue cannot be changed to the county in which the property lies, for no court can have jurisdiction of such an action unless it was commenced in the county where the land is situated."
In Jones v. Redemption & Investment Co., 79 Kan. 477, 99 P. 1129, the jurisdiction of the court was challenged under a code provision that required that an action for the determination of any right or interest in real estate must be brought in the county where the land lies unless several tracts be involved in which event the action might *651 be brought in the county where any one of them is situated (Gen.St.1901, §§ 4476, 4477). The syllabus by the court states:
"A plaintiff brought an action in Sedgwick county to quiet his title to land in that county against certain defendants who claimed interests in that land only. In the same suit the plaintiff sought to quiet his title to land in Scott county against certain defendants who claimed no interest in the Sedgwick county land. Held, that the court had no jurisdiction over the Scott county branch of the controversy."
These and other cases (see Clarke v. Ward & Obenchain, 81 Or. 70, 158 P. 277, McNee v. Hart, 117 Okl. 220, 246 P. 373) support our conclusion that when the Legislature changed the statute so as to provide that actions involving real estate must be brought in the county in which the subject matter of the action or some part thereof is situated it intended to and did render the bringing of the action in the proper county a matter of jurisdiction rather than of venue and that unless the action is brought in the proper county the court has no jurisdiction over the subject matter. Jurisdiction of both the subject matter and the parties is essential to the rendition of a valid judgment or the making of a valid order affecting real estate in the instances enumerated in Section 28-0401, NDRC 1943. Herb v. Pitcairn, 384 Ill. 237, 51 N.E. 2d 277.
The order appealed from is void for want of jurisdiction on the part of the District Court of Pierce County and is therefore reversed.
GRIMSON, C. J., and SATHRE, JOHNSON, and BURKE, JJ., concur.
