
252 Cal.App.2d 604 (1967)
RIVER FARMS, INC., Petitioner,
v.
THE SUPERIOR COURT OF SAN BERNARDINO COUNTY, Respondent; ERWIN P. WERNER et al., Real Parties in Interest.
Civ. No. 8590. 
California Court of Appeals. Fourth Dist., Div. One.  
July 14, 1967.
 Collins & Woolway and Chaplin E. Collins for Petitioner.
 Stanford D. Herlick, County Counsel, and Donald R. Egan, Deputy County Counsel, for Respondent.
 Erwin P. Werner, in pro. per., and Charles Murstein for Real Parties in Interest.
 Thomas C. Lynch, Attorney General, Walter S. Rountree, Assistant Attorney General, and David B. Stanton, Deputy Attorney General, appearing as Amici Curiae on invitation of the Court of Appeal.
 WHELAN, J.
 This proceeding in prohibition was brought to restrain the Superior Court of San Bernardino County from proceeding further in a quiet title action, the subject matter of which is alleged in the petition to be in the State of Arizona.
 Petitioner (River Farms, Inc.), an Arizona corporation, is a defendant in the quiet title action.
 The real parties in interest are Erwin P. Werner and *606 Marjorie A. Werner (Werner), plaintiffs in the quiet title action.
 The original complaint in the quiet title action filed July 6, 1966 alleged that certain described real property is in the County of San Bernardino, State of California.
 Following the sustaining of a demurrer to that complaint, an amended complaint was filed on October 12, 1966 and contained the same allegations with regard to the property.
 To that amended complaint defendant filed a demurrer on general grounds and upon the grounds of limitations and laches; also, a motion to strike the complaint and amended complaint upon the ground, among others, that the court does not have jurisdiction of the subject matter of the action in that the land involved is in the State of Arizona.
 On August 11, 1966, the President approved the law by which the Congress of the United States gave consent to the Interstate Compact between California and Arizona, defining the boundaries between those states. The compact is found in section 176, Government Code; the act of the California Legislature approving and ratifying the compact is in section 175, Government Code.
 The only affidavits on behalf of Werner before the court at the time of ruling on defendant's motion, or which are in the record before us, admit that since August 11, 1966 the land involved is in Arizona.  [fn. 1]
 The court overruled the demurrer and denied petitioner's motion to strike. [1] Petitioner presents argument with regard to the ruling on the demurrer. It is obvious that questions as to limitations may depend upon evidence to be produced. *607 Nothing on the face of the complaint showed lack of jurisdiction. While the court properly would have noticed judicially the boundary between Arizona and California as established by the 1966 compact, the identification of the land described in the complaint as being on one side or the other of that line might well call for evidence. (People v. Oakland Water Front Co., 118 Cal. 234, 246- 247 [50 P. 305].) The contents of the affidavits, so far as the ruling on the demurrer was concerned, were not to be considered. (Kadota Fig Assn. v. Case-Swayne Co., 73 Cal.App.2d 796, 803 [167 P.2d 519].) The ruling on demurrer as to the general grounds was proper.
 We concern ourselves only with the question whether the court, in the face of petitioner's motion, had jurisdiction to do other than dismiss the action because the land which is the subject matter of the action is now in Arizona.
 Jurisdiction
 [2] Granted that property now in Arizona was prior to the 1966 compact in San Bernardino County, California, as we must assume from the allegations of the original complaint, the court initially had jurisdiction to maintain the action. Has the court been divested of jurisdiction to try the action on the merits because of a change in the boundary between the two states as a result of which the land is found to be in Arizona since August 11, 1966?
 Judicial power is but one of the aspects of sovereignty; another is the power to tax which does not extend beyond the territorial limits of the state. (See Central R. Co. v. Jersey City, 209 U.S. 473 [52 L.Ed. 896, 28 S.Ct. 592].) When the State of California divested itself of sovereignty over all lands east of the newly defined boundary, the state's judicial arm did not maintain a life independent of the state sovereignty of which it was but a part, unless such jurisdiction was saved as to pending litigation by the 1966 compact.
 Van Ness v. Bank of the United States, 38 U.S. 17 [10 L.Ed. 38], considered the effect of legislation by which Maryland ceded to the United States and the United States accepted the territory which became a part of the District of Columbia. The act of 1791, ceding the territory, provided that Maryland would retain jurisdiction over persons and property in the area ceded until Congress provided law for government of the area under their jurisdiction. Congress assumed jurisdiction on February 27, 1801.
 The Supreme Court said, at page 40, with regard to the *608 effect of the legislation by which jurisdiction was assumed: "We have already stated the provisions of the act of Assembly of Maryland; and Congress in assuming the jurisdiction recognized the rights of the State courts, and by the 13th section of the Act of February 27th, 1801, placed judgments and decrees thereafter to be obtained in the State courts, in suits then pending, upon the same footing with judgments and decrees rendered before. In either case, upon filing an exemplification of the proceedings had in the State courts, it authorized process of execution from the District Court of the United States, in the same manner as if the judgment or decree had been there rendered. It makes no exception in regard to real property situated in the district, and the rights to such property then in litigation are placed on the same ground with rights to personal property and personal rights; and like them, are left to the final adjudication of the courts of the States."
 The 1966 compact and the legislation ratifying it with which we are concerned contain no such comprehensive provisions, but seem to secure only existing property rights in property previously a part of California, rather than to preserve territorial jurisdiction of the California courts.
 Section 4 of Statutes 1963, chapter 859, page 2089, enacted by the State of California in conjunction with ratification of the compact, contains a provision for the preservation of rights or titles to land which were previously a part of California and are now a part of Arizona or vice versa. Section 5 of the same chapter provides for the recordation of documents affecting the title to the lands which were considered to be in Arizona but which under the terms of the compact are within the boundaries of California.
 The language of section 5, chapter 77, laws of Arizona, 1963, is the same as that of section 4 of the California statute. Section 6, chapter 77, Laws of Arizona, 1963, is similar to section 5 of the California statute, varying only in that the Arizona law provides for recording of titles in Arizona to land previously considered to be in California.  [fn. 2]*609
 We conclude that the court's jurisdiction over the property involved terminated when the State of California divested itself of sovereignty over the property. (Cf. McNulty v. Batty, 51 U.S. 72 [13 L.Ed. 333, 576].)
 Prohibition As A Proper Remedy
 [3] In prohibition we are limited by statute to proceedings without or in excess of jurisdiction.
 When the trial court has heard and determined that it has jurisdiction, prohibition will lie to prevent the exercise thereof when that jurisdiction is challenged in that court by demurrer, motion, plea or other objection. When the trial court has heard and determined the jurisdictional challenge and has decided in favor of its own jurisdiction, and then proceeds to act--to try the cause on its merits--it may then be claimed that a court without jurisdiction is purporting to exercise it. Then jurisdiction to determine jurisdiction has been exercised and the higher courts will restrain the lower court from acting in excess of its jurisdiction. (Harden v. Superior Court, 44 Cal.2d 630, 634 [284 P.2d 9].)
 Prohibition will issue to restrain any court action other than dismissal where it is mandatory that the court dismiss. (Douglas v. Superior Court, 94 Cal.App.2d 395 [210 P.2d 853].)
 As the result of matters occurring pendente lite, a court that had jurisdiction to entertain an action when it was commenced sometimes may have no jurisdiction to do other than abate the action by dismissal. (Blodgett v. Greenfield, 101 Cal.App. 399 [281 P. 694].)
 Trial of an action which involves determination of title to real property in another state is beyond the jurisdiction of the superior court of this state, and prohibition will lie to prevent the trial thereof. (Ophir Silver Min. Co. v. Superior Court, 147 Cal. 467, 478 [82 P. 70, 3 Ann.Cas. 340].)
 Effect Of The Compact As To Jurisdiction When Action Was Commenced
 [4a] One of the claims asserted by petitioner is that by the 1966 compact the State of California has agreed that all land now within the Arizona boundary was a part of Arizona *610 ever since that state was created. Poole v. Fleeger, 36 U.S. 185 [9 L.Ed. 680], is cited as compelling such a conclusion.
 With that interpretation of the decision of Poole v. Fleeger, we disagree. Its holding was that the northern boundary of North Carolina, which became also the northern boundary of Tennessee, had always, prior to a compact between Tennessee and Kentucky, been 36 degrees, 30 minutes north lattitude; that a surveyor's line known as "Walker's line," which was north of the true line of 36 degrees, 30 minutes, was by compact of 1820 between Tennessee and Kentucky declared to be the boundary between those states. The action involved title to land between the two lines, conflicting claims to which were based on conflicting grants from North Carolina and Virginia, made before Tennessee and Kentucky were established as states. In holding that North Carolina had no jurisdiction over the area in question, the court said at page 210: "... Walker's line is agreed to be in future the boundary between the two States, it is not so established as having been for the past the true and rightful boundary; on the contrary, the compact admits the fact to be the other way. While the compact cedes to Tennessee the jurisdiction up to Walker's line, it cedes to Kentucky all the unappropriated lands north of the latitude of thirty-six degrees thirty minutes north. It thus admits, what is in truth undeniable, that the true and legitimate boundary of North Carolina is in that parallel of latitude; and this also is declared in the charter of Charles II and in the Constitution of North Carolina to be its true and original boundary. It goes farther and admits that all claims under Virginia to lands north of that boundary shall not be prejudiced by the establishment of Walker's line, but such claims shall be considered as rightfully entered or granted. The compact does, then, by necessary implication, admit that the boundary between Kentucky and Tennessee is the latitude of thirty-six degrees thirty minutes; and that Walker's line is to be deemed the true line only for the purpose of future jurisdiction."
 Our interpretation of Poole v. Fleeger, supra, 36 U.S. 185, is in accord with that of the United States Supreme Court in Coffee v. Groover, 123 U.S. 1 [31 L.Ed. 51, 8 S.Ct. 1].
 The 1966 compact states in Article I that: "The boundary between the States of Arizona and California ... has become indefinite and uncertain ... with the result that a state of confusion exists as to the true and correct location of the boundary. ..." *611
 Article III, section 4 of the compact indicates that property once a part of California has by the compact become a part of Arizona.
 The compact does not fix retrospectively the boundary that it defines.
 It is clear from the case of Sherrill v. McShan, 356 F.2d 607, referred to by both petitioner and Werner, that the federal courts have recognized that the boundary between Arizona and California prior to the 1966 compact was the midline of the main channel of the Colorado River as such channel was located in 1912; and that between 1912 and 1935 the river, along a part of its course, rechanneled itself to a point west of the 1912 main channel, thereby placing east of the new channel lands that were in California in 1912, which included land that had accreted as the result of eastward movement of the river channel prior to 1912.
 Is There Any Possible Relief Within The Court's Jurisdiction To Grant?
 [5] It is suggested by respondent that since the court has jurisdiction of the parties and, therefore, to grant any in personam relief to which plaintiff might be entitled, the action should not be dismissed; that Werner should be allowed to amend to seek in personam relief of the kind given in Beeler v. Beeler, 193 Cal.App.2d 548 [14 Cal.Rptr. 460], and Taylor v. Taylor, 192 Cal. 71 [218 P. 756, 51 A.L.R. 1074].
 There are certain objections to such a course, and in Ophir Silver Min. Co. v. Superior Court, supra, 147 Cal. 467, 478, such a solution was rejected. Moreover, it is unlikely that the equitable grounds exist for such relief as was given in Beeler and Taylor, supra.
 Petitioner is a foreign corporation. Whether it does business in California is unknown, as is the method by which jurisdiction in the quiet title action was obtained over petitioner. There are valid grounds of objection against requiring a defendant who has appeared in an action in rem in response to substituted service to submit to an amended complaint seeking in personam relief. (See Fidelity & Cas. Co. of New York v. Bank of Plymouth, 213 Iowa 1058 [237 N.W. 234]; Cheshire Nat. Bank v. Jaynes, 224 Mass. 14 [112 N.E. 500]; Salmon Falls Mfg. Co. v. Midland Tire & Rubber Co., 285 F. 214; Zeide v. Flexser, 175 Misc. 911 [25 N.Y.S.2d 610]; Paprin v. Bitker, 65 N.Y.S.2d 289; 10 Hastings L.J. 139 [Limitations on the Exercise of Jurisdiction in Personam]; and 10 *612 Stan.L.Rev. 584 [Service of Process: "Fair Play" for the Nonresident Invitee]; see also articles in 18 Fordham L.Rev. 73; 19 Fordham L.Rev. 125; 25 Iowa L.Rev. 329; 8 U. of Pitt. L.Rev. 223; Rest., Judgments,  5.)
 [4b] Petitioner urged in the court below that the property in question was always in Arizona. That allegation was made as a statement of fact; and also in arguing that such is the compelling effect of the 1966 compact. Petitioner appeared to contest jurisdiction of the subject matter not only after the compact was approved by the Congress, but at the time the action was commenced. In the latter aspect, no undue prejudice would result to petitioner if the issue were decided by the lower court as to what was the course of the natural channel of the Colorado River on and prior to July 6, 1966.
 The trial court had jurisdiction initially to determine whether the property was in San Bernardino County at the time of the commencement of the action. And, but for the admissions in the record that since August 11, 1966 the property is in Arizona, the court's jurisdiction to determine whether the property continued to be in California after the compact would have been unimpaired.
 A state court has the power to determine, as between private contestants, the disputed question whether real property is within its boundaries or is in a neighboring state, where the fact depended upon the effect of the shift of the course of the boundary river. (Durfee v. Duke, 375 U.S. 106 [11 L.Ed.2d 186, 84 S.Ct. 242].)
 Section 1060, Code of Civil Procedure, provides: "Any person ... who desires a declaration of his rights or duties with respect to ... the location of the natural channel of a watercourse, may, in cases of actual controversy relating to the legal rights and duties of the respective parties, bring an original action in the superior court ..."
 It is clear that Werner claims rights whose existence depends upon the location of the natural channel of the Colorado River as it was in 1912; a determination of the relationship of that channel to the lands in question was one of the issues petitioner prepared itself to meet when it appeared in the action in the court below, and one that the superior court was required to meet to decide its initial jurisdiction.
 If the court below were to permit Werner to amend, asking for declaratory relief on that question, no violence would be done to the principle that in personam jurisdiction should not *613 be imposed on a nonresident defendant who has appeared voluntarily in an in rem proceeding.
 Moreover, the courts of California have a proper interest in determining whether certain lands that are now a part of the State of Arizona "were previously a part of the State of California."
 A peremptory writ of prohibition should issue restraining the respondent court from proceeding further with Action No. 132282 as an action to quiet title, or otherwise trying the title to the real property involved, or otherwise proceeding in said action except, and within the discretion of said court, to permit the plaintiffs in said action to file an amended complaint, if they are so advised, asking for a declaration as to the location of the real property with relation to the natural channel of the Colorado River as it was in 1912; and if such amendment be permitted and filed to try those issues only.
 Each party shall bear its own costs for this proceeding.
 Brown (Gerald), P. J., and Coughlin, J., concurred.
