
652 P.2d 779 (1982)
STATE of Oregon, ex rel. R. Karen Roach, Administrator, Children's Services Division, Plaintiff-Relator,
v.
Phillip J. ROTH, Judge of the Circuit Court of the State of Oregon for Multnomah County, Defendant.
SC 28803.
Supreme Court of Oregon, In Banc.
Argued and Submitted July 23, 1982.
Decided October 19, 1982.
Karen H. Green, Asst. Atty. Gen., Salem, argued the cause for plaintiff-relator. With her on the petition were William F. Gary, Sol. Gen. and Dave Frohnmayer, Atty. Gen., Salem.
David Audet, Portland, argued the cause for defendant.
LINDE, Justice.
At the opening of a criminal trial for sexual abuse, the defense moved for an order allowing the defense to interview the alleged victim, a minor in the custody of the Children's Services Division. After being advised of the objections of the caseworker and hearing arguments of counsel, the circuit court allowed the motion and issued an order addressed to Children's Protective Services.[1] Subsequently the circuit court denied a motion by Children's Services Division to vacate the previous order. The state, on relation of the division's administrator, then obtained an alternative writ of mandamus from this court commanding the circuit judge, defendant in this proceeding, to vacate his order and enter a contrary order or to show cause why he had not done so. Judge Roth, in turn, has moved to dismiss the alternative writ.
The issue is framed by the state's contention that Judge Roth had no discretion to refuse to vacate his original order because he had no authority to issue it and the judge's contrary contention that the order was within his discretion and therefore is not reviewable by writ of mandamus.
In the course of the proceedings, the state's challenge to the court's authority has taken different forms. At the circuit court hearing, the prosecutor objected to the defense request on the ground that the requested interview would be contrary to the child's welfare and that Children's Protective Services (CPS) was performing a parental function in resisting the request. After hearing testimony from the agency's caseworker, defendant stated that he saw no additional harm to the child (who had been interviewed by the prosecution and would be a witness at trial) in an "informal *780 meeting" if the caseworker as well as the attorneys were present, "and if the child is reluctant to talk, just cut her off like that." He therefore allowed the defense motion and subsequently signed an order that Children's Protective Services "make the child ... available for and submit to an interview" in the presence of these persons.
In the mandamus proceedings in this court, the state expressly disavows any claim that defendant abused his discretion. It argues that the judge lacked authority altogether to issue the challenged order, without regard to the facts of the particular situation. We turn, therefore, to the question whether the court had no authority to order CPS to allow the defense access to a child in its custody at all.
Defendant cites State v. York, 291 Or. 535, 543, 632 P.2d 1261 (1981), in which we stated that "the state cannot advise a witness not to speak to the defense attorneys." That case did not involve a pretrial order but an appeal from a conviction. We did, however, state that a defendant who is prevented from interviewing a witness should "take appropriate action to overcome the obstacle" and could request the assistance of the court to do so. 291 Or. at 543, 632 P.2d 1261. The issue is whether "appropriate action" includes an order in a criminal proceeding addressed to someone other than the prosecutor.
Defendant points to no statutory source of authority to issue such an order, and we are aware of none. The pretrial discovery rules of ORS 135.805 to 135.873 do not extend to the present order to CPS. Without a source of authority there is no general power, merely by virtue of conducting a trial, to order persons how to conduct themselves outside the courtroom.[2] If independently of an order a person has a legal duty to take or refrain from certain action, that duty may be enforceable by some injunctive or mandatory proceeding against that person, but this does not mean that a court is authorized to command such conduct by an order made in the criminal case.
Defendant cites holdings by other courts that have ordered defense access to witnesses in official custody. Indeed, the point at issue in the cases is not whether a court may order such access but whether it must do so, in other words, under what circumstances the order is even a matter of discretion.[3] The decisions rest on a variety of statutory or constitutional principles, of which some may have analogues in this state and others not.[4] We do not reject the *781 principle of these holdings that the state may not deny defense access to a witness in official custody. None of the many reported cases we have examined, however, show a trial court order addressed to someone other than the prosecutor, at least so far as can be discerned from the appellate opinions.
The distinction is important both to procedure and to the relevant consequence of noncompliance. The prosecutor represents a party, in fact the initiating party, to the criminal case and therefore to any procedures on the defense motion for access to a witness. An agency charged with custody of the witness normally is not a party, unless made so in a separate proceeding, and can resist an order addressed to it only by attempting to enter the criminal proceeding to have the order set aside or by inviting contempt proceedings. When an order is simply addressed to the state as a party, represented by the prosecutor, it leaves to the state the relationships and arrangements among the various agencies or officials that may be involved in complying with the order.[5] We need not anticipate in this opinion what action the court trying the criminal case would take in the event of official noncompliance with an order for defense access to a witness. For the purposes of this case, it suffices that the defendant lacked authority to issue his order to CSP. A peremptory writ of mandamus to vacate the order will issue.
Peremptory writ issued.
CAMPBELL, Justice, dissenting.
I dissent. I would find the defendant by virtue of the fact that he is a judge of the court of general jurisdiction had inherent power to issue the order in question. I would further find that the order could only be set aside for an abuse of discretion. The alternative writ should be dismissed because mandamus will not lie to control judicial discretion. Johnson v. Craddock et al, 228 Or. 308, 365 P.2d 89 (1961); State ex rel. Ricco v. Biggs, 198 Or. 413, 255 P.2d 1055 (1953).
At an omnibus hearing before Judge Roth an attorney for a defendant who was accused of the crime of sexual abuse explained that the case basically rested on the eight year old victim's story as against that of his client. He further explained that the Children's Services Division, which had custody, refused to allow him to talk to the child. The attorney then made the following motion:
"* * * I'm asking the Court for an order allowing me and/or my investigator, under whatever conditions the Court may impose, to speak with this child."
Judge Roth then listened to the testimony of the caseworker for the Children's Services Division. At the conclusion of the testimony he said:
"I don't see any additional harm if the district attorney is present, you're present [defendant's attorney], and Ms. Conrad [caseworker] is present, * * * and if the child is reluctant to talk, just cut her off like that and if the child is willing to talk, well and good, so you have some chance to evaluate the child, because you're going to have to defend this man and I think you should have an opportunity  just an informal meeting."
*782 Thereafter, the order in question was issued. In relevant part it reads:
"IT IS ORDERED that defendant's motion be and the same is hereby allowed.
"IT IS FURTHER ORDERED that the Children's Protective Service make the child, Angela * * *, available for and submit to an interview by defense counsel and his investigator, said interview to be conducted in the presence of Cynthia Conrad of Children's Protective Services and Deputy District Attorney Leslie K. Baker."
I would find that the order is ambiguous and that Judge Roth's intention was that the child should be required to appear for an interview but not required to answer questions. Contrary to the State's contention, this is not a case where a witness is compelled to speak to defense counsel prior to trial. State v. York, 291 Or. 535, 632 P.2d 1261 (1981). We do not reach the issue of whether the Children's Services Division stands in loco parentis and has the authority to refuse to allow the child to answer questions.
There is a line of cases that hold a defendant has the right to interview witnesses held in public custody under the terms and conditions set out by the trial judge. See Annotation, Accused's Right to Interview Witness held in Public Custody, 14 A.L.R.3d 652 (1967); 21A Am.Jur.2d 528 Criminal Law § 999 (1991).
In Baker v. State, 47 So.2d 728 (Fla. 1950) the defendant was convicted of a crime against nature involving girls who were 15 and 13 years of age. Prior to trial the girls were in the custody of the juvenile officer. The only question on appeal was whether the trial court abused its discretion in refusing to allow defendant's attorney permission to interview the girls except in the presence of the juvenile officer. The Florida Supreme Court held there was no abuse of discretion.
In Clarence Holladay v. The State, 130 Tex.Cr. 591, 95 S.W.2d 119 (1936) the defendant was convicted of incest involving his 14 year old and 12 year old daughters. The Texas Court of Criminal Appeals held that the trial court did not abuse its discretion in refusing to allow an interview of the daughters by defendant's attorney out of the presence of the matron of the maternity home where the girls were confined.
In many of the cases cited in the ALR annotation the witnesses sought to be interviewed were in jail for one reason or another. Obviously, there is a vast difference in custody by the Children's Services Division and jailhouse custody, but the reasons for allowing the interviews are the same in both situations. VI Wigmore on Evidence § 1850, 512-513 (Chadbourn Revision 1976) explains:
"On the one hand, it is fair to an accused to supply to him advance notice of the testimony that is to be used; on the other hand, it contains risks of tampering successfully with that testimony to permit an unscrupulous accused to confer with the witness. The practical solution is to leave the matter in the hands of the trial court, who could permit the consultation under proper safeguards: * * *."
Wigmore then goes on to quote extensively from Leahy v. State, 111 Tex.Cr. 570, 587, 13 S.W.2d 874, 882 (1929) which quotes from State v. Papa, 32 R.I. 453, 459, 80 A. 12 (1911). A part of that quote is as follows:
"The attorney for the defendant not only had the right, but it was his plain duty towards his client, to fully investigate the case and to interview and examine as many as possible of the eye-witnesses to the assault in question, together with any other persons who might be able to assist him in ascertaining the truth concerning the event in controversy. Witnesses are not parties and should not be partisans; they do not belong to either side of the controversy; they may be summoned by one or the other or both, but are not retained by either. It would be a most unfortunate condition of affairs if a party to a suit, civil or criminal, should be permitted to monopolize the sources of evidence applicable to the case to use or not as might be deemed most advantageous ... The defendant, therefore, has the constitutional right to have compulsory process for obtaining witnesses to testify in his behalf, he has also the *783 right either personally or by attorney to ascertain what their testimony will be."
In none of the cases that I have found was the authority of the trial judge to allow the interview questioned. All of the cases seem to turn upon whether or not the trial judge abused his discretion in that particular situation.[1]
The majority opinion says that there is no statutory authority to issue orders concerning conduct outside of the court by persons who are not a party to the case. I would find that the trial judge's authority to allow the interview stems from two sources: (1) the case law from other jurisdictions, and (2) the inherent power of the court. The inherent power of the trial court reaches beyond the "keeping of time" and asking witnesses "to speak up."[2]
NOTES
[1]  The court's order is directed to "Children's [sic] Protective Services," (CPS), while plaintiff-relator here is the Administrator of the Children's Services Division (CSD). An organization chart of CSD dated 3/17/82, reveals that Child Protective Services is one of six CSD field operations in Region 1, apparently Multnomah County. Local offices of the CSD investigate and report child abuse. See ORS 418.740 to 418.775. At trial, the terms "Childrens Protective Services," "CPS," "Children's Services Division," and "CSD" were used interchangeably. Like the parties, we shall assume that CPS and CSD are equivalent, for purposes of this case.
[2]  We do not, of course, refer to directions to jurors and bailiffs or other court employees.

