Defendant, convicted of criminal contempt (Penal Law, § 215.50) for refusal to answer questions before a Grand Jury despite having been granted transactional and testimonial immunity, appeals. He contends that the Grand *14Jury proceeding was entirely illegal because, concededly, he would not have been subpoenaed as a witness before it except for an illegal search and seizure which revealed his availability as a witness and the relevancy of his testimony in a gambling investigation.
Following denial of defendant’s motion to dismiss the indictment against him on the ground already noted, he was tried in Supreme Court without a jury and convicted on 21 counts and sentenced to imprisonment of three months and a fine of $500. The Appellate Division affirmed.
At no time while defendant was before the Grand Jury did he urge the illegality of the proceeding or of the antecedent search as a ground for refusing to testify, although he was given opportunities to and did consult with counsel. Instead, he asserted only his privilege against self incrimination. Because of his limited objection he was granted immunity in due course before the Grand Jury. Thus he waived any other ground he may have had for refusing to testify and such omitted ground may not now be availed of by way of defense to the prosecution for contempt. Consequently, the order of the Appellate Division should be affirmed.
In November, 1968, the police executed a warrant to search a restaurant in the Bronx in New York City and to apprehend and search certain individuals, not including De Salvo, for gambling records. The police found De Salvo in the restaurant, searched him and his automobile parked outside, uncovering a loaded revolver, wager slips, and eavesdropping devices. De Salvo contends that the search warrant and the ensuing search were ineffective and illegal as to him.
In March, 1969, De Salvo was called before a Grand Jury investigating gambling activities. De Salvo refused to answer any question on grounds of possible self incrimination. He consulted a lawyer, who was available to him from time to time during his Grand Jury appearance, and was then granted transactional and testimonial immunity pursuant to then section 619-e of the Code of Criminal Procedure (now CPL 50.10, 50.20). De Salvo continued, however, to refuse to answer questions on the ground of self incrimination. At one point, he was again permitted to consult his lawyer. His refusals to answer are the gravamen for this prosecution.
*15On August 26, 1969, about five months later, De Salvo moved to dismiss the indictment on the ground that his appearance before the Grand Jury was prompted solely by an illegal search. For purposes of the motion, the People conceded that the search was illegal and that De Salvo would not have been called before the Grand Jury but for the illegal search. The motion was denied on the ground that defendant had refused to testify solely because of possible self incrimination and that the grant of immunity precluded any challenge to the contempt charges based on an illegal search.
On this appeal De Salvo relies primarily on Gelbard v. United States (408 U. S. 41). It was there held that Federal Grand Jury witnesses could invoke the illegality of an electronic eavesdropping as a defense to a contempt charge for refusal to testify on the ground of the illegality of the inquiry spurred by the illegal eavesdropping. That case, however, involved the application of the Omnibus Crime Control and Safe Streets Act of 1968 (U. S. Code, tit. 18, §§ 2510-2520, esp. § 2515) which prohibited use of illegal wiretaps before a Grand Jury. The court never reached the question whether the Fourth Amendment would shield a Grand Jury witness from a contempt charge for conduct before the Grand Jury (see concurring opn. by Mr. Justice Douglas, who would so hold [408 U. S., at p. 62]). Moreover, in the Gelbard case, and this, it is suggested, is even more critical, the witnesses expressly refused to testify on the ground that the inquiry was based on illegal wiretaps and electronic surveillance {id., at pp. 4A-45). In the instant case, on the contrary, the refusal to testify was never made on that ground.
In Lanza v. New York (370 U. S. 139) the court affirmed a conviction for contempt of a State legislative committee where the defendant had urged that the questions were based on illegally-intercepted conversations. The court, however, did not reach the issue whether a Grand Jury witness could be convicted for contempt for refusal to answer questions based on an illegal search because it found that at least two of the questions were not the product of the illegally-intercepted conversations. Significantly, however, the court went on to state: ‘ ‘ To hold that the petitioner could not constitutionally be convicted for refusing to answer such questions simply because *16they related to a conversation which had been unlawfully overheard by other state officials would thus be a completely unprecedented step.” (370 U. S., at p. 145). Thus, if the cases are read together as they should be, it was the Omnibus Crime Control Act, and not the Fourth Amendment, that compelled the result in the Gelbard case (cf. Cali v. United States, 464 F. 2d 475 [1st Cir.], but see United States v. Calandra, 465 F. 2d 1218, 1222-1226 [6th Cir.]).
Moreover, the exclusion of evidence derived from an illegal ■search or seizure has been confined to narrow limits. The right to exclusion must be asserted, and, of course, no benefit obtained, before asserting the right. Thus, in Silverthorne Lbr. Co. v. United States (251 U. S. 385) it was held that a corporation might not be convicted of contempt for refusal to comply with a subpoena to produce records, earlier seized by Federal officials in an illegal search and then returned. In the Silverthorne case, unlike the present case, the right to exclusion was asserted by refusal to comply with the subpoena and no immunity or other benefit was previously obtained by asserting an entirely different objection to giving evidence.
Cases cited by De Salvo for the now settled proposition that evidence derived from a tainted or illegal source may be excluded both in Federal and State proceedings are not relevant (e.g., Mapp v. Ohio, 367 U. S. 643; Weeks v. United States, 232 U. S. 383, and cases in their wake in the Supreme Court). De Salvo did not refuse to testify on the ground that his appearance stemmed from an illegal search. Had the prosecutor been aware of that objection, he might not have arranged for the granting of immunity to the witness. The proper procedure to be followed in challenging the propriety of Grand Jury questions was outlined or plainly implied in People v. Ianniello (21 N Y 2d 418, 424-426, cert. den. 393 U. S. 827). There, the court stated that a witness should be permitted to consult his lawyer if he questions the extent of immunity conferred, the relevancy of the questions, or the existence of a testimonial privilege. If the witness then believes he is entitled to avoid testifying on a specific ground, he should refuse to answer and continue to assert his right, thereby forcing the prosecutor to take the issue into open court for a ruling (see, also, United States v. Calandra, 465 F. 2d 1218, 1221, supra *17[6th Cir.], where such a procedure was followed). Here, De Salvo failed to assert the ground for his objection, belatedly asserted for the first time as a defense in this contempt prosecution. The prosecutor, therefore, may have been misled into arranging for the granting of immunity, and may have lost an opportunity for an immediate court determination of the availability of an illegal search as ground for a refusal to testify, and possibly of the legality of the search.
The distinctions are not merely technical. The obtaining of immunity, especially transactional immunity, may be a highly desired end. Such immunity could only be obtained by a claim of a privilege against self incrimination, with the prospect to the People, if immunity were granted, that useful testimony would follow. The granting of immunity would be a futility to the People if then the witness could assert the nullity of the questioning on some ground suppressed until immunity had been first obtained.
Having refused to answer on grounds of possible self incrimination and been granted immunity, De Salvo may not then challenge his subsequent contempt conviction on the ground that the search was illegal. It is not necessary, therefore, to reach the more difficult question whether, had De Salvo questioned the search at the outset, he could have been convicted of a contempt for a refusal to answer on the ground that the illegal search was the cause for him to be called as a witness.
Accordingly, the order of the Appellate Division should be affirmed.
Chief Judge Fuld and Judges Burke, Jasen, Gabrielli, Jones and Wachtler concur.
Order affirmed.