NOTES
[fn. 1]  1. The affidavit of Erwin P. Werner states: "Naumann on page 2 of his affidavit states the land in question is now in Arizona. Such is true as of August 11, 1966, but was not true on July 6, 1966. ... The 9th Circuit Court holds that the land in question was in California until the boundary compact went into effect August 11, 1966. Specifically, the land was in California July 6, 1966." The affidavit of Harold Workman, deputy assessor of San Bernardino County, states: "Said property lies on both sides of the present Colorado River, and was in the State of California until the president of the United States signed Congressional Bill H.R. 14578 on August 11th, 1966, establishing the new boundary between the States." In Werner's answer to petition for writ of prohibition, he states: "The real parties in interest deny that the Superior Court acted in excess of jurisdiction and further denies petitioners' allegations that at time of filing the original complaint the property in question was in Arizona, but on the contrary was in the State of California. ... It is understood that the State of Arizona acquired California lands subject to all rights and equities of the owners. To deny plaintiff's rights established prior to August 11th, 1966, may be tantamount to confiscating of plaintiff's lands ..."
[fn. 2]  2. The full text of section 4 of chapter 859, Statutes of 1963, reads: "Nothing contained in the provisions of this act, or any operation thereof, shall prejudice the titles, rights or claims of any person, public or private, natural or artificial, to any of the lands herein involved whether such titles, rights or claims arise or exist upon the basis that the lands affected by the designation of boundary as set forth in the compact and in this act were previously a part of the State of Arizona and have now become a part of the State of California, or were previously a part of the State of California and have now become a part of the State of Arizona or otherwise; and no person shall be prejudiced in the water rights which he now has by reason of anything contained in this act."
