Facts of Case
The defendant, Gene Leslie Mathiesen, was convicted at a jury trial of three counts of possession of a controlled substance, each offense occurring on a different date. He appeals from his conviction on count 2, possession of a controlled substance with intent to manufacture or deliver, committed on February 5, 1979.
The sparse record before us indicates that the defendant's arrest on the charge in question resulted from evidence obtained pursuant to a search warrant issued on the basis of a police officer's affidavit and, in turn, that the officer's affidavit was based on information supplied to him by a confidential informant.
The affidavit supporting the search warrant was sealed. This apparently was done on an ex parte application of the prosecuting attorney. The defendant's motion to compel disclosure of the identity of the informant was denied by the trial court. That ruling has not been assigned as error and therefore it is the law of this case that the informant's identity is privileged.
The defendant also moved to require production of the affidavit supporting the search warrant. The motion was denied on the basis that the facts included in the affidavit would allow the defendant to identify the informant.1 It is that ruling, and the refusal of the trial court to suppress *259the evidence obtained by means of the search warrant, which are the errors assigned by the defendant on this appeal.
One issue is dispositive.
Issue
Did the trial court err in denying the defendant access to the entire affidavit supporting a search warrant?
Decision
Conclusion. A defendant confronted with incriminating evidence obtained pursuant to a search warrant is entitled to examine the affidavit supporting the search warrant. To the extent that the affidavit discloses the identity of a confidential informant, however, the trial court may at an in camera hearing excise the identifying portions.
So far as we can determine, the issue before us is one of first impression.
The constitutional prohibition against the issuance of search warrants except on probable cause supported by oath or affirmation is part of the historic effort to secure the people against unreasonable searches and seizures and to prescribe minimum standards for the issuance of warrants. See U.S. Const, amend. 4; Warden v. Hayden, 387 U.S. 294, 301, 18 L. Ed. 2d 782, 87 S. Ct. 1642 (1967). In this state search warrants may issue only upon an affidavit or affidavits establishing proper grounds. CrR 2.3(c).
In determining the validity of a search warrant, the primary question is whether or not the affiant had reasonable grounds at the time the affidavit was made to believe that the law was being violated on the premises to be searched. Dumbra v. United States, 268 U.S. 435, 441, 69 L. Ed. 1032, 45 S. Ct. 546 (1925). That determination in turn depends upon the sufficiency of the showing before the magistrate at the time the search warrant issued. Aguilar v. *260Texas, 378 U.S. 108, 112-13, 12 L. Ed. 2d 723, 84 S. Ct. 1509 (1964).
A defendant is entitled to challenge the probable cause determination and the affidavit at a suppression hearing. We are unable to perceive how a defendant can challenge whether or not a search warrant was issued on "probable cause, supported by oath or affirmation" as required by the Fourth Amendment if he is denied the opportunity to examine the affidavit. Thus, the trial court erred by denying the defendant any access to the affidavit supporting the search warrant.
The State has a countervailing right, however, to protect the identity of confidential informants. CrR 4.7(f)(2); State v. Harris, 91 Wn.2d 145, 148, 588 P.2d 720 (1978). It has repeatedly been held that disclosure of a confidential informant's identity is not required where the issue is the existence of probable cause for the search, as distinguished from questions bearing upon the guilt or innocence of the accused. State v. Sewell, 11 Wn. App. 546, 548, 524 P.2d 455 (1974); State v. Edwards, 6 Wn. App. 109, 112-15, 491 P.2d 1322 (1971). Therefore, while the defendant is entitled to examine the affidavit supporting the search warrant, he is not entitled to learn the identity of the informant.
The appropriate means of balancing the rights of the defendant and the State is for the trial court, in the manner provided in CrR 4.7(h)(5) and (6), to make an in camera examination of the affidavit for the search warrant and excise the portions necessary to protect the informant's identity.2 The affidavit for the search warrant shall then be released to the defendant. If the defendant wishes to challenge the search warrant for failure to show probable cause or otherwise, a hearing shall be held in the trial court for that purpose. If after a hearing, the trial court determines *261that the search warrant was properly issued, the defendant's conviction is affirmed; but should the trial court determine that the search warrant was improperly issued, the evidence obtained through it should be suppressed and the defendant granted a new trial on count 2. Cf. State v. Harris, supra at 148.
Remanded for further proceedings in accordance with this opinion.
Ringold and Durham-Divelbiss, JJ., concur.
Reconsideration denied October 29, 1980.
Review denied by Supreme Court December 19, 1980.
Deciding this case on the basis we do, it is unnecessary to discuss whether or not the prosecutor is entitled to have the affidavit for a search warrant sealed in the first instance. Cf. CrR 4.7(h)(4). It should be observed parenthetically, however, that affidavits for search warrants are customarily prepared so as to state the *259factual basis on which the search warrant is requested yet, at the same time, so as not to divulge the identity of any confidential informant.
Although the trial court apparently reviewed the affidavit in camera, it was not made part of the record on appeal and we are thus unable to review it ourselves. See CrR 4.7(h)(6); State v. Potter, 25 Wn. App. 624, 630, 611 P.2d 1282 (1980).