OPINION OF THE COURT
Simons, J.Defendant has been convicted of criminal possession of marihuana in the first degree after pleading guilty to the indictment. He now seeks reversal of the judgment contending that the indictment was fatally defective because the only evidence before the Grand Jury connecting him with the crime was the testimony of a police officer who subsequently told the prosecutor that he was unable to identify defendant as a participant in the crime and that he had misunderstood the question which caused him to do so. Defendant contends that because the prosecutor knew of this mistake before defendant’s plea, he should have resubmitted the matter and corrected the proceedings and that his failure to do so mandates that the conviction be reversed and the indictment dismissed. We agree. The Grand Jury could indict only upon legally sufficient evidence and when the prosecutor learned of the error while the proceedings were still pending, before defendant’s plea, he was obliged to correct the error by obtaining a new accusatory instrument.
*100The charge arose out of an intensive drug investigation which resulted in the arrest and indictment of 33 defendants for criminal possession of marihuana. The crimes were committed during the early morning hours of September 3, 1981, when a vessel known as the “Miss Marge” sailed into Gardiner’s Bay, Long Island, and dropped anchor off shore from the premises at 51 Milina Drive, Easthampton. Over the next several hours, some 72 bales of marihuana were removed from “Miss Marge”, transported to shore by smaller boats, and then loaded onto a truck parked on the Milina Drive premises. These activities, both on and off shore, were observed by police officers from 2:00 a.m. until approximately 5:30 a.m. through a night scope. After the unloading was completed, at approximately 6:00 a.m., the officers arrested everyone in the house at 51 Milina Drive. Twenty-one persons were inside, including defendant. Other defendants were arrested subsequently in the boats. It was later to develop that none of the officers were able to identify defendant as having participated in any part of the unloading operation or any other criminal activity that evening. He was arrested because he was in the house with other defendants.
The case was handled by two Assistant District Attorneys. The ADA in charge of the prosecution was on vacation when the case went before the Grand Jury on September 9, 1981, and an associate who had no prior connection with it made the presentment. The only evidence relating to defendant appears during the following testimony by Officer Tuthill:
Q. Did there come a time when a number of individuals were arrested within that house?
A. Yes, there were.
Q. Approximately, how many, do you know?
A. I’d say approximately, twenty-one.
Q. Those twenty-one individuals, were they under your observations with respect to off-loading the Unapplied Times, off-loading the four Zodiac rafts and transporting the bales of what you suspected to be marijuana into the truck located on the east side of 51 Milina Drive?
A. Yes, they were.
*101Q. Do you know the names of those twenty-one individuals you made those observations of?
A. Yes.
Q. Would you please indicate to the Grand Jury the names of those twenty-one individuals?
A. * * * P-E-L-C-H-A-N-T, David R. [sic].
In late October or early November, 1981, before defendant’s plea, the prosecutor in charge of the case was told by Officer Tuthill that he had not observed defendant engage in any criminal activity and that he had misunderstood the questions asked by the prosecutor’s associate before the Grand Jury. The prosecutor testified that from that moment on he knew that “the only testimony I had about Pelchat was that he was carrying a football jersey, dungarees and sneakers; or he was fully dressed with a football jersey on, in the ground floor of the house [when he was arrested].” Nevertheless, the prosecutor failed to disclose Tuthill’s admissions or make any effort to correct the Grand Jury proceedings, leaving both the Grand Jury and the court with the false impression that Officer Tuthill had actually observed defendant engage in some criminal activity when in fact he had never made any such observation and had not intended to testify that he had. Defendant subsequently pleaded guilty to the indictment immediately before trial. Before he was sentenced Officer Tuthill appeared as a witness at the trial of the remaining defendants. After first testifying that he “thought” he had seen defendant carrying a bale of marihuana but wasn’t sure, he then admitted that neither he nor his partner, Officer Lia, had observed defendant participating in any criminal activity. He testified that he had advised the Assistant District Attorney of this and that he had explained to him that he understood his associate’s questions before the Grand Jury as merely a request for a list of the persons arrested that night and not a request for the names of the individuals he had actually observed engaging in criminal activity:
Q. How about a Mr. Pelchat? Did you have a discussion on the front lawn with regard to a Mr. Pelchat?
A. Yes.
*102Q. And was that with regard to what you had observed Mr. Pelchat do that night?
A. I thought I saw Mr. Pelchat carrying a bale of marijuana but I wasn’t quite sure it was him. And Lia told me he didn’t see him doing anything. And I wasn’t absolutely positive that it was Pelchat.
Q. You weren’t positive?
A. I wasn’t absolutely positive it was Pelchat.
Q. And did Lia dissuade you from the fact that Pelchat had done anything?
A. No. But I’m not going to implicate the man if I partially saw him. And Lia didn’t see him at all.
Q. You wouldn’t do that?
A. No. I wouldn’t.
Q. Did you testify under oath in a grand jury, sir?
A. Yes, I did.
Q. Were you asked these questions and did you give these answers, sir? Under oath in the grand jury. Which led to these proceedings.
[reads Grand Jury testimony quoted above]
A. I believe so.
Q. You just told this jury that you didn’t see Gregorek do anything, did you?
A. I was giving the men [sic] a list of the names of the individuals that were arrested from 51 Milina Drive.
Q. You were giving the man a list of names?
A. Yes.
Q. Did you just tell us a couple of moments ago that you understood the question?
A. I do now.
Q. Did you understand the implications of your testimony in the grand jury?
A. I thought the ADA was asking for the subjects that were arrested from 51 Milina Drive. And that’s what I gave him. I wasn’t trying to mislead anyone.
Q. Did you also indicate, sir, that you observed Pelchat, David R.?
A. I don’t know, did I?
*103Q. And were you asked, sir, by Mr. Castellano where [sic] in fact individuals who you were about to name were observed by you off-loading zodiacs, carrying bales and moving marijuana on the morning of September 3rd?
A. The first question that Mr. Castellano asked me was to name the 21 — to me, I thought he said name the 21 people that are arrested from the house. And that’s what I did.
Q. At any time did you tell the Assistant District Attorney Pelchat did nothing? Did you tell him that?
A. Yes, I did.
Q. Would it be fair to say, sir, that neither you nor Lia which you deduced from talking to him, had seen any of those four men do anything?
A. Like I said, I hadn’t seen Pelchat, Gregorek or Segal do anything.
Upon learning of this testimony, prior to sentencing, defendant moved to withdraw his guilty plea and to dismiss the indictment. On the return date, March 16, 1982, the trial court ruled, as it had on defendant’s preplea motion to dismiss, that the evidence before the Grand Jury was sufficient. It also ruled that by pleading guilty defendant had waived his right to challenge the indictment or to challenge the prosecutor’s failure to disclose the Tuthill statements as Brady material (see Brady v Maryland, 373 US 83). The court ordered a hearing, however, to determine whether the prosecutor had known prior to the Grand Jury presentation of Tuthill’s inability to connect defendant with the crime.
After the hearing, the trial court concluded that “the District Attorney * * * did not seek to indict the defendant by the knowing use of perjurious or mistaken testimony. He was not aware of the limited notice of the Police Officer’s observation as to this defendant until after the indictment had been handed up.” The Appellate Division affirmed, holding that defendant had waived any objections to the indictment and that the information was not Brady material.
*104We accept the finding of the courts below that the record does not support any claim that the prosecutor knew of the deficiency in the evidence before presenting the case. Indeed, it appears that the presenting attorney knew very little about the case. He had not seen defendant’s arrest report (which apparently stated only that defendant was arrested in the house) and he had a relatively brief conversation with the police officers to obtain an “overview” of the crime before they testified about these several arrests. He later testified at a posttrial hearing:
Q. [Interposing] Well, in the grand jury, in your mind, Tuthill told you he saw Pelchat doing something inculpatory; is that right?
A. In the grand jury, in my mind, he indicated to me that Mr. Pelchat, along with the other individuals, was participating in some aspect of the off-loading.
Q. What aspect did he indicate to you Pelchat was involved in?
A. He did not indicate that to me. Nor did I inquire, sir.
The court made no findings on the prosecutor’s subsequent discovery of Officer Tuthill’s mistaken testimony but the evidence on the point is undisputed.
Resolution of the appeal depends upon fundamental considerations governing the operation of two integral parts of the criminal justice system: the Grand Jury’s constitutional function to indict and the prosecutor’s duty of fair dealing.
The Constitution mandates that no person shall be held to answer for an infamous crime unless upon indictment of the Grand Jury (NY Const, art I, § 6). The section is similar in form and purpose to that contained in the Fifth Amendment to the United States Constitution. The idea underlying both these provisions was to preserve on the English model a fair method for instituting criminal proceedings against persons believed to have committed crimes. The Grand Jury was created as an investigative and accusatory body made up of laymen from the general population and given the function of assessing the sufficiency of the prosecutor’s case, thus insulating the innocent from governmental excesses. Unhampered by technical legal rules of procedure and evidence and divorced from the control of the *105government, the grand jurors were free to make their presentments and indictments as they deemed satisfactory, “pledged to indict no one because of prejudice and to free no one because of special favor” (Costello v United States, 350 US 359, 362; and see People v Glen, 173 NY 395, 401; United States v Umans, 368 F2d 725, 730). The Grand Jury’s role and procedures are now defined by statute (CPL art 190). It remains the exclusive judge of the facts with respect to any matter before it (CPL 190.25, subd 5) and it may indict for an offense only if the evidence spells out a legally sufficient case and reasonable grounds to believe defendant committed the offense charged (CPL 190.65, subd 1). “Legally sufficient evidence” means competent evidence which, if accepted as true, would establish every element of the offense and the defendant’s commission of it (CPL 70.10, subd 1; People v Haney, 30 NY2d 328, 335-336). The test is whether the evidence before the Grand Jury if unexplained and uncontradicted would warrant conviction by a trial jury (People v Valles, 62 NY2d 36; People v Dunleavy, 41 AD2d 717, affd 33 NY2d 573). It is this judgment of the Grand Jury, expressed in an indictment, which provides the predicate for the court’s jurisdiction (CPL 100.05; Matter of Simonson v Cahn, 27 NY2d 1).
The other subject for consideration is the prosecutor’s responsibility under the circumstances presented. It is familiar doctrine that a prosecutor serves a dual role as advocate and public officer. He is charged with the duty not only to seek convictions but also to see that justice is done. In his position as a public officer he owes a duty of fair dealing to the accused and candor to the courts, a duty which he violates when he obtains a conviction based upon evidence he knows to be false. Such misconduct may impair a defendant’s due process rights and require a reversal of the conviction (see, e.g., People v Robertson, 12 NY2d 355; People v Savvides, 1 NY2d 554; People v Creasy, 236 NY 205, 221; Napue v Illinois, 360 US v Texas, 355 US 28). It goes without saying that this duty also rests upon the prosecutor during pretrial proceedings (see, e.g., People v Geaslen, 54 NY2d 510; People v Cwikla, 46 NY2d 434) and the proceedings relating to indictment both at presentment and afterwards. “It is a serious matter for any *106individual to be charged with crime whether the charge be true or false” and it is as important “ ‘that he be fairly and justly accused * * * as that he be fairly and impartially (People v Minet, 296 NY 315, 322-323, quoting Matter of Gardiner, 31 Misc 364, 375). Thus we have held a defendant has a procedural right to challenge an indictment founded upon inadequate or improper evidence which is of constitutional dimension (Matter of Jaffe v Scheinman, 47 NY2d 188, 194; People v Sexton, 187 NY 495, 511-512).
Indictments are presumed to be valid (People v Bergerson, 17 NY2d 398, 402; People v Howell, 3 NY2d 672, 675; People v Sexton, supra), and they are rarely open to attack on grounds of inadequacy after a conviction because such attacks lend themselves to abuses (see Costello v United States, supra; Holt v United States, 218 US 245; and see CPL 210.30). However, courts have exercised their inherent powers to dismiss an indictment, even then, when there was a total lack of evidence before the Grand Jury (see People v Glen, 173 NY 395, 400, supra), when the quality of the evidence is challenged because the witness’s testimony was perjured (United States v Basurto, 497 F2d 781; cf. United States v Flaherty, 668 F2d 566; United States v Kennedy, 564 F2d 1329, cert den sub nom. Myers v United States, 435 US 944), or when the indictment is founded on hearsay testimony which the Grand Jury may not have understood as such (United States v Estepa, 471 F2d 1132). Courts have dismissed in these circumstances even though there was sufficient other reliable evidence presented, or the prosecutor acquired the knowledge of the false evidence after the indictment was handed up, or the prosecutor made a full disclosure of the falsity after discovering it (United States v Basurto, supra; cf. People v Leary, 305 NY 793). Indeed, courts have stated that indictments may be dismissed solely because they were obtained by the prosecutor for improper motives (see, e.g., United States v DeMarco, 401 F Supp 505, affd 550 F2d 1224; People v Tyler, 46 NY2d 251; Matter of Cunningham v Nadjari, 39 NY2d 314, 318).
This conviction must be reversed and the indictment dismissed because the evidence before the Grand Jury failed to meet legal standards and the prosecutor knew *107that when he permitted the court to take defendant’s plea to the full indictment. Whatever the presenting prosecutor and the Grand Jury believed Officer Tuthill meant to say when he testified before them, he subsequently made clear to the prosecutor, in private conversations and sworn statements, that he had not observed defendant engage in criminal conduct and that he had not intended to testify that he had. Tuthill’s evidence was not only material to the charges against defendant, it was the only evidence linking him to the unlawful possession of marihuana; defendant’s presence at the scene of arrest, standing alone, would not support the indictment (People v Martin, 32 NY2d 123; United States v Di Re, 332 US 581). That being so, the indictment was fatally defective because the Grand Jury had no evidence before it worthy of belief that defendant had committed a crime. Possessing the knowledge he did before the entry of the plea, the prosecutor was duty bound to obtain a superseding indictment on proper evidence or to disclose the facts and seek permission from the court to resubmit the case (see CPL 200.80,210.20, subd 4). Just as he could not sit by and permit a trial jury to decide a criminal action on evidence known to be false, he could not permit a proceeding to continue on an indictment which he knew rested solely upon false evidence (cf. People v Robertson, 12 NY2d 355; supra; People v Savvides, 1 NY2d 554, supra; Napue v Illinois, 360 US 264, supra).
To be distinguished is Grand Jury testimony sufficient when given but which through change of circumstances, such as the death of the witness (see People v Jones, 44 NY2d 76, cert den 439 US 846), or the witness’s uncertainty at trial may lose its force. Such testimony, when given, is given as intended and the minds of the prosecutor, the witness and the grand jurors understand its import. The evidence may subsequently fail its purpose for many reasons but the integrity of the Grand Jury’s fact-finding process has not been undermined because of that. Also to be distinguished are situations in which there may be latent weaknesses in the Grand Jury evidence unknown to the prosecutor and only discovered subsequent to conviction. There exists an infirmity in the Grand Jury’s indictment but the prosecutor knew none of it and the conviction *108based on defendant’s plea may stand. The cardinal purpose of the Grand Jury, however, is to act as a shield against prosecutorial excesses and this protection is destroyed and the integrity of the criminal justice system impaired if a prosecution may proceed even after the District Attorney learns that jurisdiction is based upon an empty indictment.
The People contend and the court below held that defendant waived his right to challenge the proceedings preliminary to conviction when he pleaded guilty (see People v Evans, 58 NY2d 14; People v Di Raffaele, 55 NY2d 234; People v Thomas, 53 NY2d 338; People v Lynn, 28 NY2d 196). We have held that a defendant who accepts a bargained plea to a lesser included offense may not challenge the sufficiency of the Grand Jury evidence supporting the charge in the indictment (People v Kazmarick, 52 NY2d 322, 326; People v Clairborne, 29 NY2d 950) and that is so even if there are technical defects in the proceedings, if the defects do not impair the integrity of the Grand Jury process (see People v Dunbar, 53 NY2d 868). By pleading, defendant has elected a trial strategy. He has determined, for whatever reason, that he will not litigate the question of guilt. Having made that bargain he necessarily surrenders certain rights including the right to challenge the factual basis for the plea (see People v Foster, 19 NY2d 150, 151; People v Griffin, 7 NY2d 511, 515). He does not, however, forfeit all right to challenge the court’s jurisdiction (People v Harper, 37 NY2d 96; People v Koffroth, 2 NY2d 807; People v Miles, 289 NY 360) or raise arguments of a constitutional dimension (see People v Lee, 58 NY2d 491 [constitutionality of statute]; People v Blakley, 34 NY2d 311 [speedy trial rulings]; People v Francabandera, 33 NY2d 429 [defendant’s competence to stand trial]; People v Lynn, 28 NY2d 196, supra [right to be informed of right to appeal]; see, also, Pitler, NY Crim Prac Under the CPL, § 9.11, pp 453-454; cf. Boykin v Alabama, 395 US 238). Falling into the same category is a challenge based upon a guilty plea to an accusatory instrument which is void because of the prosecutor’s knowledge that the only evidence to support it is false (see People v Peetz, 7 NY2d 147; People v Koffroth, supra; People v Sexton, 187 NY 495, 511, supra).
*109The People refer to the limiting provisions of CPL 210.30. That section provides that the validity of an order denying a motion to dismiss an indictment for insufficiency is not re viewable upon an appeal from an ensuing judgment of conviction based upon legally sufficient trial evidence. It was enacted in response to People v Nitzberg (289 NY 523) and similar cases (see Bellacosa, Practice Commentary, McKinney’s Cons Laws of NY, Book 11 A, CPL 210.30, p 93; see, also, 34 NY Jur 2d, Criminal Law, § 2283). In Nitzberg, defendant was convicted of murder after a jury trial. The judgment was reversed on appeal because of an error in the charge, not because of the insufficiency of the evidence. After the reversal defendant moved, for the first time, to inspect the Grand Jury minutes and dismiss the indictment for insufficiency because it was based solely on accomplice testimony. The trial court denied the motion but on appeal to this court, after the second trial, the judgment was reversed and the motion to dismiss granted.
CPL 210.30 changed the Nitzberg rule but it did not similarly restrict the authority of the court to review the validity of the evidence supporting an indictment after a plea of guilty. The statutory differentiation between the two situations is logical because the sufficiency of the evidence to convict following a trial is manifest from the record.
In view of our decision it is unnecessary to address defendant’s contention that the prosecutor promised to deliver all Brady material to him (see Brady v Maryland, 373 US 83, supra) and that he failed to honor that promise, and therefore violated defendant’s due process rights, by not revealing Officer Tuthill’s conversation.
Accordingly, the order of the Appellate Division should be reversed and the indictment dismissed with leave to the prosecutor to move before Supreme Court for permission to resubmit the case to the Grand Jury.
Chief Judge Cooke and Judges Jasen, Jones, Wacht-ler, Meyer and Kaye concur.Order reversed and indictment dismissed with leave to move for permission to resubmit the case to the Grand Jury.