
20 Cal.Rptr.3d 274 (2004)
123 Cal.App.4th 491
In re D.W. on Habeas Corpus.
No. G031779.
Court of Appeal, Fourth District, Division Three.
October 25, 2004.
*276 Deborah A. Kwast, Public Defender, Kevin Phillips and Donald E. Landis, Jr., Deputy Public Defenders, for Petitioner.
Tony Rackauckas, District Attorney, Brian N. Gurwitz, Deputy District Attorney, for Respondent.


*275 OPINION
O'LEARY, Acting P.J.
Petitioner, D.W.,[1] was ordered incarcerated pursuant to Penal Code section 1332[2] as a result of being adjudged an uncooperative material witness. D.W. argues she was illegally deprived of her liberty because she was denied counsel and the proper hearings required by the statute. D.W. also contends she was improperly found in contempt pursuant to Code of Civil Procedure section 1209, subdivision (a)(9). We conclude both claims have merit. Petition granted.

* * *
Because D.W. raises two distinct procedural issues, we will first discuss her arguments with respect to section 1332. We will discuss her section 1209 argument anon.

Section 1332

FACTS
Steven Robert Miller was a defendant in a "Three Strikes" law case charged with first degree robbery, first degree burglary, the unlawful taking of a vehicle, and 10 prior strikes. At the time Miller committed the offenses, the prosecution believed he was involved in a relationship with D.W. She was, therefore, considered to be a material witness to Miller's participation in the charged offenses.
In March 2001, Miller's case was set ready for jury trial. In anticipation of calling D.W. as a prosecution witness, she was subpoenaed to appear in court. According to the prosecution, when D.W. failed to appear, the case was dismissed.
The prosecution refiled the complaint against Miller, and on August 17, 2001, D.W. was personally served with a subpoena to appear on August 24, 2001. When D.W. failed to appear on August 24, the prosecution dismissed the case against Miller for a second time. The court issued a bench warrant for D.W.'s failure to appear and set bail at $10,000.
On December 25, 2002, the Los Angeles County Sheriff's Department served the bench warrant on D.W. at her home in Long Beach. D.W. was placed in custody, and on December 31, 2002, transported to the Orange County jail.
On Friday, January 3, 2003, D.W. appeared before Judge Ronald Kreber without counsel. Judge Kreber recalled the bench warrant and advised D.W. her bail was set at $10,000. During her appearance, the following colloquy took place between D.W. and the court:
*277 "[The court]: Are you going to be able to make bail?
"[D.W.]: No, sir.
"[The court]: How long have you been in custody now?
"[D.W.]: Since Christmas.
"[The court]: Have you been to Judge Briseno's court?
"[D.W.]: No.
"[The court]: I think we ought to have her up there on January 6th where Mr. Miller's case is set."
Miller's jury trial was scheduled to begin January 27, 2003, in Judge Francisco P. Briseno's court. On Monday, January 6, 2003, the prosecution filed a "petition for ... section 1332 commitment" with a supporting declaration under penalty of perjury by the deputy district attorney assigned to prosecute Miller. The declaration recited the charges against Miller including the allegation of 10 prior strikes. It explained D.W. was a material witness because Miller confessed his involvement in the offenses to her and because she saw Miller driving the victim's stolen vehicle. The prosecutor also declared that for the past three years, Miller's case was "repeatedly either continued or dismissed due to the People's inability to secure the presence of [D.W.] as a witness." According to the prosecutor, D.W. failed to appear in March and August of 2001 "as directed by a properly served subpoena" and a bench warrant was issued for her arrest. The prosecutor stated, "[I]t is my belief based on the totality of the facts and procedural background relating to this case that even if ... [D.W.] is ordered by the court to return on the jury trial date, she would ignore such court order in order to avoid having to testify."
On the same date the petition and declaration were filed, D.W. appeared before Judge Briseno without counsel. The court noted it was "acting under 1332 subsection [sic] (c)" and stated "that when a witness is declared to be a material witness, that withinwhich was done in Department [5] I believe on Fridaythat within two days another court review that determination and make its own findings about whether the witness is a material witness, whether that witness needs to post bail." The court took judicial notice of the dismissals in the prior proceedings due to D.W.'s failure to appear. It stated, "[i]t's the court's assessment based on the declarations [sic] submitted by the deputy district attorney.... [¶] ... [¶][who] filed a declaration as to why [D.W.] ... is a material witness on this matter, and the court's read and considered that and makes the determination that the witness ... is a material witness and that but for her presence, the People would not be able to proceed. And I'm going to make that determination. [¶] Also make the determination that the witness needs to post a surety or bond. The present one that has been set is $10,000. [¶] I'm going to vacate that and set bail in the amount of $50,000 in view of the nature of the charge and the necessity for having the witness available for trial. [¶] [D.W.], you don't have an attorney, and I'm concerned that I not put you in a position of making any statements that may be detrimental to you. And I'm trying to state what's going on in direct and simple terms so you understand why you're in custody and why the court is ordering the bail or surety requirement as it pertains to this case."
Ten days later, on January 16, 2003, Judge Briseno conducted a second hearing and again, D.W. was not represented by counsel. However, Miller's counsel was present at the hearing and requested counsel be appointed to represent D.W. to protect her constitutional and due process rights citing In re Francisco M. (2001) 86 *278 Cal.App.4th 1061, 103 Cal.Rptr.2d 794 (Francisco M.). The court noted this case had "an extraordinary background" and had a history of being dismissed because D.W. failed to appear in court. In response to counsel's request the court appoint counsel for D.W., the court commented, "[w]hether this person is entitled to counsel for other reasons not associated with the fact that she's in custody after being classified as a material witness is a separate issue that will arise onwhen the case goes to trial." When counsel reiterated D.W.'s need for counsel to enforce her right to a review of the proceedings by a separate judge within two days, the court stated, "[t]he first review was by Judge Kreber. I did the review two days thereafter, and then the code requires that after you do the two-day review, there be another review at the end of ten days. [¶] And so there werethere have, in fact, been two separate judges make a determination about whether the witness is material and needs to post bond." The court denied counsel's request to appoint counsel for D.W. "given the background of the case."
On January 28, 2003, two deputy public defenders appeared before Judge Richard W. Stanford, Jr., asking the court to appoint the public defender's office to represent D.W. on the section 1332 petition.[3] The attorneys complained that at the hearings before Judge Briseno, D.W. did not speak, did not have the opportunity to speak, did not receive any documents, and was not appointed counsel to rebut the prosecution's contentions she was a material witness and would not appear to testify. The matter was trailed to the following day at which time counsel from the public defender's office alleged the previous hearings were illegal because D.W. was not afforded counsel. The public defender sought a new hearing at which D.W. would have the opportunity to argue for less restrictive means of confinement such as through electronic monitoring or some other arrangement. The court took a brief recess to read Francisco M. and held the prior proceedings complied with the statute and there were "no procedural, statutory, constitutional or fairness defects in the prior proceedings of the court regarding the decision to hold the witness."
The public defender noted Francisco M. holds the witness is entitled to a review every 10 days, and it was beyond the 10 days since D.W.'s last appearance before Judge Briseno on January 16, 2003. Counsel asked that the hearing constitute "the actual first hearing" challenging the court's finding she is a material witness in addition to the initial detention. Counsel also cited the lack of proper service and failure to provide her with sufficient notice to appear in court, and opportunity "to put forward her side of the story in terms of her ability and desire to come and testify." The court declined to do so and limited the hearing to changed circumstances.
The public defender informed the court D.W. had been a California resident for 40 years. She had lived in Long Beach for 10 years and at her current residence for the past four years. The public defender explained D.W. was "on S.S.I. and her disability is that she has A.I.D.S. and ... she's currently undergoing treatment once a month at ... Long Beach Memorial Hospital...." Counsel also argued D.W. had significant ties to the community, which included family members in the *279 area and the need for on-going medical treatment at Long Beach Memorial Hospital. Counsel further claimed, for the first time, now that she had the benefit of counsel, D.W. understood the significance of a subpoena and the requirement to testify and asked the court to consider the least restrictive means so D.W. could continue living in the community and receive her medical treatment.
At the conclusion of the hearing, the court found "the only change of circumstances alleged in essence is that she, now that she has counsel, is more aware of the significance of a subpoena, a warrant, incarceration, and compunctions to testify," and she's more likely to appear because counsel has talked to her. As such, the court did not find there was a "significant or substantial change in circumstances, and that the prior orders of the court should remain in effect. She can, if she posts an undertaking, be released. But other less restrictive methods of insuring her appearance previously were considered and decided upon; and there's no change. And so the order is to remain."
On January 31, 2003, while Miller's trial was in progress, D.W. filed a petition for a writ of habeas corpus seeking her immediate release on the basis she was denied counsel and an unrestricted section 1332 hearing. She also alleged she was not properly held in civil contempt pursuant to Code of Civil Procedure section 1209. This court ordered D.W.'s immediate release from custody and issued an order to show cause.

