MR. JUSTICE HOLLOWAY
delivered the opinion of the eourt.
In an action pending in Silver Bow county, wherein William H. Hall was plaintiff, and Thaddeus S. Lane, a resident of Spo*504kane, Washington, was defendant, service of summons was made in Butte, while Lane was there for the sole purpose of attending the district court as a witness. A motion to quash the service was overruled. In the absence of the defendant and his counsel, and by order of the court, the defendant was directed to answer within twenty days. Pursuant to the order an answer was filed, admitting some of the allegations of the complaint and denying all others. Application was then made to this court for a writ of prohibition to stay further proceedings. Three questions are presented: (1) Was Lane exempt from service of summons under the circumstances ? (2) Was service of summons waived by filing the answer? and (3) Is prohibition an available remedy?
1. The overwhelming weight of authority in this country sustains the rule announced in 32 Cyc. 492, as follows: “Suitors [1] and witnesses coming from foreign jurisdictions for the sole purpose of attending court, whether under summons or subpoena or not, are usually held immune from service of civil process while engaged in such attendance and for a reasonable time in coming and going.” Considerations of public policy and the due administration of justice prompt the enforcement of the rule, to the end that the personal presence of witnesses from foreign jurisdictions in the local courts may be encouraged.
In Diamond v. Earle, 217 Mass. 499, Ann. Cas. 1915D, 984, 51 L. K. A. (n. s.) 1178, 105 N. E. 363, the court expressed itself upon the subject as follows: “The rule has been stated generally that suitors and witnesses from a foreign judisdiction are exempt from service of civil process while attending court and for such reasonable time before and after as may enable them to come from and return to their home. This statement is broad enough to include the parties plaintiff as well, as defendants and witnesses. The rule is an ancient one. The reason upon which it rests is that justice requires the attendance of witnesses cognizant of material facts, and hence that no unreasonable obstacle ought to be thrown in the way of their freely coming into court to give oral testimony. Nonresidents cannot be compelled *505to come within the jurisdiction to testify. As such testimony may be essential in the due administration of justice, they ought to be protected in coming voluntarily into our courts to aid in the ascertainment of truth and in the accomplishment of right results by the courts. It is not merely a privilege of the person; it is a prerogative exerted by the sovereign power through the courts for the furtherance of the ends of justice. Every party has a right to testify in his own behalf. He cannot do this freely, if hampered by the hazard that he may become entangled in other litigation in foreign courts. The rule is applied almost universally in behalf of witnesses coming from a foreign state.” (Skinner, Mounce & Co. v. Waite, 155 Fed. 828; Fox v. Hale etc. Min. Co., 108 Cal. 478, 41 Pac. 328; Wilson v. Donaldson, 117 Ind. 356,10 Am. St. Rep. 48, 3 L. R. A. 266, 20 N. E. 250; Coatsworth v. Wayne Circuit Judge, 177 Mich. 565, 143 N. W. 881; Cooper v. Wyman, 122 N. C. 784, 65 Am. St. Rep. 731, 29 S. E. 947; Andrews v. Lembeck, 46 Ohio St. 38, 15 Am. St. Rep. 547, 18 N. E. 483; Malloy v. Brewer, 7 S. D. 587, 58 Am. St. Rep. 856, 64 N. W. 1120.)
We think the trial court erred in refusing to quash the service of summons.
2. Does a party who appears specially to test the jurisdiction [2] of the court, and who reserves his exception to the adverse ruling upon his motion, waive the advantage by his general appearance thereafter? Upon this question the authorities are in hopeless conflict. The author of the article on Appearances, in 3 Cyc. 525, treats the subject as follows: “In many jurisdictions the rule is well settled that, where a defendant appears specially, any error of the court in deciding adversely to him is waived by a subsequent general appearance; though in many others, and by what seems the sounder reasoning, it is held that a defendant does not lose the benefit of his attack on the jurisdiction by thereafter answering and pleading to the merits, provided he obtain a ruling in relation to the objection to jurisdiction, and save exceptions to such ruling. ’ ’ To the same effect are: *5062 R. C. L. 339; 2 Ency. Pl. & Pr. 629. In the note to Fisher v. Crowley, 4 Ann. Cas. 290, will be found collected the cases which sustain the doctrine that such appearance does not constitute a waiver of the defective process or service.
In Black v. Clendenin, 3 Mont. 44, the court, considering the question now before us, said: “The respondent insists that the appellant waived these errors and irregularities by filing his answer and proceeding to a trial. This position is not tenable. It has been held in California that a party who moves to dismiss a defective summons or set aside the return of the service of a summons, and saves his exception to the action of the court in overruling the motion, does not waive his right to be heard thereon upon appeal, by appearing subsequently and answering and submitting to a trial. (Deidesheimer v. Brown, 8 Cal. 339; Gray v. Hawes, 8 Cal. 562; Lyman v. Milton, 44 Cal. 630; Kent v. West, 50 Cal. 185, 186.) The exceptions of the appellant were saved properly, and were not waived by his conduct in the action after the motions to set aside the proceedings under the summons and subpoena were refused.” About the' same time the supreme court of the United States, in Harkness v. Hyde, 98 U. S. 476, 25 L. Ed. 237, reached the same conclusion, which was later approved in Southern Pac. Co. v. Denton, 146 U. S. 202, 36 L. Ed. 942, 13 Sup. Ct. Rep. 44.
Counsel for respondents, however, insist that in State ex rel. Mackey v. District Court, 40 Mont. 359, 135 Am. St. Rep. 622, 106 Pac. 1098, the decision in Black v. Clendenin was in effect, if not in fact, overruled. Black v. Clendenin involved the precise question now under consideration. State ex rel. Mackey v. District Court involved a question of waiver under these circumstances : In the case of Lemcke v. Mackey et al., substituted service upon nonresident defendants was sought to be made. Mackey appeared specially to question the jurisdiction of the court, and, his objection being overruled, he then applied to the court for, and secured, an order granting him forty days within which to answer to the merits. The decision in Black v. Clendenin proceeds upon the theory that the answer to the merits *507being made by order of the court, was not altogether the voluntary act of the defendant and therefore not a waiver. In State ex rel. Mackey v. District Court, we held that defendant Mackey could not invoke the jurisdiction of the court to secure an order advantageous to him, and at the same time insist that the court was without authority to make the order. The distinction between the principles involved in these cases is recognized by the authorities generally. (2 Ency. Pl. & Pr. 630.) In order for a general appearance to constitute a waiver of defective process or service, it must be voluntary. (Rev. Codes, sec. 6526.) A party ought not to be deemed to have waived a right unless his intention to do so is manifest. “A waiver is the intentional relinquishment of a known right, or such conduct as warrants an inference of the relinquishment of such right. ’ ’ (State ex rel. Driffill v. City of Anaconda, 41 Mont. 577, 111 Pac. 345; Murray v. Heinze, 17 Mont. 353, 42 Pac. 1057.
Since this relator made a proper objection to the jurisdiction of the lower court, saved his exception, and in his answer again reserved the question which he had raised by his special appearance, we think he ought not to be held to have waived whatever advantage he had obtained.
A party who suffers an adverse ruling upon his demurrer or upon the introduction of evidence does not waive the advantage by submitting to the ruling and proceeding according to the court’s views. If the trial court commits error in passing upon a motion for change of venue or a challenge to a juror, the exception properly saved is available on appeal though the party against whom the ruling is made, proceeds to trial in that court and submits his controversy to the objectionable juror. So, likewise, an exception to an order overruling a motion for nonsuit is not waived by proceeding with the trial, the defendant merely assuming the risk of supplying the deficiencies in the plaintiff’s case. (Cain v. Gold Mt. Min. Co., 27 Mont. 529, 71 Pac. 1004.) These illustrations serve only to emphasize the rule that a party who once saves his exception shall not be deemed to have waived it unless his intention to do so is manifest. In Black v. Clen*508denin there was not anything from which an intention to waive could be inferred; while in State ex rel. Mackey v. District Court the application to the court for á favorable order indicated the purpose to submit to the jurisdiction which had theretofore been questioned. Mackey could not be in court for the purpose of securing an advantageous order, and out of court for every other purpose.
We think the objection to jurisdiction was not waived by relator’s general appearance.
3. It is urged that the remedy by appeal from an adverse final judgment is available to the relator, and that the writ of [3] prohibition should be denied for that reason. While our Code provides that the existence of a remedy by appeal will defeat the right to relief by certiorari (Rev. Codes, sec. 7203), the like provision is not found in the section applicable to the writ of prohibition. Unless the remedy by appeal, or by other proceeding, is plain, speedy and adequate, relief by prohibition may be granted in a proper ease (Rev. Codes, sec. 7228). The existence of a remedy by appeal does not necessarily defeat the right to relief by prohibition. (State ex rel. Marshall v. District Court, 50 Mont. 289, 146 Pac. 743.) An application of this character is addressed to the sound discretion of this court (State ex rel. Mackel v. District Court, 44 Mont. 178, 119 Pac. 476) ; and whenever it is made to appear, as in this instance, that under no conceivable circumstances can the district court render a valid judgment because of a lack of jurisdiction, the discretion should be exercised in favor of issuing the writ, to the end that litigants may be saved the needless trouble and expense of prosecuting their litigation to a fruitless judgment.
The peremptory writ will issue in conformity to the prayer of the petition.
Writ issued.
Mr. Chief Justice Brantly and Mr. Justice Sanner concur.