We hold that the trial court properly determined that defendant was entitled to a disclosure of the identity of the informer in the circumstances of this case and that the indictment was properly dismissed in the interest of justice when the People elected not to make such disclosure. Additionally the constitutional prohibition against double jeopardy would mandate reinstatement of the order dismissing the indictment.
With the assistance of a confidential informer, two undercover police officers set up a prearranged meeting for the purchase of $1,000 of heroin from one Gregory Bruce, known to the police to be a seller. As arranged, the meeting took place at a shopping center at 9:00 p.m. When the police and *468the informer met Bruce at the appointed place, defendant and Bruce’s cousin were also found to be present. Neither defendant nor the cousin had previously been known to either undercover officer or to the informer, and the prearrangements had not contemplated their participation or presence. One of the officers asked Bruce whether he had the heroin. It was the officer’s testimony that when Bruce responded in the affirmative defendant removed his hat and held it out across his chest toward Bruce, whereupon Bruce reached in and took a package (later proved to contain heroin) out of defendant’s hat. Bruce immediately took off his own ski cap and placed the package in the ski cap. Bruce then proceeded with the two undercover officers and the informer to the informer’s car to make delivery and to close the transaction. Defendant told Bruce to get the money while he went to call a cab. The police officer tasted a bit of the white substance in the package and then told his fellow officer to get the money from the trunk of the car. The insertion of the key in the trunk was the prearranged signal on which detectives staked out nearby closed in, took possession of the package of heroin, and arrested both undercover officers, the informer, Bruce, his cousin and defendant.
At trial much attention and controversy focused on the undercover officers’ testimony on the witness stand that defendant had removed his hat and held it out to Bruce and that Bruce had withdrawn the heroin package from that hat. The notes made by one of the officers the night of the arrest contained no mention of any hat, or that defendant had taken his hat off or held it out to Bruce, or that Bruce had obtained the package of heroin from defendant’s hat. The only other written report, prepared by the same officer some five weeks later, similarly included no reference to the events of the hat. The People offered no other evidence of any offer to sell on the part of defendant.
In these circumstances we conclude that it was not error as a matter of law under the rule enunciated in People v Goggins (34 NY2d 163) for the Trial Judge to have directed the disclosure of the identity of the informer. The informer was present and an eyewitness to the entire transaction on which the charge against defendant was based; indeed the transaction was closed in his automobile. It is true that the particular crucial factual issue in Goggins was the identification of the defendant. But it was not intended that the rule should be *469restricted to matters of identification only. The principle recognized is of broader import—"the truly crucial factor in every case is the relevance of the informer’s testimony to the guilt or innocence of the accused” (34 NY2d, at p 170).
In the case now before us defendant’s guilt hinged on determination that the events of the hat had in fact occurred as the People claimed. Thus, whether defendant was merely a bystander or an active participant in the sale of the heroin depended entirely on acceptance of the undercover officers’ testimony with respect to the events of the hat. This evidence was first elicited on the witness stand and had not been contained in either of the contemporaneous written police reports. There was no other proof of any conversations or nonverbal acts which might be deemed to constitute an offer to sell emanating from defendant. Nor was there any other evidence that defendant had provided the heroin. The particular issue with respect to the events of the hat could scarcely have been more crucial to a determination of defendant’s guilt or innocence.
There are evident weighty considerations countervailing against disclosure of the identity of police informers (cf. People v Goggins, 34 NY2d 163, 176 [dissenting opn], supra; People v Darden, 34 NY2d 177, 181-182). That this was so in this case must be concluded from the fact that the prosecutor here elected to abandon the case rather than to make disclosure. It is thus appropriate in balancing the legitimate interests of this defendant and the competing, broad interests of the State, to consider not only the critical significance of the particular issue on which testimony is sought from this informer, but also to appraise defendant’s predicament and the availability of alternative means open to him to establish his innocence. It is not conclusive against disclosure, however, to note that on the witness stand both undercover officers gave identical testimony as to the events of the hat or that defendant himself could have taken the stand and thus have created a one-on-two issue of credibility. It would be relevant and highly material, on the other hand, if the subject matter testimony which defendant sought to elicit from the informer might also have been obtained from other witnesses, a demonstration not made or attempted by the prosecutor. Although both Bruce and his cousin were eyewitnesses to the transaction, the prosecutor in the trial court did not urge the availability of such testimony as grounds for denying disclosure of *470the identity of the informer. While the record does not reveal the details, it appears that Bruce had been charged with and pleaded guilty to a narcotics charge arising out of this same transaction. Note was taken that he might exercise his constitutional right to refuse to testify. Nor could defense counsel be expected to derive any solid solace from the possibility of testimony from Bruce’s cousin, if indeed the cousin was available at the time of trial, a circumstance not disclosed on the record before us. In any event it cannot be said that there were available to defendant such alternative sources of the relevant evidence as to warrant protection of the anonymity of the informer in this case (cf. Roviaro v United States, 353 US 53). Disclosure of the identity of the informer was essential to a fair trial.
For the reasons stated, we conclude that it was not error for the Trial Judge, with the added advantages of evaluation which always attend at that level, to have directed disclosure of the identity of this informer.
We next hold that it was error for the Appellate Division to have concluded that in dismissing the indictment in the interest of justice there was such failure to comply with the requirements of CPL 210.40 and 210.45 as to constitute reversible error. Presumably the reference to these sections refers to the requirements that a motion to dismiss an indictment such as that made here must be made in writing and upon reasonable notice to the People and that a hearing be held.1 We find no procedural error in the trial court’s disposition of defendant’s motion to dismiss the indictment. The application for disclosure of the identity of the informer was first made during the course of the testimony of the People’s first witness, one of the two undercover officers. At that time the application was denied as premature with leave to renew. At the conclusion of the testimony of both undercover officers the application was renewed. There followed colloquy between the Trial Judge and both counsel with reference to disclosure procedures, and the record reveals extensive argumentation and consideration of the right of defendant to the disclosure. Finally the Trial Judge directed the prosecutor to produce the informer for an in camera examination by the court. When the prosecutor declined to comply with the direction of the court, defense counsel moved to dismiss the indictment in the *471interest of justice, and the trial court granted the motion. No contention was then made by the prosecutor that the motion was not in writing, or that he had not been given reasonable notice or an opportunity to be heard; nor did he request the formality of-any further hearing. We perceive no aspect in which the procedural rights of the People were in any way prejudiced by the sensible and wholly understandable manner in which the Trial Judge disposed of defendant’s motion to dismiss.
The order of the Appellate Division should be reversed and the order dismissing the indictment reinstated.2
Chief Judge Breitel and Judges Jasen, Gabrielli, Wachtler, Fuchsberg and Cooke concur.
Order reversed and the order of Nassau County Court reinstated.
. The correctness of the procedural determination at the Appellate Division is not addressed by the People on the appeal before us.
. If we were to dispose of this appeal on the basis of the constitutional proscription against double jeopardy, we would remit the case to the Appellate Division with directions that the appeal to that court be dismissed (People v Casiel, 41 NY2d 945; cf. People v Brown, 40 NY2d 381, cert den 433 US 913, mot for rearg den 42 NY2d 1015).