Proceeding pursuant to CPLR article 78 to enjoin respondent from disclosing the testimony, evidence and other matters connected with the Grand Jury presentations culminating in indictments against Frank Blanch, Frank Fernandez and Louis Nadel, to said defendants or their attorneys. Defendants Fernandez and Nadel have intervened in this proceeding with the permission of this court. By order dated July 17,1981, this court held the proceeding in abeyance and remitted the matter to respondent for a written decision setting forth findings of fact and conclusions of law underlying the order granting inspection of the Grand Jury minutes. Pursuant to this court’s direction, respondent has submitted a written decision dated September 15, 1981. Petition granted, without costs or disbursements, and respondent is enjoined from disclosing the materials in question. This determination is without prejudice to the right of defendants Fernandez and Nadel, if they be so advised, to renew their motions pursuant to CPL 210.30 to inspect the Grand Jury minutes. This proceeding arises out of motions to inspect the Grand Jury minutes of four separate presentations which resulted in four indictments by Suffolk County Grand Juries: two as to defendant Blanch, and one each as to defendants Fernandez and Nadel. On April 15, 1981, these matters appeared on the calendar in the Supreme Court, Suffolk County, before Justice D’Amaro. At that time requests were made, pursuant to CPL 210.30, for the court to inspect the Grand Jury minutes in all four matters. Thereupon, petitioner delivered three cartons to the court, containing the materials relating to all four Grand Jury presentations. Thereafter, Justice D’Amaro issued three identical orders (one as to each defendant), all dated April 28, 1981, which read: “Upon the granting of defendant’s motion for inspection by the Court of the minutes of the Grand Jury, the Attorney General delivered over three cartons of such minutes to the Court. Pursuant to CPL § 210, subd. 3 [szc] the Court finds the release of the minutes to counsel for the defendant is necessary to assist the Court in making its determination of the motion to dismiss for legal insufficiency pursuant to CPL § 210.20(b) [sic]. The Court is of the further opinion that the Attorney General should be given a fair opportunity to be heard with respect to the Court’s proposed action. Accordingly, it is ordered, that the Attorney General show cause before this Court on May 14,1981 why the Grand Jury minutes in this case should not be released to defense counsel.” By order dated May 15,1981, all four indictments were transferred to the County Court, Suffolk County and, on June 23, 1981, respondent issued a single order stating simply that the motion to inspect the Grand Jury minutes was granted. Petitioner then commenced the instant proceeding pursuant to CPLR 7801 and 506 (subd [b], par 1) to prohibit the release of this material. By order dated July 17, 1981, this court held the proceeding in abeyance and remitted the matter to respondent “for a written decision setting forth findings of fact and conclusions of law underlying the *639order granting inspection of the Grand Jury minutes.” Pursuant to such direction, respondent issued a written decision dated September 15, 1981. In his decision, however, respondent disregarded this court’s instruction and limited his remarks to the issue of whether the release of the minutes would be in the public interest. He deferred to Justice D’Amaro’s ruling on the question of the release of the minutes being necessary to assist the court in making its determination of the motions to inspect the minutes and dismiss the indictments. Prohibition, although an extraordinary remedy, is an appropriate one in cases where a court acts in excess of its powers, albeit in a proceeding over which it has jurisdiction (Matter of Lee v County Ct. of Erie County, 27 NY2d 432). The remedy is not granted as a matter of right, but only as a matter of the petitioned court’s discretion (see Matter of Jaffe v Scheinman, 47 NY2d 188; Matter of Dondi v Jones, 40 NY2d 8). Prohibition will lie to prevent an unauthorized disclosure of Grand Jury material (Matter of Jaffe v Scheinman, supra; Matter of Proskin v County Ct. of Albany County, 30 NY2d 15). We do not dispute the fact that respondent had jurisdiction over the subject matter (i.e., the motions to inspect the Grand Jury minutes). It is also clear that, pursuant to CPL 210.30, a Judge has authority to release minutes or portions thereof to a defendant, if such release is deemed necessary to obtain assistance in reaching a determination on a motion to dismiss an indictment. That authority, however, is not unlimited. The statute (CPL 210.30, subd 3) contains the following caveat: “Provided, however, such release shall be limited to that grand jury testimony which is relevant to a determination of whether the evidence before the grand jury was legally sufficient to support a charge or charges contained in such indictment.” The problem in the case at bar is that not only was there no indication on the record as to why the release of all of the minutes was “relevant to a determination of whether the evidence before the grand jury was legally sufficient”, but, in addition, the court’s order effectively released to each of the defendants the minutes of the separate Grand Jury proceedings pertaining to the indictments of the other defendants, as well as the minutes of proceedings pertaining to each one’s own indictment. We fail to see how the minutes of one Grand Jury presentment can have relevance to a determination of the sufficiency of the evidence at an entirely separate presentment. In ordering the release to each defendant all of the materials handed over by petitioner, without segregating those materials pertaining to the other defendants’ indictments, respondent was clearly acting in excess of his authority under the statute, such that prohibition will lie (see Matter of Jaffe v Scheinman, 47 NY2d 188, supra). Moreover, the problem has been compounded by the fact that subsequent to the entry of the order releasing the material, defendant Blanch entered guilty pleas in satisfaction of the two indictments pending against him. Therefore, no reason exists for releasing any portion of the Grand Jury minutes pertaining to those two indictments. As indicated above, upon a proper determination that the release of the Grand Jury minutes or a portion thereof is necessary to assist the court in making a determination on a motion to dismiss an indictment, the court may release to a deféndant those portions of the Grand Jury minutes pertaining to his indictment, which are “relevant to a determination of whether the evidence before the grand jury was legally sufficient to support a charge or charges contained in such indictment” (CPL 210.30, subd 3). Accordingly, defendants Fernandez and Nadel may, if they be so advised, renew their motions for the court to inspect their Grand Jury minutes. Mollen, P. J., Lazer, Gibbons and Cohalan, JJ., concur.