
81 Cal.App.3d 280 (1978)
146 Cal. Rptr. 633
BEVERLY RYSDALE et al., Petitioners,
v.
THE SUPERIOR COURT OF SANTA BARBARA COUNTY, Respondent; CITY OF SANTA BARBARA, Real Party in Interest.
Docket No. 53195.
Court of Appeals of California, Second District, Division Three.
May 24, 1978.
*282 COUNSEL
John M. Sink and Arnold Milton Paul for Petitioners.
No appearance for Respondent.
Frederick W. Clough, City Attorney, and Anthony C. Fischer, Assistant City Attorney, for Real Party in Interest.
OPINION
POTTER, J.
Petitioners are defendants in a suit brought by real party in interest, the City of Santa Barbara (hereinafter City), to enjoin alleged violation of its zoning ordinance. According to the complaint, petitioners are occupying a residence in a one-family residence zone in violation of the zoning law which prohibits the use of any such property "as a place of residence for more than five persons not related by blood, marriage or legal adoption...." The petition sets forth provisions of the zoning *283 ordinance authorizing enforcement by injunction, which remedy is cumulative to penal provisions. The penal provisions make violation a misdemeanor punishable by fine of not more than $500 or imprisonment in the county jail for not more than six months, or both, with each day's violation a separate offense.
Further allegations of the petition include the following: (1) the City is the potential prosecuting agency with respect to a misdemeanor prosecution, (2) the city attorney represents the City in the civil action and would represent it in a criminal proceeding; (3) the petitioners have been informed by the city attorney's office that the City contemplates a criminal prosecution against at least some of them based on the same facts charged in the civil complaint; (4) the city attorney's office is prosecuting the civil action as a device to utilize civil discovery for purposes of criminal prosecution which will be initiated if the City becomes dissatisfied with the way the superior court handles the civil case or the conduct of petitioners as adversaries.
Additional allegations in the petition show that in the course of the civil proceedings the City noticed the depositions of three of the petitioners without any offer of immunity. When the deponents asserted privilege against self-incrimination, the City sought an order from the superior court compelling two of them to answer the questions and granting immunity to them. The immunity provisions of the order read as follows:
"3. Deponents Louise Weston and Michael Lockwood are hereby granted immunity from criminal liability for violations of the Municipal Code of the City of Santa Barbara and shall not be criminally prosecuted for violations of the Municipal Code of the City of Santa Barbara as a result of use of their testimony taken at the depositions or at the trial of the pending action."
At the hearing, petitioners objected to any order which did not grant immunity to all defendants. In the argument, comment was made by the city attorney to the effect that the grant of immunity to only some of the petitioners gave rise to conflicting interests between petitioners affecting their attorney's ability to defend them all.[1] The petitioners asserted that *284 the immunity order violated their right to refuse immunity in a misdemeanor matter, and "to agree to supply such testimony only if immunity were extended to other defendants in the same case...." The trial court overruled petitioners' objections to the immunity order and issued it in the form requested by the City.
The prayer in the petition to this court sought an alternative and a peremptory writ requiring respondent court to vacate its immunity order and "enter a different order providing misdemeanor immunity to all the petitioners and any other defendants added to the civil case hereafter...."
On March 28, 1978, this court denied the petition "for failure to state facts sufficient to justify the relief sought." Petitioners thereafter sought a hearing in our Supreme Court. In their petition for hearing, they substantially changed the tenor of the relief sought. Instead of demanding transactional immunity (misdemeanor immunity to all the petitioners) as they did in this court, petitioners described the question presented as, "[I]s it an abuse of discretion to refuse to frame such order so so as to restrict the use of such depositions to the civil action?" (italics added), thereby inferentially seeking a use and derivative use immunity.
The Supreme Court granted a hearing and transferred the matter to this court, directing that an alternative writ of mandate issue. We issued an alternative writ commanding the superior court to vacate its order and to enter a new and different order defining the immunity as a use and derivative use immunity "precluding use of any evidence procured as the result of the depositions in any misdemeanor prosecution of any person for or on account of any conduct disclosed thereby," or show cause why a peremptory writ to that effect should not issue. No action was taken by the respondent court to comply with the alternative writ.
The City filed its return. The only facts not already adverted to, stated in the return, are that a decision to file misdemeanor charges against any of the petitioners has not been made. The return also affirmatively states that the complaint was filed against petitioners "for the purposes set forth therein and discovery has been undertaken because it was believed to be the most efficient and effective means to discover the facts and to abate what appear to be serious violations of the Zoning Ordinance."


*285 Contentions

