(a) Upon request of a witness, a judge of superior court may determine whether he is a material witness, and may order his protective custody. The order may provide for confinement, custody in other than a penal institution, release to the custody of a law-enforcement officer or other person, or other provisions appropriate to the circumstances.
(b) A person having custody of the witness may not release him without his consent unless directed to do so by a superior court judge, or unless the order so provides.
(c) The issuance of either a material witness order or an order for voluntary protective custody does not preclude the issuance of the other order.
(d) An order for voluntary protective custody may be modified or vacated as appropriate by a superior court judge upon the request of the witness or upon the court's own motion. (1973, c. 1286, s. 1.)