
91 Cal.App.2d 549 (1949)
FERNANDO GERARD, Petitioner,
v.
THE SUPERIOR COURT OF LOS ANGELES COUNTY, Respondent.
Civ. No. 17009. 
California Court of Appeals. Second Dist., Div. Three.  
Apr. 29, 1949.
 Schultheis & Laybourne and Everett B. Laybourne for Petitioner. *550
 Harold W. Kennedy, County Counsel, and Wm. E. Lamoreaux, Deputy County Counsel, for Respondent.
 G. Harold Janeway for Real Party in Interest.
 VALLEE, J.
 Petitioner seeks a writ of prohibition directed to the Superior Court of the County of Los Angeles to arrest the rendition of a judgment by default against him in an action for false imprisonment, entitled "Arthur C. Penberthy v. Fernando Gerard, et al.," No. 554662, on the ground that the purported service of the complaint and summons on him is wholly void and of no effect because he is immune and exempt from such service and the court therefore lacks jurisdiction over him.
 Petitioner was and is a citizen of the Republic of Mexico, residing in Mexico City. He had been named a party defendant in an action entitled "A. C. Penberthy v. Distribuidora, S. A., a corporation, and Fernando Gerard," No. 538089, in the Superior Court of Los Angeles County. About March 16, 1948, this action was set for trial on January 19, 1949. Petitioner was immediately notified thereof by his attorney and requested to "be personally present to testify as a witness therein and otherwise to assist in the defense thereof." He assured him he would be present and on December 8, 1948, he informed him that certain kiln-drying lectures were scheduled to be given in Los Angeles at about the time of the trial and that since he was required to be in Los Angeles "he would like to attend said lectures to the extent and during such periods as his time and attention would not be required in connection with preparation for and participation in the aforesaid trial, or during the period of any delay in the actual commencement of said trial." He was advised by his attorney that such arrangement would be satisfactory "so long as he would be available at any and all times on and after January 17, 1949, for all purposes connected with said trial." Accordingly, on January 6, 1949, he enrolled for the course.
 Petitioner purchased a round-trip ticket on Pan American Airways in Mexico City and arrived in Los Angeles on the evening of Sunday, January 16, 1949, at which time he immediately contacted his attorney and reported that he was available. He was advised by the attorney that he would be busy on the following morning preparing the case for trial and could not see him until the afternoon of that day. Petitioner then attended the morning session of the kiln-drying *551 lectures and in accordance with arrangements made with his attorney by telephone during the course of such morning, left the session at noon and reported to his attorney's office about 2:45 p. m. on Monday, January 17, 1949. The conference with his attorney preparing for the trial lasted until 6:45 p. m. Petitioner was then given copies of various depositions in the action and was requested by his attorney to study them. On the morning of Tuesday, January 18, petitioner had a telephone conversation with his attorney respecting these depositions and his attorney not desiring his presence that morning, he again attended the morning session of the kiln-drying lectures. At about 2 p. m. of that day he again conferred with his attorney, preparing for the trial. The conference extended until 6:30 p. m. On Wednesday morning, January 19, the action was called and assigned for trial. At the conclusion of the first day of the trial, as petitioner was leaving the courtroom and proceeding through the hallway, he was handed a copy of the summons and complaint in the false imprisonment action (No. 554662). He did not accept the summons or complaint but permitted them to fall to the floor and remain there while he and his attorney boarded the elevator. The trial continued for two additional days, concluding at about 4:15 p. m. on Friday, January 21. Petitioner was present in court throughout the trial. After its conclusion he again conferred with his attorney at his office concerning matters pertaining to the case just concluded. The conference terminated at about 6:15 p. m. In the evening of the same day petitioner contacted Pan American Airways but was unable to take the plane leaving that evening because of insufficient time within which to pack his effects and travel to the airport prior to the flight of the plane. He accordingly made a reservation and left for Mexico City on the next available flight, which was on Saturday evening, January 22, at 10:45 p. m.
 Petitioner appeared specially in the false imprisonment action and moved the court to quash the purported service upon him. The motion was denied.
 Petitioner alleges that he came to Los Angeles "solely because of the requirement that he be personally present to appear and testify at the aforesaid trial"; that his "only purpose" in enrolling for the kiln-drying lectures "was to utilize such surplus time as he might have during the course of his stay in Los Angeles when his time and attention would not be required in connection with preparation for and participation *552 in the aforementioned trial." These allegations are established.
 [1a] Respondent does not question the general rule that nonresidents of a state who come within the territorial limits of the state as parties litigant or to testify as witnesses in judicial proceedings are afforded an immunity or privilege from the service of civil process while in actual attendance at the hearing and during such reasonable time as may be consumed in going to, and returning from, the place of trial. (See collection of cases in 21 Cal.Jur. 530; 42 Am.Jur.  139, 142, 143, pp. 119, 123, 124; 50 C.J.  226 et seq., p. 547; 162 A.L.R. 280; 19 A.L.R. 828; 13 A.L.R. 368; 25 L.R.A. 721; 42 L.R.A. (NS) 1101; 76 Am.St.Rep. 536; 6 Ann.Cas. 337; 18 Ann.Cas. 127; Ann.Cas. 1915D 985; 61 L.Ed. 193.) It asserts that petitioner voluntarily waived his immunity by arriving within the jurisdiction several days prior to the trial, attending the kiln-drying lectures, and by remaining more than 24 hours after its conclusion when other means of transportation were available from Los Angeles to Mexico City.
 No definite rule can be laid down as to when the immunity from process is lost by a party or witness by reason of the period of time expended in going to, attending, and returning from the place of trial. The immunity or privilege has been held to extend for a reasonable time. (Hammons v. Superior Court, 63 Cal.App. 700, 708 [219 P. 1037].) What constitutes a reasonable time necessarily depends upon the facts and circumstances of each case. Parties litigant are entitled to a reasonable amount of time for conferences with their counsel prior to commencement of the trial, the reasonableness being necessarily dependent upon the surrounding circumstances. Where, as here, petitioner was not only a defendant but also a witness in the action, being the principal officer of the defendant corporation, it was imperative that his attorney confer with him in the preparation of his defense. As any one with any experience in the trial of cases well knows, preparation is the most important phase of a lawsuit. Two days' preparation for a trial which lasted three days was obviously a minimum. It cannot be said that petitioner's arrival two days prior to the trial date was unreasonable or excessive. (Hammons v. Superior Court, 63 Cal.App. 700 [219 P. 1037]; see, also, Grundy v. Refior, 312 Mich. 428 [20 N.W.2d 261]; Linton v. Cooper, 54 Neb. 438 [74 N.W. 842, 69 *553 Am.St.Rep. 727]; Dixon v. Ely, 4 Edw.Ch. (N.Y.) 557; Ballinger v. Elliott, 72 N.C. 596.)
 Service was attempted on petitioner during the course of the trial and not during a period prior or subsequent thereto. In Linton v. Cooper, 54 Neb. 438 [74 N.W. 842, 69 Am.St.Rep. 727], the trial was concluded on October 11, and summons served on October 13. Judgment, however, was not rendered until October 20. While the date of departure is undisclosed, the court held an immunity existed, and said (74 N.W. 843): "We think, under the facts disclosed by this record, Cooper was privileged from service of summons in this action; especially since the cause in which he had appeared as a party and testified as a witness was undetermined when this service was had, and because a reasonable time after the hearing therein for him to take his departure from the state had not yet elapsed."
 It is not necessary, in order to have the benefit of the immunity or privilege, that a party or witness set out immediately after the trial, or take the most direct route. (See collection of cases in 42 Am.Jur.  154, p. 133; anno., 11 Ann.Cas. 1148.) What is a reasonable time for returning to one's domicile depends upon the particular facts of each case. Reasonable delays are allowable "provided they do not arise in carrying out a purpose entirely distinct from the purpose of going to, attending, or returning from court." (42 Am.Jur.  154, p. 134; 50 C.J.  254, p. 560.) Where, as here, petitioner was a resident of Mexico and had purchased a roundtrip ticket on a particular airline, he was not required, under the circumstances, to return to his domicile by another airline, or by train or bus, merely because such other means of transportation afforded an earlier departure. The language used by the court in Turner v. Randall, 134 Minn. 427 [159 N.W. 958, L.R.A. 1917B 250], is particularly appropriate: "But the rule requiring a departure from the state within a reasonable time is not so exacting as to impose upon the party the duty of making hot pursuit of the first train out of the state."
 Petitioner's immunity was not affected in any way by reason of his enrollment and attendance at the kiln-drying lectures during the mornings only of January 18 and 19, being the only times he was not required on those days to confer with his attorney and prepare for the trial. [2] It is clear that the main and controlling reason for petitioner's presence in California was the pending trial and his attendance *554 at the lectures was solely to consume surplus time not required in connection with the trial. This activity was wholly incidental and subordinate to the primary purpose of his presence in California. In applying the principle of immunity, the courts follow one of two theories: In one, which may be termed the "sole purpose doctrine," the courts take the position that the privilege is not to be invoked unless the person's sole business in the foreign jurisdiction is to attend the litigation and that the protection is gone if, with that affair, other business is intermingled. In the other, which may be termed the "controlling reason doctrine," the courts take the view that it is sufficient for the preservation of the privilege that attendance upon court business constitutes the main and controlling reason for the litigant's or witness' presence in the state, and that as long as this is true he may transact some other business not connected therewith. (See collection of cases, 162 A.L.R. 280.) California follows the latter view. (Hammons v. Superior Court, 63 Cal.App. 700, 708 [219 P. 1037]; cf. 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]; Van Kesler v. Superior Court, 109 Cal.App. 89, 90 [292 P. 544].) If, therefore, the controlling purpose of the presence within the jurisdiction is that of attending the trial, other subordinate activities will not destroy the immunity. The principle is stated in Hammons v. Superior Court, 63 Cal.App. 700, 708 [219 P. 1037], thus: "Bearing upon the contention that any immunity which Hammons may have had was lost because he attended to some other business while here, we find in Burroughs v. Cocke, supra, [56 Okl. 627 (156 P. 196, L.R.A. 1916E 1170)] the following: 'However, it appears to us that the more reasonable rule and proper test in such cases should be that if the main and controlling reason that occasioned the party's being in the jurisdiction of the court was to attend upon court business, then, merely because he elected to transact other business not connected with the court, that he should not thereby forfeit his immunity; but if it should be determined that his claim of being within the jurisdiction for the purpose of attending upon court business was not bona fide, but was being used by him as a mere subterfuge, and that he was in fact there to transact other business not connected with the trial, and but for the desire to transact said other business he would not have come within the jurisdiction of the court, then he is not entitled to immunity. It thus becomes a question of fact, and each particular case must *555 be decided on its own merits.' " There is no showing here that petitioner's claim of being within the jurisdiction for the purpose of attending the trial was not bona fide. [1b] Upon the facts which are undisputed, the showing is that he was within the jurisdiction at the direction of his attorney in good faith for the sole purpose of attending the trial and that it was his intention to leave the state as soon as he reasonably could do so after its conclusion. It follows, as a matter of law, that he was immune from service of process.
 [3] The service of summons on petitioner was void. Prohibition is the appropriate remedy. (Hammons v. Superior Court, 63 Cal.App. 700, 707 [219 P. 1037].)
 Let the peremptory writ issue as prayed.
 Shinn, P. J., and Wood, J., concurred.