As stated in their petition for hearing in the Supreme Court, petitioners contend that it was an abuse of discretion on the part of the trial court to refuse to frame its protective order "so as to restrict the use of such depositions to the civil action." The City contends that the immunity order was authorized by Code of Civil Procedure section 2019, subdivision (b)(1), and that the court properly exercised its discretion in limiting the immunity so as to benefit only the witnesses examined pursuant to the immunity order.

Discussion
(1a) Neither party questions the authority of the court to issue an immunity order pursuant to the provisions of Code of Civil Procedure section 2019. Nor is there any real question that the City may decline to act pursuant to any grant of immunity with which it is dissatisfied. Such right, however, does not permit the City to dictate the form of the immunity order nor justify an order which unnecessarily subjects either the witness or any party to annoyance, embarrassment or oppression. The immunity order issued by the trial court does subject parties other than the witnesses to annoyance, embarrassment and oppression without any necessity therefor being shown. It is, consequently, an abuse of discretion and should be replaced by an order reasonably protecting the interests of all parties.

The City Can Reject Any Immunity Order and Simply Forego the Testimony of the Witness
(2a) The City asserts, and petitioners do not contend to the contrary, that, as the potential prosecuting agency, it can refuse to accept any form of immunity order which the prosecutor declares would "unduly hamper" the prosecution of persons who should be subjected to criminal proceedings. (Daly v. Superior Court (1977) 19 Cal.3d 132, 148-149 [137 Cal. Rptr. 14, 560 P.2d 1193].) To this extent, the City is correct in asserting that "the authority of the trial court to issue a protective order is limited to those persons approved by the prosecutor." That is not to say, however, that the prosecutor has any authority over the form of the order which he may accept or reject. If the form of order which the court may properly issue is not to his liking, the prosecutor may forego the testimony of the witnesses in the civil proceeding. The form of the order *286 is, however, determined by the court and by the applicable provisions of Code of Civil Procedure section 2019, and not by the prosecutor.

The Court Had Authority to Grant Immunity in Order to Make the Testimony of Defendants Available in the Civil Proceeding
(3) The decision of our Supreme Court in People v. Superior Court (Kaufman) (1974) 12 Cal.3d 421 [115 Cal. Rptr. 812, 525 P.2d 716], established the authority of the court, pursuant to Code of Civil Procedure section 2019, subdivision (b)(1), to impose a grant of immunity obliging a party witness to a civil proceeding to testify despite the fact the conduct being inquired into also constituted a misdemeanor. In Kaufman, civil proceedings to enforce civil penalties and to obtain a permanent injunction and restitution in respect of violations of Business and Professions Code section 17500 et seq. (deceptive advertising) were instituted against several defendants. When the People sought to take the deposition of one such defendant, he refused to testify on the ground that his testimony "could lead to the production of evidence which may tend to incriminate him of criminal conduct...." (12 Cal.3d at p. 424.) The People moved for a protective order which was described in the Supreme Court opinion as follows (id., at p. 425): "The People then moved for an order which would provide Kaufman `with all possible protection against criminal prosecutions as a result of [his] testimony taken at [the deposition] or at the trial of the pending action' (hereinafter referred to as a protective order). The order as sought would have further limited the use of the deposition to the pending civil action, and would have provided that it would amount `to an effective grant of immunity' from criminal liability...." (Italics added.)
The trial court declined to issue a protective order on the ground that it lacked jurisdiction to do so in a civil proceeding. Our Supreme Court rejected the argument that the Constitution and the Legislature had "authorized judicial grants of immunity only in limited, specific instances (see generally Pen. Code, §§ 1324 and 1324.1 relating to transactional immunity) which do not include grants of use immunity in prosecutions on charges of deceptive advertising ..." (12 Cal.3d at p. 426), and concluded, to the contrary, that the trial court had power under Code of Civil Procedure section 2019 to limit the use of a deposition and the fruits thereof in the event of subsequent criminal proceedings.
*287 It is apparent that the power of the court recognized in Kaufman does not depend upon Penal Code section 1324.1 governing grants of transactional immunity "[i]n any misdemeanor proceeding." The requirement of said section that the witness "agree in writing with the district attorney ... to testify voluntarily pursuant to this section" has no application to the use immunity the court found appropriate in Kaufman. (1b) Consequently, respondent court did not err in failing to make the effectiveness of the immunity order depend upon the witnesses' consent.

