The opinion of the court was delivered by
Johnston, C. J.:This was an action by the appellants, Frank L. Martin and Florence L. Sawyer, to quiet their title to a half-section of land situated in Jewell county. They alleged that they held the legal title, in fee simple and that Galen S. Battey and Galen S. Battey, jr., a minor, claimed some interest in the land and had represented to others that they had an interest in the land adverse to appellants, thus slandering the title and preventing appellants from making a sale of the land, but that appellees’ claim of title was illegally made and constituted a cloud and incumbrance on the land, and appellants therefore asked that their title be quieted.
Shortly after the original petition was filed it was amended by adding Marjorie Battey White, Charles Wheaton Battey, Walter Sibley Battey and Galen Bradford Battey as parties defendant and asking the quieting of the title as against the adverse claims asserted by the new parties. In an answer and cross-petition of the defendants they alleged that they were the owners of the property and had acquired it through the will of their grandmother, Pauline A. Battey, subject to a term estate for the use of Clara Ellen Battey so long as she should remain thg wife of Galen S. Battey, the son of the testatrix. It was alleged that the will was duly admitted to probate by the couny court of Bureau county, Illinois, where the testatrix resided at the time of her death, and that the will so probated had been duly-admitted to record and probate in the probate court of Jewell county and that letters testamentary were duly issued by that court.
*584The appellants for answer to the cross-petition pleaded a judgment of the district court of Reno county, Kansas, rendered April 9, 1902, in favor of Losada L. Battey, wherein he was plaintiff and all the appellants were defendants except Galen Bradford Battey, who was born after the rendition of the judgment, and they alleged that Losada L. Battey had since that time conveyed the land to appellants. The reply to this answer was that the court was without jurisdiction to render the Reno county judgment. On the issues formed a trial was had and the court made elaborate findings of fact and concluded that the title to the land was in the appellees, subject to the term estate of Clara Ellen Battey, and that this estate had passed and belonged to appellants.
It appears that the land involved here, as well as other tracts, was the property of Pauline A. Battey prior to and at the time of her death on July 11, 1897. The home of the family was in Bureau county, Illinois, and she left as survivors her husband, Owen W. Battey, and her two sons, Losada L. Battey and Galen S. Battey, who were her only heirs at law. A few weeks before her death she executed a'will, in which her husband was named as executor, and which was duly probated in Bureau county, Illinois. ■ Shortly after it was probated there an authenticated copy of the will and of the probate of the Illinois court was admitted to record in- the probate court of Jewell county and an executor appointed. In this will she gave a life estate in all of her property to her husband, and she gave Clara Ellen Battey, the second wife of her son Galen S. Battey, a term estate in the land in controversy, as well as in other land, and the remainder in fee simple to the children of Galen S. Battey. When Pauline A. Battey died Galen S. Battey had one child, called Marjorie, born of his first marriage. H'e was then living with his second wife, Clara Ellen Battey. Of the second marriage Walker Sibley Battey was born July 22, *5851897, Charles Wheaton Battey on February 7, 1899, and Galen Bradford Battey on May 22, 1903. In the will Losada L. Battey was given the use of real estate in Illinois and Kansas during his life, after which it was to pass to his children, if he had any. Authority was given to the executors to sell this land and reinvest the proceeds of it in other property for his use and benefit, if it was deemed profitable to do so. Owen W. Battey, the husband of the testatrix, qualified and acted as one of the executors of the will, and after taking legal advice as to his rights .as husband of the testatrix determined to take under the will, and he entered into possession of the property the use of which was devised to him. He never made a formal renunciation of his rights under the will. About a year and a half after the death of his wife Owen W. Battey died. A few months after the death of Owen W. Battey Losada L. Battey instituted an action in the Illinois court to contest the will of his mother, and after the issues were made up and the case was ready for trial he dismissed it. Prior to that time he had taken possession of the property the use of which was given to him by the will, arid he also received the rents and profits derived from it. •
' While the action to contest the will was still pending, and on February 17, 1900, he brought an action in Reno county, Kansas, naming Galen S. Battey and Clara Ellen Battey, his wife, and Marjorie Battey as defendants. He alleged that he was the owner of an undivided half of a tract of land in Reno county and of several tracts in Jewell county, and he asked for a partition of the same. The summons was served on Galen S. Battey and his wife in Mitchell county, but- his daughter, Majorie, who resided in Illinois, was not served. Galen S. Battey and his wife answered setting up the will and the proceedings under it, alleging that Clara Ellen Battey was in the exclusive possession of the land under the will as a term tenant, that Losada *586L. Battey had been given a life interest in certain lands under the will and that he had accepted the conditions of the will and entered into the use of the 'property so given to him, and that he had no interest of any kind in the land in Jewell county. On July 19, 1900, an amended petition was filed in that action, in which Charles Wheaton Battey and Walker Sibley Battey, the other children of Galen S. Battey then living, were named as defendants, and in it he described an additional tract of land in Jewell county, claiming to own a half-interest in it and alleging that defendants were in possession and receiving the rents and profits of it. Afterwards an affidavit was filed for service by publication on Marjorie Battey in which it was stated that the action was brought to determine the title to real estate and for a partition of the same. A summons against the infant boys was then sent to Mitchell county and a return made that service had been personally made upon them. The court appointed an attorney as guardian ad litem for the three minor defendants, who filed an answer which was a general denial and which invoked the protection of the court because of the tender years of these infant defendants.
Afterwards, and on October 11, 1900, a second amended petition was filed, in which the lands in Jewell county as well as in Reno county were described, and he alleged that he. owned a half interest in them; that the defendants owned the other half interest but the exact interest of each he did not know; that he was entitled to the immediate possession of his one-half but that they had wrongfully kept him out of the possession, and he stated that the value of the possession was $2000 per year from January 1, 1898, and defendants were therefore indebted to him in the sum of $8000. He asked judgment for partition and for possession- of his share and also for $8000, the value of the use while he was excluded from his land. A separate answer was filed by the guardian ad litem. *587which denied generally and also specially as to liability for rents and profits and alleged that the children owndd the Jewell county land through the will of their grandmother, and a recovery of the costs was asked. An answer was also filed for Galen S. Battey and Clara Ellen Battey setting out the will, its acceptance by the parties, and the disposition of the real estate in accordance with its terms, and alleging that Losada L. Battey was estopped to question its provisions and, further, was indebted to them for the use of property transferred by the will, and asked that they be reimbursed for expenditures which they had made on the property. On April 9, 1902, after a jury had been impaneled to try the case, the attorneys for Losada L. Battey and for Galen S. Battey and Clara Ellen Battey entered into negotiations for a settlement, and they finally made an agreement which .was reduced to writing. The parties to the agreement were Clara Ellen Battey and her husband and Losada L. Battey and his wife. No one else signed it, but it was submitted to the guardian acl litem for the minors. By it a settlement was made by these adult parties which adjusted differences which had arisen between them and recognized the interest of Losada L. Battey in property in Kansas, Illinois and Nebraska, and under which Clara Ellen Battey was to purchase his interest in the property for nine thousand dollars. He failed to carry out his part of the agreement, and after a suit had heen brought by Clara Ellen Battey to enforce the agreement, a new one was made between them by which deeds were exchanged between the adult litigants, and Clara Ellen Battey and her husband executed a quitclaim deed which purported to convey the land in controversy in this action. A judgment was entered decreeing a division of property, and which, among other things, adjudicated that Losada L. Battey was the owner of an undivided one-half of the land in controversy and directed a partition of *588the same. Commissioners to make the partition were named and they subsequently acted and reported their action to the court. The report was approved and filed in the district court in Reno county, although they did not view the land in Jewell county. A final order was made barring the children from any interest in the lands allotted to Losada L. Battey.
The principal question in the case is the effect of the Reno county judgment on the minors’ interests in the lands in Jewell county. Did the Reno county court acquire jurisdiction of the land in Jewell county or of the persons of the appellees? The petition filed there asked for partition, but the amended petition, under which an attempt was made to bring the minors into the case, proceéded on the theory that the plaintiff was out of possession and therefore a determination of the title and a recovery of possession was sought. The action was for the possession and partition of lands in Reno county as well as of tracts in Jewell county. The appellees, however, had no interest in the Reno county land ánd did not reside there. They claimed title to Jewell county land but had no concern as to what was doné with that in Reno county. How could an action be brought in Reno county to determine the title and recover an interest in real property in Jewell county? The code provides that an action “for the recovery of real property, or of any estate or interest therein, or for the determination in any form of any such right or interest, or to bar any defendant therefrom,” or “for the partition of real property,” must be brought in the county in which the real property is situated, unless it is an entire tract situated in two or more counties, in which event it can be brought in either county. (Civ. Code, § 48.) So strict is this requirement that if a party seeks to recover the possession of land and it consists of separate tracts in two or more counties separate actions must be brought in the counties where they are situated. This is true although the same *589parties are contesting for each of the tracts. In Jones v. Investment Co., 79 Kan. 477, 99 Pac. 1129, an action was .brought in Sedgwick county to quiet the title to land in Scott county against defendants who claimed no interest in the Sedgwick county land, and it was expressly held that the court had no jurisdiction over the Scott county lands. It was said:
“The question is not one of misjoinder of causes of action but is one of venue over disconnected and unrelated subjects of action, and the plaintiff could not enlarge the jurisdiction of the Sedgwick county court to include Scott county land claimed only by the plaintiffs in error by suing other defendants in Sedgwick county who claimed' Sedgwick county land only.” (p. 478.)
A party seeking to recover land can not compel another claiming interest in or title to it to litigate the title in any county except where the land is situated. Under the statute the subject of the action must be within the jurisdiction of the court and no judgment which it can render in one county, determining title or right of possession, can affect land in a distant county any more than such a judgment could affect land in another state. A judgment affecting title to realty can only operate on the res that is within the jurisdiction of the court rendering it. A party may rely on what is shown by the records of the court having jurisdiction and may safely purchase an interest without looking to the records in courts in other counties or states. Indeed, it has been held that a plaintiff, having brought an action for the recovery of real property in the proper county, can not, after the parties have appeared, amend and add a transitory cause of action. The two-can not be blended. (Neal v. Reynolds, 38 Kan. 432, 16 Pac. 785.) In Dwelle v. Hinde et al., 18 Ohio C. C. 618, the action was properly brought as to one branch of the case, but in another branch the plaintiff undertook to have an interest in *590real estate which was situated in another county determined, and it was held:
“As to the interest of such defendant in real estate located in another county, the court in such action would not acquire jurisdiction, and defendant can not be required to answer as to his interest in such land, and have his interest therein determined by the court in such action.” (Syl. ¶ 1.)
As the code specifically provides that actions for the recovery, partition, determination of an interest or sale of real property must be brought in the county where the real property is situated, except in the cases mentioned, there can be no jurisdiction of the subject matter of such an action in any other- county. If the court is asked to act upon the person of the defendant the action may be tried in any county where the defendant may be served and a lack of jurisdiction over him may be waived, but when the court is called upon to act upon real estate it is essential that the action shall be brought within the prescribed territorial jurisdiction, and if not brought there the court is without power to adjudicate the issues either with or without the consent of the parties. In Jacks v. Moore, 33 Ark. 31, which was an action for injury to real property, a question arose under a statute which provided that such an action must be brought in the county where the land is situated, and it was held that, although no exception was taken in the trial court as to jurisdiction, there was no authority to try the case, and that no consent of parties, either express or implied, could give jurisdiction to the court or validity to its judgment. In Ophir Silver Min. Co. v. Superior Court, 147 Cal. 467, 82 Pac. 70, an action to enjoin a trespass on land was held to be local and, being local, could only be brought in the state or county where the land was located, and not being brought there it should have-been dismissed as without jurisdiction. In Nashville v. Webb, 114 Tenn. 432, 85 S. W. 404, it was held that if *591a local action was brought in. the wrong county the court could acquire no jurisdiction of the suit and that consent itself could not give the court jurisdiction.
(See, also, Munger v. Crowe, 115 Ill. App. 189; Peterson v. Fowler, 73 Tex. 524, 11 S. W. 534; Den, Watson et al. v. Kelty et al., 16 N. J. Law, 517; The New Albany and Salem Railroad Company and Others v. Huff, 19 Ind. 444; Austin’s Heirs, etc. v. Bodley, 20 Ky. 434.)
There being no jurisdiction in the Reno county court as to the Jewell county lands its judgment did not affect the interests of the children named as defendants in that action in the lands in Jewell county, and certainly it could not affect the child born since the judgment was rendered. It is said that they were brought-into court and having litigated the question of partition are bound by the result of the litigation. The pleadings, as well as the affidavit for publication service, show that title to the land was involved and that the action was brought to determine the title and interest of the several parties in the land, and it was also stated that the appellees were in possession of the land in Jewell county. If it be assumed that a different rule applies in cases of partition than in those involving title it must, nevertheless, be held under the pleadings that the first question presented was the determination of the title and interests held by the respective parties. As the plaintiffs were out and the defendants were in possession claiming title under the will of their grandmother a determination of the title of the claimants was the first step in the litigation, and there could be no partition of land among the several owners until the question of title and ownership had been decided. (Delashmutt v. Parrent, 39 Kan. 548, 18 Pac. 712; Denton v. Fyfe, 65 Kan. 1, 68 Pac. 1074; Chandler v. Richardson, 65 Kan. 152, 69 Pac. 168; McNulty v. Bank, 69 Kan. 51, 76 Pac. 395.)
As appellees had no interest in the land in Reno county where that action was brought the court had *592no power to send process to Mitchell county for service upon the minors there nor to bring in any nonresident defendants for that purpose and thus force them to litigate in Reno county questions affecting the title to land in Jewell county.
The court undertook to appoint a guardian ad litem and named an attorney who was acting for the adult defendants, but the court had no power to make the appointment. Aside from the fact that the court had no jurisdiction of the subject matter of the action as against them the code provides that the appointment can not be made until after service of summons in the action as directed by the code, and this had not been done. (Civ. Code, § 32.) Service was not made on the father, mother, guardian, or person in control or with whom the infant defendants lived, as the law requires. (Civ. Code, § 77.) This is the process by which jurisdiction over minors is acquired, and the appointment of a guardian ad litem is a step which can only be taken after jurisdiction has been acquired. The attorney who was designated as guardian ad litem had no authority to bind the minors, and any part he may have taken in agreeing upon the terms of settlement preliminary to the entry of judgment was not binding on the minors and did not affect the interests they held in the land in Jewell county.
It is contended that, regardless. of the effect of the Reno county judgment, Losada L. Battey was entitled to a share of the estate of his father, Owen W. Battey,. who, it is claimed, acquired an undivided one-half of the land owned by his wife at the time of her death. This is upon the theory that the laws of Kansas, where the land is situated, govern in the matter of election, whether the' living spouse shall take under the will or ' under the law, and that a valid election to take under the will was not made by Owen W. Battey. The testae trix, and her husband were domiciled in Illinois and the land in that state was devised by the will. By the *593terms of the will Owen W. Battey, the husband, was given the use of all the property of the testatrix during his natural life and after his death it was' to go to the children in the proportions heretofore stated. After her death, and after having taken legal advice, he announced that he did not intend to renounce the will, as he might have done under the laws of Illinois, but did desire that the terms of the will should be fully carried out. The trial court found that he consulted a lawyer as to his rights and was advised as to the share of the real estate which he would take under the laws of Illinois but that it did not appear that he was ever advised what were the rights of a surviving husband under the laws of Kansas, and no formal election was ever made by him in Kansas. It was also found that not only did he determine to take under the will but that he took possession of the land in controversy, and, so far as he was able to do so, he accepted and enjoyed the benefits of the will. He was adjudged insane on July 5, 1898, less than a year after the death of his wife, and his conservator remained in possession of the personal property until his death, which occurred the following January. It thus appears that a binding election was‘made in Illinois and the question arises: Was it effective as to the Kansas land? Is a second election necessary, and can it be that the surviving husband can claim under the will in one jurisdiction and against it in another? ■ It is true that the laws of the state in which the lands lie control as to the descent or transfer of title of such land by will. There is some conflict of authority as to whether the rules of interpretation of the domicile of the testator or of the place where the land is located shall control in determining whether the testator intended that the gift to the survivor was intended to be in lieu of dower or in addition to dower and whether the acceptance of the gift precludes a taking under the law. In a case where the domicile was New York and some land de*594vised was situated in Virgina it was held that the right of the widow to dower in land in Virginia should be determined by the rule in New York rather than by the rule in Virginia. (Bolling v. Bolling, 88 Va. 524, 14 S. E. 67.) In Massachusetts it was held that the rule of the domicile did not control on this question. (Staigg v. Atkinson, 144 Mass. 564, 12 N. E. 354.)
(See, also, Atkinson v. Staigg, 13 R. I. 725; 2 Wharton on the Conflict of Laws, 3d ed., § 592.)
In respect to an election it was held that where there is an election, or rather, the renunciation of a foreign will made in a foreign jurisdiction, it will be respected in the state of the domicile and should have the effect there upon the widow’s rights as that law allows. (Mary J. Wilson v. Rebecca Cox et al., 49 Miss. 538.) In the opinion it was remarked:
“If she abandons the will, then her rights of property, wherever situated, are determined by the law of the testator’s domicile. There can be but one renunciation where the estate is dispersed in several jurisdictions. The widow can not elect in one forum to abide by the will, and abandon.it in another. Her election, if made at all, must be in the forum of the original probate, whose laws fixes her rights as distributee in all the jurisdictions where property may be situated.” (p. 545.)
In Waterfield v. Rice, 111 Fed. 625, it was decided that a provision in an Ohio statute requiring an election by the widow to take under the will only applied to wills made in Ohio and was inapplicable to foreign widows, and that when a will made and probated in another state was brought into Ohio and there probated and recorded as a foreign will it was deemed to be properly proved and that there had been an election to také under the will in the domicile of the testator. In Apperson, Ex’r, v. Bolton et al., 29 Ark. 418, it was ruled that the right óf a widow to renounce the provisions of a foreign will and to take dower out of lands in Arkansas was governed by the laws of that state, *595but that if there was an acceptance of the will in the state of Tennessee, the state of the domicile, she could not make a different selection in Arkansas. It was said (p. 429) that “it is a general principle of law that one can not claim under a will and against it too, and an acceptance of the provisions of the will in Tennessee would bind her everywhere,” citing Jones v. Gerock, (N. C.) 6 Jones Eq. 190, 194, and Blunt & al. v. Gee & al., (Va.) 5 Call, 481, 492. In Washburn v. Van Steenwyk, 32 Minn. 336, a party residing in Wisconsin owned land in Minnesota. He died in Wisconsin leaving a will which disposed of all his property. The laws of that state gave the widow dower but provided for an election by her whether she would take under the will or under the law. The widow was insane and her guardian filed a notice electing to take under the law. An action was brought in Wisconsin to construe the will, and if it should be determined to be a case for an election by the widow to have the court make such election. It was determined that the bequest was intended by the testator to be in lieu of dower and that it was a case for election and the court made the election.. It was held by the Minnesota court that the determination of the Wisconsin court was conclusive between the parties, and that while the probate court of Minnesota had authority to make an election, if in fact no election had been made there, the Wisconsin court had full authority to make an election and the election which it did make was effectual everywhere. Following these 'authorities the acceptance of the benefits of the will by Owen W. Battey in Illinois was operative as an election there and is equally effectual in Kansas. Under the Illinois statute if there is no affirmative act of election and no renunciation of the provisions of the will within one year after letters testamentary or of administration are issued the survivor is deemed to have elected to accept the provisions of the will. (Rev. Stat. of Ill., 1911, ch. 41, § 11.) There never was a renunciation of the *596will by Owen W. Battey nor by anyone for him. On the other hand, he went 'into possession of the property given to him by the will, declaring his approval of it •and a decision to conform to its requirements and to •carry out its provisions. If it could be said that there was no election by him in Illinois and the question of •election had arisen when the will was presented for probate in Kansas it must have been held that the declarations and acts of Battey amounted to an election to take under the will. It has been held that a record is not the ■only proof of such an election but that one may be made by acts in pais providing an intelligent and deliberate choice is made. (Reville v. Dubach, 60 Kan. 572, 57 Pac. 522; Medill v. Snyder, 61 Kan. 15, 58 Pac. 962; Williams v. Campbell, 85 Kan. 631, 118 Pac. 1074.)
It is true there is no showing that the law of Kansas in regard to an election was explained to the testator, but on the testimony it can not be inferred that he was ignorant of his rights or that he did not make a deliberate and intelligent choice.
When the ancillary proceedings were taken in Kansas and the authenticated will recorded here it imported regularity and validity and was sufficient to establish testamentary title to the lands therein devised.
We find no error in the proceedings and therefore the j udgment of the district court is affirmed.
Smith, J., not sitting.