DISCUSSION
Article I, section 10 of the California Constitution guarantees "[w]itnesses may not be unreasonably detained." This constitutional protection is balanced against "`[t]he duty [of all citizens] to disclose knowledge of [a] crime....'" (Francisco M., supra, 86 Cal.App.4th at p. 1064, 103 Cal.Rptr.2d 794.) This duty is considered to be "so vital that one known to be an innocent may be detained, in the absence of bail, as a material witness. [Citations.]" (Ibid.)
To enforce this duty, section 1332 allows for the incarceration of a person determined to be a material witness to secure their presence at trial. Section 1332 states, "(a) [W]hen the court is satisfied, by proof on oath, that there is good cause to believe that any material witness for the prosecution or defense, whether the witness is an adult or a minor, will not appear and testify unless security is required, at any proceeding in connection with any criminal prosecution ... the court may order the witness to enter into a written undertaking to the effect that he or she will appear and testify at the time and place ordered by the court or that he or she will forfeit an amount the court deems proper. [¶] (b) If the witness required to enter into an undertaking to appear and testify, either with or without sureties, refuses compliance with the order for that purpose, the court may commit the witness, if an adult, to the custody of the sheriff ... until the witness complies or is legally discharged. [¶] (c) When a person is committed pursuant to this section, he or she is entitled to an automatic review of the order requiring a written undertaking and the order committing the person, by a judge or magistrate having jurisdiction over the offense other than the one who issued the order. This review shall be held not later than two days from the time of the original order of commitment. [¶] (d) If it is determined that the witness must remain in custody, the witness is entitled to a review of that order after 10 days."
"The unique posture of the material witness" requires special attention to ensure that the procedures leading to the *280 incarceration of a witness are fair and comply with "procedural safeguards allowing the interests of the witness to be heard in conjunction with the interests of the state." (Francisco M., supra, 86 Cal.App.4th at p. 1075, 103 Cal.Rptr.2d 794.) The opportunity for the witness to be heard has its roots in the federal and state Constitutions, which provide a person may not be deprived of their liberty without due process of law. (U.S. Const., 5th & 14th Amends.; Cal. Const., art. I, § 7; see Francisco M., supra, 86 Cal.App.4th at pp. 1071-1072, 103 Cal.Rptr.2d 794.) And because there is a risk of loss of physical liberty, the due process requirement of a meaningful opportunity to be heard cannot be met unless counsel is appointed. (Iraheta v. Superior Court (1999) 70 Cal.App.4th 1500, 1503, 83 Cal.Rptr.2d 471.)
By its terms, section 1332, subdivision (a), contemplates an initial hearing on "proof on oath, that there is good cause to believe" the witness is material, and will not appear and testify unless security is required. Francisco M. explains that during this initial hearing "the witness should have counsel ... to controvert the allegations seeking his detention, and to be heard on all relevant issues, including whether he will agree to return if released and whether other alternatives to incarceration in lieu of security are feasible and adequate. On all relevant issues he is entitled to present evidence on his behalf." (Francisco M., supra, 86 Cal.App.4th at p. 1076, 103 Cal.Rptr.2d 794.)
Because the witness may be unfamiliar with the judicial system, representation by counsel is essential to challenge the allegations seeking the witness's detention. For example, because of the witness's unfamiliarity with the facts of the case and the Evidence Code, counsel would be in a better position to argue whether the witness's testimony is in fact material and otherwise likely to be admissible. It is unlikely the witness would have any knowledge as to what constitutes proper service of a subpoena or how to challenge the validity of service. Counsel would be able to pose a challenge to the validity of service if it was appropriate. Also, counsel is generally far more capable of articulating the reasons why the witness may have previously failed to respond to a subpoena.
Here, it is alleged D.W. suffers from a potentially terminal illness and receives medical treatment on a regular basis. D.W.'s medical condition may explain why she failed to appear at one or both of her scheduled appearances. Not being conversant with the criminal justice system, D.W. may not have been aware of the less restrictive means of detention to ensure her appearance in court.
It is clear both Judge Briseno and Judge Stanford believed Judge Kreber conducted the initial hearing, considered the relevant evidence, and based on "proof on oath" made a finding "good cause" existed to believe D.W. was a material witness and would not appear and testify unless security was required. However, it is apparent from the minute order and the transcript of the hearing Judge Kreber did none of those things. Neither the minute order nor the transcript of D.W.'s appearance before Judge Kreber indicate there was: (1) a declaration or testimony on "proof on oath"; (2) good cause presented to the court attesting to the fact D.W. was a material witness; (3) evidence she would not appear and testify as required; or (4) any indication a petition had been filed asking the court to detain D.W. pursuant to section 1332. In fact, the minute order of D.W.'s appearance before Judge Kreber clearly reflects the court simply recalled the outstanding warrant and transferred the matter to Judge Briseno's court for hearing.
Consequently, D.W. was never afforded an opportunity to challenge the allegations *281 requiring her incarceration as provided in section 1332, subdivision (a). Therefore, the subsequent "review" proceedings pursuant to section 1332, subdivision (c), before Judges Briseno and Stanford were meaningless. We conclude, D.W. was illegally deprived of her liberty because she was denied counsel and was never provided the proper hearings required by section 1332.