The Immunity Order Failed Properly to Protect the Petitioners From Annoyance, Embarrassment or Oppression
Both petitioners and the City contend that the decision in Kaufman is determinative as to the propriety of the trial court's order. Petitioners erroneously assert that "[u]se immunity had been granted by the trial court to all defendants, not just the one being deposed; and that order was approved" by the Supreme Court. No immunity had been granted. The Supreme Court merely described the order "sought" and said that it "limited the use of the deposition to the pending civil action...." (12 Cal.3d at p. 425.) However, examination of the record in Kaufman discloses that the actual provision of the proposed order was that "said depositions will not be used as evidence or as investigative leads to evidence to any criminal prosecution of said deponents at any time...." (Italics added.) On the other hand, the proposed order also referred to the grant of immunity as one which "will preclude the use of deponents' testimony and leads therefrom obtained pursuant to this order in any criminal prosecution." (Italics added.)
The City points to other language in the opinion purportedly supporting its claim, for example (12 Cal.3d at p. 428): "[T]he state may require a person to disclose information otherwise subject to a claim of privilege if in place of the protection conferred by the privilege there is substituted another protection having the same scope and effect as the privilege, namely, immunity from use of the information or its fruits in connection with a criminal prosecution against the person; ..." (Italics added.)
The inclusion in the opinion of statements giving rise to inferences both ways on the issue whether the use immunity should benefit anyone other than the witness indicates that the court did not address itself to this question. It simply held that the court had the power to make an order *288 granting use immunity; the judgment was that a peremptory writ issue directing the court "after fashioning and issuing an adequate protective order, to compel the real party in interest to respond on deposition and trial to all proper inquiries...." (Id., at p. 433.)
In Daly v. Superior Court, supra, 19 Cal.3d 132, our Supreme Court also approached but did not decide the issue which we have before us in the case at bench. In distinguishing the situation in Daly, where the prosecutor had not sought an immunity order, from that in Kaufman, where he had done so, the court said (19 Cal.3d at pp. 144-145):
"Thus, the immunity granted in Kaufman sprang from a prosecutorial decision to implement the People's civil enforcement of the law even at the expense of burdens that the immunity order might impose on subsequent criminal proceedings. Moreover, in Kaufman the prosecuting attorneys representing the People retained complete control over the scope of immunity through the power to determine what questions would be put to the witnesses to whom the immunity was being granted....
"The relief being asked by petitioners is a far cry from that required in Kaufman. They ask that without any notice to or expression from any prosecuting agency the trial court grant real parties in interest immunity from the direct or indirect use in criminal proceedings of their answers to whatever questions petitioners may see fit to pose on discovery that are `relevant to the subject matter' of petitioners' alleged causes of action for damages. [Fn. omitted.]"
More nearly in point is footnote 9 of the opinion in Daly, where the court said (id., at p. 147): "Amicus argues that a protective order granting immunity to assist discovery by a private party is not an order `to protect the party or witness from annoyance, embarrassment, or oppression' and is therefore not authorized by section 2019, subdivision (b)(1) of the Code of Civil Procedure. The argument purports to distinguish Kaufman on the ground that although prosecutorial use of testimony compelled by the People pursuant to a grant of use immunity would indeed constitute `annoyance, embarrassment, or oppression,' prosecutorial use of testimony compelled for the benefit of a private party would be perfectly legitimate and so could not be said to annoy, embarrass or oppress the witness. However, the restriction which an immunity order in aid of discovery imposes upon subsequent prosecutorial use of compelled testimony does not stem simply from a statutory power to protect the witness but is the quid pro quo constitutionally required as a condition to stripping the *289 witness of the privilege against self-incrimination. (Kastigar v. United States, supra, 406 U.S. 441 [32 L.Ed.2d 212, 92 S.Ct. 1653]; Byers v. Justice Court, supra, 71 Cal.2d 1039, 1050 [80 Cal. Rptr. 553, 458 P.2d 465].) The protective order approved in Kaufman was not for the benefit of the witness, who would have preferred to stand on the privilege (see 12 Cal.3d at p. 424), but was for the protection of the right of the party seeking the order (the People) to obtain discovery without being blocked by a claim of privilege that the protective order could effectively dispel. The Kaufman holding that such an order was proper in furtherance of the People's discovery rights applies with equal force to the propriety of such an order in furtherance of the discovery rights of private parties. The distinction between the two situations pertains only to fulfillment of the requirement that the immunity order not unduly hamper prosecution." (Italics added.)
Again, although arguably some of the language used bears upon the issues in this case, the court did not actually resolve it.
(2b) Daly does teach that when the prosecution is the party seeking the immunity order, it must accept some "burdens that the immunity order might impose on subsequent criminal proceedings" (id., at p. 144) and that Code of Civil Procedure section 2019, subdivision (b)(1), as it expressly states, obliges the court to frame its protective order so as to protect both parties and the witness from annoyance, embarrassment or oppression. As the court stated in Kaufman, courts are called upon to effect "`a form of accommodation which provides the appropriate resolution of the conflicting interests involved in the present case....'" (12 Cal.3d at p. 428.)
(1c) In effecting such accommodation, we must consider the posture of the parties in the absence of an exercise of the court's power to issue a protective order under Code of Civil Procedure section 2019. If there were no civil action authorizing such exercise of power, the prosecution would be unable to obtain any compelled testimony without the consent of the witness, in view of the requirements of Penal Code section 1324.1. Conversely, all prospective defendants in any misdemeanor prosecution would be protected against the utilization of compelled testimony. Thus, if the prosecution, by initiating civil proceedings and taking advantage of the court's power therein, is enabled to obtain compelled testimony which it can use in the prosecution of any of the parties defendant, it will have obtained a significant advantage. The imposition of a condition to the protective order limiting use of the evidence obtained to the civil *290 proceedings for the benefit of all defendants would "hamper" the exploitation of this advantage. On the other hand, failure to so condition the order would subject the nonwitness defendants to the serious detriment of having compelled testimony of their codefendants used against them. Serious collateral consequences also flow from this exposure. Whereas, in the absence of an immunity order, the defendants could present their joint defense by the employment of a single attorney without any conflict arising, the grant of immunity to some of the defendants would oblige the nonwitness defendants to have counsel free of any attorney-client relationship with the witnesses so that he could effectively cross-examine. These direct and collateral consequences constitute "annoyance, embarrassment or oppression" within the meaning of Code of Civil Procedure section 2019.
Since there is no disposition of the matter which will avoid either annoyance, embarrassment or oppression of the defendants, or some degree of a hampering effect upon the prosecution, the required "accommodation" is difficult. It is not, however, impossible. By granting a use and derivative use immunity applicable in any prosecution of any of the parties defendant, the City will be placed in a substantially more advantageous position than it would be without any immunity order. Compelled testimony will be available for its use in the civil action. Though prosecution of all defendants will be significantly hampered,[2] the order will not "unduly hamper" such prosecution. If such prosecution is not feasible without the use of compelled testimony, as the City's return implies,[3] the granting of use and derivative use immunity for the benefit of all defendants will not actually hamper the prosecution at all. It will simply negate the prosecutorial advantage which would result from an order protecting only the witnesses. Furthermore, the scope of the derivative use immunity under such an order will remain within the control of the City. By limiting the questions strictly to evidentiary facts and avoiding any inquiry as to witnesses and sources of evidence, the City *291 can minimize its "affirmative duty to prove that the evidence it proposes to use is derived from a legitimate source" (19 Cal.3d at p. 138) in any subsequent prosecution.
Consequently, we conclude that the protective order in the court below was an abuse of discretion. It protected only the City from annoyance, embarrassment or oppression and accorded no such protection to petitioners. A peremptory writ of mandate will therefore issue requiring the superior court to vacate the order of March 3, 1978. However, if the city attorney requests it, a new immunity order may be made defining the immunity to be granted as use and derivative use immunity with respect to the compelled testimony of the witnesses and all evidence derived therefrom for the benefit of all defendants in any criminal prosecution for violation of the zoning ordinance.
Let a peremptory writ issue requiring the respondent court to vacate the order of March 3, 1978, granting misdemeanor immunity to petitioners Louise Weston and Michael Lockwood.
Klein, P.J., and Cobey, J., concurred.
NOTES
[1]  According to the petition, the city attorney implied that the grant of immunity to some petitioners would oblige other petitioners "represented by the same counsel" to cross-examine them "thus causing petitioners to split up and obtain separate lawyers." The return admits that "the City argued that one of the unsaid causes of the opposition to the offered grant of immunity was that the various clients of the witnesses' attorney had conflicting interests compounded by the offer of immunity and would have a difficult time dealing with the conflict at the depositions."
[2]  As our Supreme Court noted in Daly v. Superior Court, supra, 19 Cal.3d at page 138: "[T]he effect of requiring the real parties in interest to give self-incriminating testimony under the umbrella of the proposed immunity order would be to encumber any future criminal proceeding against any of them with a `heavy burden' by `impos[ing] on the prosecution the affirmative duty to prove that the evidence it proposes to use is derived from a legitimate source wholly independent of the compelled testimony.' (Kastigar v. United States (1972) 406 U.S. 441, 460, 461 [32 L.Ed.2d 212, 226, 227, 92 S.Ct. 1653].)"
[3]  At page 14 of the memorandum of points and authorities, the City states: "As evidenced by this case, it is quite difficult to discover in order to prove by competent testimony that an excessive number of unrelated persons are using a house as a residence (as opposed to being temporary guests) without use of testimony from a potential defendant...."