Certain kinds of official misbehavior or unlawful interference with court proceedings can be contempt of court. ORS 33.010(c), (d), (h), (i).
[3]  See Commonwealth v. Balliro, 349 Mass. 505, 209 N.E.2d 308 (1965), Annot., 14 ALR3d 652 (1967).
[4]  Many courts derive the right to interview witnesses from state constitutional rights to compulsory process. State v. Burri, 87 Wash.2d 175, 550 P.2d 507, 512 (1976); State v. Lerner, 112 R.I. 62, 308 A.2d 324, 334-35 (1973); Wisniewski v. State, 51 Del. 84, 92, 138 A.2d 333 (1957). Contra, State v. Goodson, 116 La. 388, 40 So. 771, 775 (1906). Some courts imply it from a defense right to a list of witnesses, Exleton v. State, 30 Okl.Cr. 224, 235 P. 627, 630 (1925), or to effective counsel, Burri, supra; Wilson v. State, 93 Ga. App. 229, 91 S.E.2d 201 (1956).

The right to compulsory process is sometimes held to imply a broad state constitutional right of the accused to have a fair opportunity to prove his innocence. Leahy v. State, 111 Tex.Cr. 570, 13 S.W.2d 874, 882 (1929); State v. Papa, 32 R.I. 453, 80 A. 12, 15 (1911). See also State v. Orona, 92 N.M. 450, 589 P.2d 1041, 1043 (1979) (right to present a defense); Balliro, supra n. 3 (same); People v. Butler, 23 Ill. App.3d 108, 318 N.E.2d 680 (1974) (right to fair trial).
Some federal courts derive the right from due process or an unspecified clause of the sixth amendment. See e.g. Kines v. Butterworth, 669 F.2d 6, 9 (1st Cir.1981), cert. den., ___ U.S. ___, 102 S.Ct. 2250, 72 L.Ed.2d 856 (1982); United States v. Murray, 492 F.2d 178, 194 (9th Cir.1973), cert. den. sub nom. Roberts v. United States, 419 U.S. 854, 95 S.Ct. 98, 42 L.Ed.2d 87 (1974).
Washington v. Davis, 388 U.S. 14, 87 S.Ct. 1920, 18 L.Ed.2d 1019 (1967), which incorporated the sixth amendment right to compulsory process into 14th amendment due process, stated:
"The right to offer the testimony of witnesses, and to compel their attendance, if necessary, is in plain terms the right to present a defense, the right to present the defendant's version of the facts as well as the prosecution's to the jury so it may decide where the truth lies. Just as an accused has the right to confront the prosecution's witnesses for the purpose of challenging their testimony, he has the right to present his own witnesses to establish a defense."
388 U.S. at 19, 87 S.Ct. at 1923. This has led to a line of decisions that the defendant's rights are violated when the government deports a potential witness before defendant has an opportunity to examine him. See United States v. Avila-Dominguez, 610 F.2d 1266, 1268-69 (5th Cir.), cert. den. sub nom. Perez v. United States, 449 U.S. 887, 101 S.Ct. 242, 66 L.Ed.2d 113 (1980).
[5]  ORS 44.240 provides for examination of a witness confined in a state correctional institution.

See also State ex rel. Gladden v. Sloper, 209 Or. 346, 306 P.2d 418 (1957), which denied a circuit court's power in a divorce proceeding to direct a comparable order to the warden of the state penitentiary for lack of statutory authority.
[1]  In State v. York, supra, we implied that the trial court had authority to order an interview when 291 Or. at page 543, 632 P.2d 126 we said: "For example, if prior to trial the defense attorney becomes aware of improper prosecutorial efforts to prevent interviewing of witnesses, assistance of the court could be requested."
[2]  20 Am.Jur.2d 440 Courts § 79 (1965).
