Petitioner-appellant Thomas Garcia was convicted by a jury in New York State Supreme Court, Queens County, of one count of possession and sale of narcotics and one count of possession of marijuana. After exhausting his right to direct appeal in the state courts, Garcia petitioned for a writ of habeas corpus under 28 U.S.C. § 2254. He claimed that his Sixth Amendment right to a public trial was violated because his mother’s companion was excluded from the courtroom during the testimony of the undercover officer to whom Garcia allegedly sold drugs during a buy- and-bust operation. The state opposed the petition, arguing (1) that the state appellate court’s finding that Garcia was procedurally barred from advancing his Sixth Amendment claim constituted an independent and adequate state ground of decision that precluded federal habeas review; (2) that even if federal review were proper, no constitutional violation occurred; and (3) that even if a violation occurred, the error was harmless. The district judge dismissed the petition on harmless error grounds alone, concluding that even if the claim were preserved, and a constitutional violation did occur, the petition nonetheless should be denied because the error was harmless.
We affirm the district court’s judgment dismissing the petition, but, in so doing, we do not address the grounds relied on by the district court. Rather, we hold that Garcia is not entitled to federal habeas review because there exists an independent and adequate state ground for his conviction: the New York courts’ conclusion that Garcia defaulted on his Sixth Amendment claim when his attorney failed to raise the issue at trial in accordance with New York’s contemporaneous objection rules.
BACKGROUND
1. Factual and Trial History
On November 3, 1993, Garcia was arrested after police conducted a “buy-and-bust” operation in which Garcia allegedly sold crack cocaine to an undercover police officer and a third person. Garcia was charged with two counts of sale and possession of a controlled substance, in violation of New York Penal Law § 220.39[1], and one count of marijuana possession, in violation of New York Penal Law § 221.05.
After jury selection at Garcia’s trial, the state moved to close the courtroom during the testimony of the undercover officer (Undercover) to whom Garcia allegedly sold the drugs. Garcia’s counsel objected, and the trial judge held a hearing, pursu
*74
ant to
People v. Hinton,
At the hearing, the Undercover testified that he was engaged in undercover narcotics activities in Queens County and had been doing such work for two years, averaging about ten undercover operations per week. He explained that he had numerous undercover operations pending within three to four miles of the courthouse, and that four or five of his cases were pending in the Queens County courts at that time. The Undercover’s operations had produced four “lost subjects,” ie., suspects with whom he had engaged in narcotics sales but who had evaded arrest, as well as others who had not yet been arrested. A number of the Undercover’s open cases were from Astoria, Queens, where Garcia lived.
The Undercover testified that on at least fifteen occasions drug dealers who suspected him of being a police officer had threatened to kill him or injure his family, had thrown objects at him, or had tried to hit him with a car. The Undercover conceded, however, that he had not been threatened by Garcia, Garcia’s family, or anyone connected with Garcia’s case.
In light of his concerns, the Undercover explained his desire that the courtroom be closed during his testimony. Aware that his identity might become known if he was forced to testify in open court, he feared that his life would be jeopardized and that the effectiveness of his undercover operations would be compromised. The Undercover noted that he had never testified in an open courtroom and that in order to attend the Hinton hearing he had entered the courthouse through a side entrance and traveled to the courtroom in a back elevator with a court officer.
The trial judge granted the state’s motion to close the courtroom, reasoning that requiring him to testify in open court would pose a “danger to him and to his operations.” The court did, however, permit “any close relatives” of the defendant to be present. Garcia’s counsel did not object to this ruling, responding only by saying, “Thank you.”
When the prosecutor asked Garcia’s counsel to identify in advance any family members who would be in the courtroom during the Undercover’s testimony, Garcia’s counsel indicated that although Garcia’s mother, aunt or sister might attend, he did not “anticipate many people” attending the trial; to that effect he commented that “[n]o one is climbing to get in here.”
The following day, after opening statements were complete and immediately before the Undercover was to testify, Garcia’s counsel addressed the court and the following colloquy ensued:
Defense Counsel: Yes. Your Honor, yesterday, I believe during the closure hearing, you made a ruling that indicated that Mrs. Garcia, Tom’s mother, would be allowed to stay, and I also believe that ruling would extend to her companion who has been a party to this action in terms of supporting Tom throughout the proceedings and pretrial proceedings as well. Would that ruling extend to him?
The Court: I said extended to relatives and the mother, but if he is not a relative, that doesn’t extend to him. That was the ruling.
Defense Counsel: Okay.
The Court: So if he is technically just a friend, I’d have to excuse him along with the others.
Defense Counsel: Okay.
The Court: Are you ready to call your witness?
The State: Yes, I am, your Honor, and I’m going to ask now the Court to be closed.
The Court: I’ll direct all those other people to leave the courtroom.
The Clerk: Okay. Folks, according to a Court ruling which was issued yester *75 day, you must leave the courtroom. You will be instructed when you may return. So please leave. Thank you.
The Court: Counsel, there is no one else you expected?
Defense Counsel: No. You mean during the testimony of this witness?
The Court: Yes.
Defense Counsel: No. This is his mother’s companion.
The Court: I made the ruling.
The clerk then sealed the courtroom, and the Undercover took the stand. He testified that he had purchased twenty dollars’ worth of crack cocaine from Garcia, and had observed Garcia sell crack to a third person. The Undercover explained that he then identified Garcia to another officer, who arrested Garcia. The arresting officer and the Undercover’s backup also testified on the prosecution’s behalf. Garcia presented no witnesses.
The jury convicted Garcia on one count of criminal sale of a controlled substance, but acquitted him on the other. It also convicted him of marijuana possession, based on a small quantity of the drug that Garcia was found to possess at the time of his arrest. Garcia is currently serving a six-to-twelve year term of imprisonment.
2. State Post-Conviction Proceedings
Garcia appealed to the New York Supreme Court, Appellate Division, Second Department. He argued, among other things, that the exclusion of his mother’s companion deprived him of his Sixth Amendment right to a public trial. The Appellate Division rejected this claim, holding that Garcia failed to preserve it for review.
See People v. Garcia,
3. Garcia’s Petition for a Writ of Habeas Corpus
On April 2, 1998 Garcia filed the instant habeas petition, based solely on the exclusion of his mother’s companion. In opposition, the state argued (1) that the Appellate Division’s conclusion that the claim was not preserved for review constituted an independent and adequate state ground for the conviction that precluded federal habeas review; (2) that even if federal habeas review were permitted, no constitutional violation occurred; and (3) that even if the closure were constitutionally infirm, the error was harmless.
The district court decided the petition on harmless error grounds, after assuming without deciding that the closure issue was preserved for review and that the closure was unconstitutional.
1
Relying principally on our decisions in
Brown v. Kuhlmann,
*76 DISCUSSION
1. The Independent and Adequate State Ground Doctrine
The independent and adequate state ground doctrine first arose in the context of direct appeals to the Supreme Court from final judgments of the state courts. Under that doctrine the Supreme Court “will not review a question of federal law decided by a state court if the decision of that court rests on a state law ground that is independent of the federal question and adequate to support the judgment.”
Coleman v. Thompson,
The doctrine also applies in the context of federal courts reviewing applications for a writ of habeas corpus, although in that context the justification is different. In contrast to the Supreme Court on direct review, a federal habeas court “does not review a judgment, but the lawfulness of the petitioner’s custody
simpliciter,” see id.
at 730,
Applying the doctrine in the habeas context prevents a federal district court from being able to do in habeas cases what the Supreme Court could not do on direct review. In this way, the doctrine deprives “state prisoners whose custody was supported by independent and adequate state grounds [of] an end run around the limits of [the Supreme] Court’s jurisdiction and a means to undermine the State’s interest in enforcing its laws.”
Coleman,
An exception obtains only if the petitioner demonstrates both good cause for and actual prejudice resulting
from
his noncompliance with the state’s procedural rule.
See Engle v. Isaac,
Here, the Appellate Division ruled that Garcia failed to preserve his public trial claim for appellate review because his counsel failed to lodge a proper objection at trial. The state contends that this procedural bar constitutes an independent and adequate state ground that precludes federal habeas review. There is no question that the Appellate Division’s explicit invocation of the procedural bar constitutes an “independent” state ground,
see Harris v. Reed,
2. Standard for Determining the Adequacy of a State Ground Of Decision
The Supreme Court repeatedly has held that “ ‘the question of when and how defaults in compliance with state procedural rules can preclude ... consideration of a federal question is itself a federal question.’ ”
Johnson v. Mississippi,
“State courts may not avoid deciding federal issues by invoking procedural rales that they do not apply evenhandedly to all similar claims.”
Hathom v. Lovom,
Our responsibility to ensure that the state rale is “adequate” obligates us to examine the basis for and application of state law.
See, e. g., Coleman v. O’Leary,
In line with these cases, we have deferred to findings of procedural default as long as they are supported by a “fair or substantial basis” in state law.
See Arce v. Smith,
Accordingly we will deem a state court’s finding of procedural default “adequate” if there is a “fail’ and substantial” basis in state law for the state court’s determination.
3, Was There a “Fair or Substantial Basis” in State Law for Application of the Procedural Bar in Garcia’s Case?
Here, the Appellate Division applied New York’s codified contemporaneous objection rule, which preserves for review only those questions of law as to which “a protest ... was registered, by the party claiming error, at the time of such ruling or instruction or at any subsequent time when the court had an opportunity of effectively changing the same.” N.Y. C.P.L. § 470.05. The New York Court of Appeals has explained that this rule “require[s], at the very least, that any matter which a party wishes the appellate court to decide have been brought to the attention of the trial court at a time and in a way that gave the latter the opportunity to remedy the problem and thereby avert reversible error.”
People v. Luperon,
The Supreme Court has recognized that contemporaneous objection rules of this kind serve a legitimate state interest.
See Wainwright,
We, too, have recognized the propriety of such rules, noting that “[i]f a state
*79
appellate court refuses to review the merits of a criminal defendant’s claim of constitutional error because of his failure to comply with ... a ‘contemporaneous objection’ rule, a federal court generally may not consider the merits of the constitutional claim on habeas corpus review.”
Peterson v. Scully,
In this case, however, Garcia does not object to New York’s contemporaneous objection rule generally, but rather contends that the rule was misapplied in his case in particular. This, he contends, demonstrates that New York does not apply its rule “evenhandedly to all similar claims” within the meaning of
Hathorn,
In
Nieves,
a buy-and-bust case like this one, the district attorney moved to close the courtroom during the undercover officer’s testimony.
See id.
at 428,
The New York Court of Appeals found that the closure was unconstitutional, but more important here is its conclusion concerning preservation. In particular, the Appellate Division had deemed the issue of the children’s exclusion unpreserved.
See id.
at 431 n. *,
Viewed in a vacuum, the Nieves court’s language might suggest that the court *80 room closure issue was preserved in this case. The trial judge at Garcia’s trial “expressly considered allowing” Garcia’s mother’s companion to remain present, and “specifically rejected that possibility.” But the colloquy between the court and Garcia’s counsel must be viewed in light of the full record and in light of New York courts’ application of section 470.05. When viewed in this fashion, the analogy to Nieves loses force and the propriety of the Appellate Division’s conclusion in this case becomes clear.
Most important, the facts in this case are critically dissimilar to those suggested in Nieves. The Nieves opinion suggests that the court and the parties discussed in specific detail the merits of excluding the individuals whose attendance was at issue. Indeed, the trial court gave a specific (although ultimately erroneous) justification for excluding the defendant’s children. Here, in contrast, the issue was neither raised nor otherwise discussed in a meaningful way. Counsel’s purported objection merely sought clarification of the court’s previous ruling that the courtroom would be closed to all but the defendant’s “close relatives.”
In particular, as noted above, counsel stated
I believe during the closure hearing, you made a ruling that indicated that Mrs. Garcia, Tom’s mother, would be allowed to stay, and I also believe that ruling would extend to her companion who has been a party to this action in terms of supporting Tom throughout the proceedings and pretrial proceedings as well. Would that ruling extend to him?
This request — made a day after the Hinton hearing, after opening statements were complete and immediately before the Undercover was to testify — failed to put the trial judge on notice as to what the defendant now claims he wanted: a ruling on the merits of the companion’s eligibility to stay. Indeed, the balance of the colloquy indicates that the trial judge believed he was being asked only whether the companion fit within the scope of the court’s previous ruling, a ruling that Garcia does not contest:
The Court: I said extended to relatives and the mother, but if he is not a relative, that doesn’t extend to him. That was the ruling.
Defense Counsel: Okay.
The Court: So if he is technically just a friend, I’d have to excuse him along with the others.
Defense Counsel: Okay.
To be sure, the trial judge was aware that Garcia’s counsel was asking permission for the companion to stay; but the trial judge reasonably did not understand counsel to be asking for an extension of the previous ruling, as Garcia now claims he was.
Garcia now argues that his mother’s companion was entitled to stay
even though
he was “technically” just a friend, unless the state offered a specific reason why he personally should be excluded.
3
There is support for this position.
See In re Oliver,
But the trial court had no reason to believe that Garcia was advancing this argument. Garcia’s counsel did not, as Garcia now contends, make an “application to ‘extend’ the court’s [family-only] ruling” to include Garcia’s mother’s companion, based on the reasoning of Oliver and like cases. To the contrary, counsel merely inquired whether the court’s prior ruling— one that Garcia did not contest — should be construed as extending to Garcia’s mother’s companion. In short, the trial judge was not made aware of what Garcia now claims he wanted: a separate ruling on the merits of whether Garcia was entitled under the Constitution to have his mother’s companion present during the Undercover’s testimony. Because the trial judge was never given a meaningful opportunity to rule on the very issue Garcia attempted to raise on appeal, Garcia’s counsel failed to comply with Criminal Procedure Law section 470.05. 4
Moreover, the Appellate Division’s determination that Garcia failed to preserve his claim has a “fair and substantial” basis in state law. As noted above, the New York Court of Appeals has held that the contemporaneous objection rules embodied in section 470.05 of the Criminal Procedure Law “require, at the very least, that any matter which a party wishes the appellate court to decide have been brought to the attention of the trial court at a time and in a way that gave the latter the opportunity to remedy the problem and thereby avert reversible error.”
Luperon,
While in this case an issue may have been raised “at a time” when the trial judge could have remedied a potential problem, the legal issue Garcia attempted to raise on appeal was not brought to the trial court’s attention “in a way” or “in such a manner” as to give the trial judge an opportunity to remedy the problem and avert reversible error. Counsel at most asked the judge to clarify the previous day’s closure order, and the trial judge reasonably understood counsel’s request as just that; it runs contrary to the legitimate purpose of section 470.05 to characterize as “preserved” an issue on which the trial judge never had the opportunity to rule. New York courts agree with this proposition.
See, e. g., People v. Witt,
Simply put, Garcia’s trial counsel failed to bring to the trial court’s attention the claim that Garcia later attempted to advance on appeal. This ran afoul of New York’s legitimate requirement that objections be raised “in a way that [gives] the [trial court] the opportunity to remedy the problem and thereby avert reversible error.”
Luperon,
In our view, the Appellate Division reached a reasonable conclusion when it deemed Garcia’s claim unpreserved. A contrary holding would only encourage the kind of “sandbagging” that procedural forfeiture rules reasonably discourage,
see Wainwright,
CONCLUSION
Because we conclude that the existence of an independent and adequate state ground of decision precludes federal habe-as review in this case, we affirm the district court’s judgment dismissing the petition. We do not address whether Garcia’s Sixth Amendment rights were violated or, if they were, whether the error that occurred was harmless. We affirm exclusively on the basis that there was an independent and adequate state ground for the conviction and that, as a result, principles of comity and federalism dictate that our courts decline to hear the petition.
The judgment of the district court is affirmed.
Notes
. The district court avoided the independent and adequate state ground determination, commenting at oral argument that "I only reach preservation issues if I feel that I have to grant the writ. But if I don’t feel I have to grant the writ, then I don’t get involved in the procedural morass.”
. As explained below, we affirm on a ground as to which the certificate of appealability is silent: that an independent and adequate *76 state ground of decision precludes federal ha-beas review. We deem this method of affir-mance appropriate despite the limited scope of the certificate of appealability granted to Garcia.
We see no reason why the certificate should limit what the state may argue on appeal, particularly because if the state were the appellant it would not have to secure, and thus could not be limited by, a certificate of ap-pealability in the first instance. See Fed. R.App. P. 22(b)(3). In this circumstance, therefore, we adhere to the well settled rule that we may affirm an appealed decision "on any ground which finds support in the record, regardless of the ground upon which the trial court relied." Reid v. Senkowski, 961 F.2d 374, 378 (2d Cir.1992) (citation and internal quotation marks omitted). There is ample support in the record for the independent and adequate state ground determination, as that issue was contested vigorously by both sides both below and during the course of this appeal.
. It is somewhat disingenuous for Garcia to argue, as he does in his appellate brief, that the exclusion was improper because the Undercover “expressed no trepidation about testifying before petitioner's mother's companion.” Because defense counsel never raised the issue at the Hinton hearing, the district attorney never asked the Undercover about the mother’s companion. That Garcia would now contend that the state failed to meet its burden vis-a-vis the exclusion of the companion points up the very purpose of contemporaneous objection rules: to give both the court and the parties a fair opportunity to address issues before appeal.
. In this regard, attorney error has precluded Garcia from raising his federal constitutional claim. Garcia has not argued that counsel's performance was constitutionally ineffective so as to establish "cause” for the default under the rule announced in
Murray v. Carrier,