Section 1209

FACTS
At the conclusion of the section 1332 proceeding, Judge Stanford allowed the prosecution to call D.W. as a witness under Evidence Code section 402 to determine if she would invoke the marital privilege and refuse to testify if called as a witness at the trial. The public defender elicited testimony from D.W. to establish a valid marriage and a basis for D.W. to invoke the marital privilege, but the court ruled the marital privilege did not apply. Then the court decided it would be beneficial to "find out what ... [D.W.] would say if she was called in front of the jury ... [to] see what the responses are going to be." During this hearing, out of the presence of the jury, counsel asserted a Fifth Amendment privilege on D.W.'s behalf. The court ruled D.W. had no Fifth Amendment privilege and ordered D.W. to answer the prosecution's questions. D.W. repeatedly refused to answer. Because the court had refused to sustain either of her claims of privilege, the prosecution asked she be found in civil contempt. The court obliged. The minute order reflects the following: "People ask the Court to order the witness to answer the questions or she will be held in [c]ontempt. [¶] Court orders the witness to answer the questions. [¶] People request the Court to find the witness in contempt of Court. [¶] ... [¶] Court finds witness refuses to answer the questions as stated on the record. [¶] Court so orders as requested by the People. [¶] Witness is ordered remanded into custody to appear on [February 4, 2003], 9:00 a.m." D.W. was remanded and was in custody until January 31, 2003, when this court ordered her immediate release.

