
196 Cal.App.2d 749 (1961)
CHARLES S. GAINES, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent; NORMA D. FRIEDMAN et al., Real Parties in Interest.
Civ. No. 25871. 
California Court of Appeals. Second Dist., Div. Three.  
Nov. 10, 1961.
 Melvin Simon for Petitioner.
 Harold W. Kennedy, County Counsel, and Donald K. Byrne, Deputy County Counsel, for Respondent.
 Herbert Glaser for Real Parties in Interest.
 FRAMPTON, J. pro tem.  [fn. *]
 Petitioner seeks a writ of mandate to compel respondent court to quash service of complaint and summons in an action pending in which petitioner is named as a defendant.
 Petitioner has for 57 years last past been a resident of the State of New Jersey. He is an attorney at law admitted to practice in that state. He is not now nor has he ever been a resident of the State of California. He is attorney of record for his codefendant, Guardian Mortgage Corporation, a corporation, in an action pending in the lower court. He came to California for the sole purpose of appearing on behalf of his client. On August 11, 1961, the respondent court made and entered its order associating petitioner with other counsel to represent Guardian in the matter then pending. On the above date petitioner had not been named as a party defendant. On motion of plaintiff the hearing in the matter then pending was set over to August 18, 1961. On the latter date petitioner appeared to represent his client at which time, in the courtroom, he was served with a summons on amended complaint and amended complaint naming petitioner as an additional defendant in the same cause of action upon which petitioner had appeared as counsel for Guardian. Petitioner moved to quash service of summons which motion was denied.
 [1a] Petitioner claims he is entitled to immunity from service of process in California because of his presence here *751 for the sole purpose of representing his client in an action in which he was at the time of such service attorney of record.
 The rule is summarized as follows: "While in some states the exemption does not exist at all, in a few states the courts have held that attorneys at law, while in attendance on court, are exempt from the service of summons or other process not in arrest. Also, in some jurisdictions, the privilege of exemption from service of process of nonresident witnesses and suitors has been held to be applicable to nonresident attorneys. However, this exemption does not apply to a nonresident attorney who is not an attorney of record [citing Tadge v. Byrnes, 179 Cal. 275 (176 P. 439)], nor to a nonresident attorney coming into the state to take depositions to be used in the trial of an action in another state, and a nonresident attorney is not privileged from service of process in a second suit brought in aid of the first, on which the attorney was in attendance when served. The exemption exists, however, only while the attorney is in actual attendance on the court." (7 C.J.S.  44b, p. 821.)
 In Tadge v. Byrnes, supra, 179 Cal. 275, the attorney had come from Chicago, Illinois, to Los Angeles to assist another attorney in the preparation for argument of numerous demurrers and motions to strike in connection with a case then pending in the United States District Court for the Southern District of California. He was not attorney of record in the case. While here he was served with a complaint and summons in an action filed in the state court. Nothing in the record suggests that the state court action was brought in aid of or was in any way connected with the action then pending in the United States District Court. The Supreme Court said (p. 276): "It is true there are cases holding that attorneys coming into a jurisdiction for the sole purpose of appearing in court to represent their clients are exempt from the service of civil process while so engaged, and there are cases holding quite to the contrary; there are none, so far as called to our attention or discovered by investigation, going so far as to hold that an attorney who is not an attorney of record and does not become such is entitled to such privilege."
 "In view of the situation presented by the affidavits in this case we find it unnecessary to determine the right of an attorney of record to protection from the service of civil process."
 In the case of St. John v. Superior Court, 178 Cal.App.2d 794 [3 Cal.Rptr. 535], the petitioner was president of and a *752 stockholder in Twin Lakes Corporation, a Nevada corporation. Such corporation had, prior to 1949, obtained a permit from the California Corporations Commissioner to sell its stock in California. This permit remained in effect until 1953 when a "desist and refrain" order was issued. After the issuance of such order the corporation sold and issued to one Mattie B. Pope (the real party in interest) 2,000 shares of its preferred stock and 200 shares of its common stock, the sale having taken place in California.
 In 1959 Mrs. Pope discovered that the sale was in violation of the corporation's permit, and she caused a complaint to be filed with the Commissioner of Corporations against Bennett and Company, who acted as brokers in the transaction, to revoke their brokers' license.
 Petitioner St. John had been a resident of the State of Nevada since 1951. St. John came to California as a witness at the hearing at the request of Bennett and Company, and while he was waiting to be called he was served, individually and as president of Twin Lakes Corporation by the attorneys for Mrs. Pope, with a complaint and summons in an action filed by her in the Superior Court of Los Angeles County, to rescind the sale of the shares and recover the purchase price.
 The stock involved was issued by Twin Lakes Corporation of which St. John was president. He had signed the stock certificates on behalf of the corporation. The same subject, to wit, the sale of shares was involved in both the license revocation proceedings and the rescission action.
 The court held the denial of the motion to quash service of summons was proper. (St. John v. Superior Court, supra, 178 Cal.App.2d 794.)
 [2] Our courts have consistently recognized exceptions to the granting of immunity in those cases where the second action, in which immunity is claimed, arises out of or involves the same subject matter as the one in which the nonresident has made a voluntary appearance. (Von Kesler v. Superior Court, 109 Cal.App. 89 [292 P. 544]. This case involved a party litigant.)
 [3] While in some jurisdictions the privilege of exemption from service of process by nonresident witnesses and suitors has been held to extend to nonresident attorneys (7 C.J.S.  44b, p. 821) it would seem that the exemption should be applied more liberally in favor of a witness or *753 suitor than for an attorney. A suitor cannot substitute himself or his witness but he may substitute his attorney without weakening his case.
 The attorney for defendant in an action to set aside conveyances as in fraud of judgment creditors to whom conveyances of the same property were made pendente lite by his client is not privileged from service of process in a suit brought by the receiver appointed in the first suit to secure rights asserted therein which would have been secured therein if the conveyances had not been made to him. [4] The privilege of witnesses, suitors and their attorneys, while in attendance in connection with the conduct of one suit, from service of process in another is founded on the convenience of the court instead of on that of the individual. [5] The privilege from service of process upon witnesses or parties and their attorneys should not be enlarged beyond the reason on which it is founded, and should be extended or withheld only as judicial necessity requires. (Lamb v. Schmitt (1931), 285 U.S. 222, 228 [52 S.Ct. 317, 76 L.Ed. 720]; Pittman v. Cunningham (1955), 100 N.H. 49 [118 A.2d 884], 42 Am.Jur. 122.)
 [1b] In the case before us petitioner was served with complaint and summons and made a party defendant in the identical action in which his client was involved. This falls squarely within the exception to the rule of privilege and we see no judicial necessity requiring the extension of such rule in the present situation.
 Application for peremptory writ is denied. The alternative writ is discharged.
 Vallee, Acting P. J., and Ford, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
