
40 Cal.2d 289 (1953)
VIRGINIA VELKOV, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; J. GEORGE GOLD et al., Real Parties in Interest.
L. A. No. 22582. 
Supreme Court of California. In Bank.  
Feb. 20, 1953.
 C. E. Spencer for Petitioner.
 Harold W. Kennedy, County Counsel, and William E. Lamoreaux, Deputy County Counsel, for Respondent.
 Leonard Horwin and Harry M. Fain for Real Parties in Interest.
 EDMONDS, J.
 Virginia Velkov seeks a writ of prohibition to restrain the superior court from proceeding with a certain civil action in which she is named as a defendant. She bases her claim for such relief upon the ground that the court in which that action is pending has no jurisdiction of her person.
 By her petition, Mrs. Velkov states that she is a resident of the State of New York. Gold and Needleman, the real parties in interest, have brought an action for declaratory relief against her and her former husband. The action is now pending in the Superior Court of Los Angeles County. When she came to California, at the request of The State Bar, to testify in a disciplinary proceeding before that body, she was served with summons. *291
 Mrs. Velkov appeared specially and moved to quash the summons, but, after a hearing, her motion was denied. At a subsequent hearing for the purpose of taking her deposition she again objected to the jurisdiction of the court and refused to answer the questions propounded to her, for which refusal she is now threatened with punishment for contempt.
 Her challenge to the jurisdiction of the court is based upon the contention that, as a nonresident appearing in this state solely for the purpose of testifying in a proceeding before The State Bar, she was immune from service of civil process. Unless prohibited from doing so, she asserts, the court will proceed with the action, and she is without a speedy and adequate remedy in the ordinary course of the law.
 By answer, Gold and Needleman deny the alleged lack of jurisdiction. They contend that the local administrative committee of The State Bar, before which the disciplinary proceeding was conducted, is not a judicial tribunal. For that reason, they say, a nonresident witness before it may not claim immunity from service of process in another action or proceeding. Furthermore, they argue, the subject matters of The State Bar proceeding and the declaratory relief action are the same and, under such circumstances, the rule of immunity does not apply.
 Another contention is that Mrs. Velkov has failed to meet the burden of showing that she is a resident of another state. Finally, they assert that by making certain objections to questions presented in the hearing of the motion to quash the summons and in the deposition proceeding, the petitioner made a general appearance and thus waived jurisdictional defects.
 [1] It is a rule of general application that, during a period reasonably necessary to the giving of testimony in a judicial proceeding, a nonresident witness who enters a state primarily for that purpose is immune from service of summons. (Murrey v. Murrey, 216 Cal. 707, 710 [16 P.2d 741, 85 A.L.R. 1335]; Fox v. Hale & Norcross S. M. Co., 108 Cal. 369, 424 [41 P. 308]; Franklin v. Superior Court, 98 Cal.App.2d 292, 294 [220 P.2d 8]; Gerard v. Superior Court, 91 Cal.App.2d 549, 552 [205 P.2d 109]; Lamb v. Schmitt, 285 U.S. 222, 225 [52 S.Ct. 317, 76 L.Ed. 720]; Stewart v. Ramsay, 242 U.S. 128, 129 [37 S.Ct. 44, 61 L.Ed. 192].) [2] The rule is based upon public policy and, even though in derogation *292 of the rights of the individual litigant, is justified by the public interest served by the granting of immunity.
 [3] In its common law inception, the privilege was that of the court and was formulated to prevent interruptions and delays in judicial proceedings occasioned by necessary participants being required to defend against other actions. (Lamb v. Schmitt, supra.) The courts increasingly have emphasized the interest advanced by the voluntary appearance of a nonresident who could not otherwise be made to testify. In such cases, immunity is an inducement to the witness to appear and is said to be his substantive right. (See Murrey v. Murrey, supra, p. 710; note 5 Cal.L.Rev. 347.) Under this reasoning, the privilege has been extended to situations other than those involving strictly judicial proceedings. (Thorp v. Adams, 58 Hun. 603 [11 N.Y.S. 479] [appearance before legislative commission]; Matthews v. Tufts, 87 N.Y. 568 [62 How. Prac. 508] [hearing before referee in bankruptcy]; Burroughs v. Cocke & Willis, 56 Okla. 627 [156 P. 196, L.R.A. 1916E 1170] [taking of deposition]; Filer v. McCornick, 260 F. 309 [bank president attending meeting necessary to the war effort in time of emergency].)
 [4] Disciplinary proceedings are a function of the Supreme Court and, although the board of governors of The State Bar and its local committees technically are not judicial tribunals, their findings are considered to be those of an intermediate agency. (Gray v. State Bar, 7 Cal.2d 177, 180 [59 P.2d 1033]; In re Petersen, 208 Cal. 42, 45 [280 P. 124].) [5] Extending immunity from service of process to a nonresident witness appearing before such a body serves the same public interest as the allowance of the same privilege to one who testifies in a judicial proceeding.
 [6] A recognized exception to the rule of immunity is that it does not apply if the later action, in regard to which immunity from service is claimed, arises out of or involves the same subject matter as the one in which the nonresident has made a voluntary appearance. (Slosberg v. Municipal Court, 101 Cal.App.2d 238, 240 [225 P.2d 312]; Von Kesler v. Superior Court, 109 Cal.App. 89, 91 [292 P. 544]; anno. 19 A.L.R. 828.) The reason for this limitation is that to permit a resident of a foreign state, by means of an immunity from service of process, to pick and choose among portions of the subject matter of litigation may result in a hardship to the opposing party. (Livengood v. Ball, 63 Okla. 93, 94 [162 P. 768, 770, L.R.A. 1917C 905].) *293
 [7] The respondents claim under the exception. They contend that Mrs. Velkov is the moving party in the disciplinary proceeding before The State Bar and that the subject matter of that proceeding is the same as that of the action for declaratory relief.
 According to the evidence presented at the hearing on the motion to quash the summons, Gold and Needleman, as attorneys, represented Mrs. Velkov in an action for separate maintenance. As a fee for their legal services they were given a 25 per cent overriding interest in certain oil properties. Subsequently, on the ground that the assignment of royalties violated provisions of the Corporate Securities Act, Mrs. Velkov sought to invalidate the transfer. Thereafter, as complaining witness, she instigated the disciplinary proceedings before The State Bar, apparently because of the allegedly illegal transfer. The purpose of the action of Gold and Needleman is to obtain a declaration of the rights of the parties under the assignment.
 The petitioner asserts that the disciplinary proceeding does not concern the rights of the parties to the property but relates only to the professional misconduct of an attorney. Furthermore, she contends, the parties in the two proceedings are not the same.
 A comparable situation was presented in Slosberg v. Municipal Court, supra. Mrs. Slosberg, a nonresident, caused to be served upon the administrator of an estate an order to show cause why he should not be required to include in his inventory certain personal property. Thereafter, the administrator filed a separate action in which he charged Mrs. Slosberg with converting other property of the estate. She sought a writ of prohibition to prevent a trial of the conversion action, alleging that she was not a plaintiff in the former proceeding and, as a nonresident witness, she was immune from the service of process.
 This reasoning was rejected. Declining to rest its decision upon the technical ground that, under Probate Code, section 1230, she would be deemed a "plaintiff," the court denied the writ on a ground of public policy. It said: "She was the moving party in the probate proceeding, the one who set in motion the particular proceeding involved. The rule before us is not established by statute, thus requiring construction of specific words, but by the courts themselves as a matter of public policy. Applying the reasons for such policy to *294 the case before us, it seems clear that petitioner ... was not immune from service of summons." (P. 241.)
 These policy considerations are controlling in the present case. Mrs. Velkov was the moving party in the disciplinary proceeding, which concerns the same transaction which is the basis of the action for declaratory relief. Under such circumstances, no public interest would be served by granting the claimed immunity.
 The writ of prohibition is denied, and the alternative writ is discharged.
 Gibson, C.J., Shenk, J., Carter, J., Traynor, J., Schauer, J., and Spence, J., concurred.