DISCUSSION
The court failed to cite statutory authority for its judgment of contempt, but we presume it was Code of Civil Procedure section 1209, subdivision (a)(9). That provision provides, in part, that contempts of the authority of the court include "refusing to be sworn or answer as a witness."
"`"Contempt committed in the immediate view and presence of the court ... may be treated summarily. All that is required is that an order be made reciting the facts, adjudging the person guilty and prescribing the punishment." [H]owever, that such an order is valid only if it recites facts with sufficient particularity to demonstrate on its face that petitioner's conduct constituted a legal contempt. [Citations.]'" (In re Littlefield (1993) 5 Cal.4th 122, 138, 19 Cal.Rptr.2d 248, 851 P.2d 42; In re Buckley (1973) 10 Cal.3d 237, 247, 110 Cal.Rptr. 121, 514 P.2d 1201.) We conclude, the January 29, 2003, contempt order was invalid.
The court's order fails to recite sufficient details for a reviewing court to reach its own conclusion as to whether D.W.'s conduct was contemptuous. Rather than recite with specificity the exchange, the court summarized by simply stating D.W. refused to answer the questions. The order only generally describes the conduct and does not state the underlying facts such as D.W.'s invocations of privilege, the court's rulings on the claimed privileges, or the appearance and participation of counsel. (Boysaw v. Superior Court (2000) 23 Cal.4th 215, 221, 96 Cal.Rptr.2d 531, 999 P.2d 748.) Also absent from the order is a statement as to the exact punishment the *282 court imposed. This failure created an ambiguity as to whether the court intended to impose a punitive contempt or a coercive contempt. If the contempt was the later, D.W. was entitled to know what she was required to do to earn her release.
In reviewing a civil contempt order, the appellate court does not presume the order to be correct. Rather, because of the summary nature of civil contempt, all presumptions are drawn against the validity of the contempt order. (In re Rosen (1973) 31 Cal.App.3d 71, 74, 106 Cal.Rptr. 757.) Practically speaking, this places the burden on the court to "cross all the `i's' and dot all the `t's.'" Because civil contempt is generally the last arrow in the judicial quiver, it is not a routine and familiar exercise for most courts.[4] On the rare occasion when a court is called upon to invoke its contempt authority, the court is well advised to stop and refresh its recollection as to the intricacies of the requirements placed on the judge. Otherwise, the order may not fare well under the appellate microscope.

DISPOSITION
For the reasons stated in this opinion, the petition for a writ of habeas corpus is granted. The matter is remanded to the superior court with directions to vacate its January 29, 2003, order committing D.W. to custody pursuant to section 1332 and its order on the same date adjudging her in contempt.
WE CONCUR: MOORE and FYBEL, JJ.
NOTES
[1]  Out of respect for petitioner's privacy due to her illness (discussed, infra), we only use her initials.
[2]  All further statutory references are to the Penal Code, unless otherwise indicated.
[3]  Although the court never formally ruled on the public defender's request to be appointed, counsel from the public defender's office appeared on behalf of D.W. at this hearing and continued to appear on her behalf throughout the prosecution's Evidence Code section 402 motion and at the time of the contempt ruling.
[4]  We in no way mean to encourage contempt proceedings under the old adage "practice makes perfect." We commend our trial bench for the judgment, skill, and good sense it demonstrates in effectively controlling even the most difficult proceedings without having to resort to contempt proceedings.
