OPINION
HOWARD, Judge.This special action was taken from the order of the trial court denying the state’s motion to depose the real parties in interest pursuant to Ariz.R.Crim.P. 15.3, 17 A.R.S. The petition presents a question pertaining to the applicability of the immunity statute, A.R.S. § 13-4064, to the criminal discovery rules. Because the state has no equally plain, speedy or adequate remedy by appeal, we accept jurisdiction.
The factual and procedural background is as follows. On the afternoon of January 28, 1988, the bodies of Rene Clifton and Barbara Jean Clifton, Rene’s mother, were discovered in their residence. Each woman had been shot in the head. The real parties in interest, Engebretson and Luzanilla, who were friends of Rene, had visited the residence late on the prior evening. After leaving the residence, they took an automo-' bile belonging to Rene and drove to San Diego. On the afternoon of the 28th, Luzanilla called the San Diego Police Department and reported that Engebretson had shot the two women. Engebretson was arrested several weeks later in possession of Rene’s car and told police that Luzanilla had killed the victims.
The grand jury indicted both Engebretson and Luzanilla on two counts of first-degree murder, and one count each of first-degree burglary, second-degree trafficking in stolen property, class 3 theft and class 6 theft. Both moved to sever the trials because of their antagonistic defenses. The state filed motions to depose both defendants pursuant to Rule 15.3, and subsequently requested orders compelling their deposition testimony under a grant of immunity provided by A.R.S. § 13-4064. The trial court granted the motions to sever, but denied the motions for deposition. This special action followed.
Rule 15.3 of the Rules of Criminal Procedure provides in pertinent part:
a. Availability. Upon motion of any party or a witness, the court may in its discretion order the examination of any person except the defendant upon oral deposition under the following circumstances:
(2) A party shows that the person’s testimony is material to the case or necessary adequately to prepare a defense or investigate the offense, that he was not a witness at the preliminary hearing, and that he will not cooperate in granting a personal interview.
The basis for the trial court’s order is not entirely clear from the record. Although the state did not represent that it had attempted to interview the defendants and that they had refused to cooperate, its motions alleged that the defendants had “previously refused to answer questions before *575this Court on the grounds that [they] may be incriminated,” and that neither defendant indicated he would willingly be interviewed by the state. The trial court’s conclusion that there was no “factual predicate” for ordering the depositions is unsupported.
The state contends that, as a result of the severance, each defendant may and will be called as a witness in the trial of his co-defendant. By immunizing the testimony of each pursuant to A.R.S. § 13-4064, the state argues that the trial court can protect each defendant’s privilege against self-incrimination because the state will be precluded from using either the statements of the defendant or any evidence derived therefrom in any subsequent prosecution. The defendants contend that the immunity statute does not apply to depositions ordered pursuant to Rule 15.3 and that, notwithstanding the grant of immunity, their respective privileges against self-incrimination will be violated if the state is permitted to depose them. The trial court apparently agreed that the immunity statute does not apply to Rule 15.3 depositions, but left open the possibility that the state may call each defendant as a witness at the trial of the other defendant.
Our immunity statute provides:
In any criminal proceeding before a court or grand jury, if a person refuses to answer a question or produce evidence of any other kind on the ground that he may be incriminated thereby and if the prosecuting attorney, in writing, requests the court to order that person to answer the question or produce the evidence, the court may so order and that person shall comply with the order. When the court denies such a request, the court shall state its reasons for denial in writing. After complying, such testimony or evidence, or any information directly or indirectly derived from such testimony or evidence, shall not be used against the person in any proceeding or prosecution for a crime or offense concerning which he gave answer or produced evidence under court order. However, he may nevertheless be prosecuted or subjected to penalty or forfeiture for any perjury, false swearing or contempt committed in answering, or failing to answer, or in producing, or failing to produce, evidence in accordance with the order. If a person refuses to testify after being granted immunity and after being ordered to testify as aforesaid, he may be adjudged in contempt and committed to the county jail. If the grand jury before which he was ordered to testify has been dissolved, he may then purge himself by testifying before the court.
A.R.S. § 13-4064.
The purpose of immunity statutes is to assist prosecutors in apprehending criminals “by inducing them or their confederates to turn state’s evidence and tell on each other or to place at the disposal of the prosecuting attorney evidence which constitutional provisions granting a witness the privilege of refusing to testify against himself make unavailable.” Smith v. Superior Court, Pima County, 17 Ariz.App. 79, 81, 495 P.2d 519, 521 (1972). The constitutionality of such statutes has been upheld repeatedly, subject to the proviso that the protection afforded by immunity must be coextensive with the fifth amendment. Kastigar v. United States, 406 U.S. 441, 92 S.Ct. 1653, 32 L.Ed.2d 212 (1972); John Doe I v. Superior Court, in and for Pima County, 149 Ariz. 169, 717 P.2d 473 (App. 1985).
Nothing in the broad language of our statute, which by its terms applies to “any criminal proceeding before a court or grand jury,” supports the restrictive interpretation urged by the defendants in this case. Clearly, had the state sought separate indictments, each defendant could have been called before the grand jury to testify under a grant of use immunity in the proceedings pertaining to the other. The same result would follow in criminal proceedings initiated by way of complaint and preliminary hearing. We see no reason why the immunity statute should not also apply to depositions ordered pursuant *576to Rule 15.3(a).1
A compelling reason exists for holding that the statute does apply. If, as suggested by the trial court, the state were to call one defendant as a witness in the trial of the other, knowing that he will refuse to testify, a serious risk of mistrial or reversal would result on grounds of prosecutorial misconduct and sixth amendment violations. See State v. Moya, 138 Ariz. 7, 672 P.2d 959 (App.1983); State v. Blankinship, 127 Ariz. 507, 622 P.2d 66 (App.1980). One purpose of the criminal discovery procedures is to avoid surprise issues and the resulting confusion and error at trial. Comment, Arizona’s New Rules of Criminal Procedure: A Proving Ground for the Speedy Administration of Justice, 16 Ariz.L.Rev. 167, 180 (1974). Permitting the state to depose an uncooperative witness who may assert his fifth amendment privilege, to request a grant of immunity where appropriate, and to obtain a ruling on that request from the trial court furthers this purpose and avoids the problems created when a witness asserts the privilege at trial. In sum, we hold that A.R.S. § 13-4064 applies to requests for deposition pursuant to Rule 15.3(a).
So long as immunity is afforded under the statute there is no reason to deny the state’s request for depositions in this case. The defendants’ principal contention is that there is no way adequately to protect their privilege against self-incrimination by a grant of immunity under the circumstances presented by this case. While this may be true, the issue is prematurely presented to this court. We reiterate that the protection afforded by immunity must be coextensive with the fifth amendment, and requires “the exclusion in any prosecution of any evidence derived from any answer given in response to a grant of use immunity.” John Doe I v. Superior Court, in and for Pima County, 149 Ariz. at 171, 717 P.2d at 475. In any prosecution of either defendant following his deposition, the state must be prepared to prove that its case is not based on any information obtained directly or indirectly from that defendant’s deposition testimony. Whether the state will be able to make the requisite showing is an issue for the trial court’s determination at the appropriate juncture in the proceedings.
Finally, the defendants argue that the decision whether to permit depositions or to grant immunity is a matter committed to the discretion of the trial court, and that we ought not to interfere with the exercise of that discretion. While we agree with the first point, we cannot sustain an order based on a misapprehension of the facts or a misapplication of the law. From the record in this case, it appears that the trial court denied the state’s motion on grounds that we have found to be unsupported by the record or contrary to law. We must therefore grant the state’s request for relief.
The order of the trial court is vacated and the matter is remanded for further proceedings consistent with this opinion.
LIVERMORE, P.J., and HATHAWAY, J., concur.. Engebretson and Luzanilla also contend that they are defendants within the meaning of Rule 15.3(a) and thus not subject to deposition. As a _ result of the order severing the trials, while they may be witnesses at each other’s trial, they are no longer defendants within the meaning of the rule.