opinion: GRANBERRY v. GREER, WARDEN
  No. 85-6790.
  Argued February 24, 1987
  Decided April 21, 1987
  Stevens, J., delivered the opinion for a unanimous Court.
  Howard B. Eisenberg, by appointment of the Court, 479 U. S. 912, argued the cause and filed briefs for petitioner.
  Marcia L. Friedl, Assistant Attorney General of Illinois, argued the cause for respondent. On the brief were Neil F. Hartigan, Attorney General, Roma J. Stewart, Solicitor General, and Mark L. Rotert and Terence M. Madsen, Assistant Attorneys General.
  Justice Stevens
  delivered the opinion of the Court.
  Petitioner, a state prisoner, applied to the District Court for the Southern District of Illinois for a writ of habeas corpus pursuant to 28 U. S. C. § 2254. The Magistrate to whom the District Court referred the case ordered the State of Illinois to file an answer; the State instead filed a motion to dismiss under Rule 12(b)(6) of the Federal Rules of Civil Procedure, arguing that the petition failed to state a claim upon which relief could be granted. The District Court adopted the Magistrate’s recommendation and dismissed the petition on the merits. When petitioner appealed to the Court of Appeals for the Seventh Circuit, respondent for the first time interposed the defense that petitioner had not exhausted his state remedies. In response, petitioner contended that the State had waived that defense by failing to raise it in the District Court. The Court of Appeals rejected the waiver argument and remanded the cause to the District Court with instructions to dismiss without prejudice. Granberry v. Mizell, 780 F. 2d 14 (1985). Because the Courts of Appeals have given different answers to the question whether the State’s failure to raise nonexhaustion in the district court constitutes a waiver of that defense in the court of appeals, we granted certiorari. 479 U. S. 813 (1986).
  How an appellate court ought to handle a nonexhausted ha-beas petition when the State has not raised this objection in the district court is a question that might be answered in three different ways. We might treat the State’s silence on the matter as a procedural default precluding the State from raising the issue on appeal. At the other extreme, we might treat nonexhaustion as an inflexible bar to consideration of the merits of the petition by the federal court, and therefore require that a petition be dismissed when it appears that there has been a failure to exhaust. Or, third, we might adopt an intermediate approach and direct the courts of appeals to exercise discretion in each case to decide whether the administration of justice would be better served by insisting on exhaustion or by reaching the merits of the petition forthwith.
  We have already decided that the failure to exhaust state remedies does not deprive an appellate court of jurisdiction to consider the merits of a habeas corpus application. See Strickland v. Washington, 466 U. S. 668, 684 (1984) (citing Rose v. Lundy, 456 U. S. 509, 515-520 (1982)); see also Frisbie v. Collins, 342 U. S. 519, 521-522 (1952). As the Strickland case demonstrates, there are some cases in which it is appropriate for an appellate court to address the merits of a habeas corpus petition notwithstanding the lack of complete exhaustion. Although there is a strong presumption in favor of requiring the prisoner to pursue his available state remedies, his failure to do so is not an absolute bar to appellate consideration of his claims.
  We have also expressed our reluctance to adopt rules that allow a party to withhold raising a defense until after the “main event” — in this case, the proceeding in the District Court — is over. See Wainwright v. Sykes, 433 U. S. 72, 89-90 (1977). Although the record indicates that the State’s failure to raise the nonexhaustion defense in this case was the result of inadvertence, rather than a matter of tactics, it seems unwise to adopt a rule that would permit, and might even encourage, the State to seek a favorable ruling on the merits in the district court while holding the exhaustion defense in reserve for use on appeal if necessary. If the habeas petition is meritorious, such a rule would prolong the prisoner’s confinement for no other reason than the State’s postponement of the exhaustion defense to the appellate level. Moreover, if the court of appeals is convinced that the petition has no merit, a belated application of the exhaustion rule might simply require useless litigation in the state courts.
  We are not persuaded by either of the extreme positions. The appellate court is not required to dismiss for non-exhaustion notwithstanding the State’s failure to raise it, and the court is not obligated to regard the State’s omission as an absolute waiver of the claim. Instead, we think the history of the exhaustion doctrine, as recently reviewed in Rose v. Lundy, 455 U. S. 509 (1982), points in the direction of a middle course:
  “The exhaustion doctrine existed long before its codification by Congress in 1948. In Ex parte Royall, 117 U. S. 241, 251 (1886), this Court wrote that as a matter of comity, federal courts should not consider a claim in a habeas corpus petition until after the state courts have had an opportunity to act:
  “‘The injunction to hear the case summarily, and thereupon “to dispose of the party as law and justice require” does not deprive the court of discretion as to the time and mode in which it will exert the powers conferred upon it. That discretion should be exercised in the light of the relations existing, under our system of government, between the judicial tribunals of the Union and of the States, and in recognition of the fact that the public good requires that those relations be not disturbed by unnecessary conflict between courts equally bound to guard and protect rights secured by the Constitution.’
  “Subsequent cases refined the principle that state remedies must be exhausted except in unusual circumstances. See, e. g., United States ex rel. Kennedy v. Tyler, 269 U. S. 13, 17-19 (1925) (holding that the lower court should have dismissed the petition because none of the questions had been raised in the state courts. ‘In the regular and ordinary course of procedure, the power of the highest state court in respect of such questions should first be exhausted’). In Ex parte Hawk, 321 U. S. 114, 117 (1944), this Court reiterated that comity was the basis for the exhaustion doctrine: ‘it is a principle controlling all habeas corpus petitions to the federal courts, that those courts will interfere with the administration of justice in the state courts only “in rare cases where exceptional circumstances of peculiar urgency are shown to exist.’”
  “In 1948, Congress codified the exhaustion doctrine in 28 U. S. C. §2254, citing Ex parte Hawk as correctly stating the principle of exhaustion.” Id., at 515-516 (footnotes omitted).
  When the State answers a habeas corpus petition, it has a duty to advise the district court whether the prisoner has, in fact, exhausted all available state remedies. See n. 5, supra. As this case demonstrates, however, there are exceptional cases in which the State fails, whether inadvertently or otherwise, to raise an arguably meritorious non-exhaustion defense. The State’s omission in such a case makes it appropriate for the court of appeals to take a fresh look at the issue. The court should determine whether the interests of comity and federalism will be better served by addressing the merits forthwith or by requiring a series of additional state and district court proceedings before reviewing the merits of the petitioner’s claim.
  If, for example, the case presents an issue on which an unresolved question of fact or of state law might have an important bearing, both comity and judicial efficiency may make it appropriate for the court to insist on complete exhaustion to make sure that it may ultimately review the issue on a fully informed basis. On the other hand, if it is perfectly clear that the applicant does not raise even a colorable federal claim, the interests of the petitioner, the warden, the state attorney general, the state courts, and the federal courts will all be well served even if the State fails to raise the exhaustion defense, the district court denies the habeas petition, and the court of appeals affirms the judgment of the district court forthwith. See United States ex rel. Allum v. Twomey, 484 F. 2d 740, 743 (CA7 1973); Note, State Waiver of the Exhaustion Requirement in Habeas Corpus Cases, 52 Geo. Wash. L. Rev. 419, 433 (1984).
  Conversely, if a full trial has been held in the district court and it is evident that a miscarriage of justice has occurred, it may also be appropriate for the court of appeals to hold that the nonexhaustion defense has been waived in order to avoid unnecessary delay in granting relief that is plainly warranted. In Frisbie v. Collins, 342 U. S. 519 (1952), respondent brought a habeas action in District Court, seeking release from a Michigan state prison. The State did not raise the availability of state relief, and the District Court denied the writ. The Court of Appeals reached the merits of the habeas petition and reversed. While we ultimately disagreed with the Court of Appeals’ conclusion on the merits, we rejected the State’s nonexhaustion argument and approved the Court of Appeals’ determination that “special circumstances” required “prompt federal intervention.” Id., at 522. We noted that the general rule of exhaustion “is not rigid and inflexible .... Whether such circumstances exist calls for a factual appraisal by the court in each special situation.” Id., at 521. As we recognized in Frisbie, the cases in which the nonexhaustion defense is not asserted in the district court may present a wide variety of circumstances which the courts of appeals, drawing on their familiarity with state criminal practice, are able to evaluate individually.
  In this case the Court of Appeals simply held that the nonexhaustion defense could not be waived, and made no attempt to determine whether the interests of justice would be better served by addressing the merits of the habeas petition or by requiring additional state proceedings before doing so. Accordingly, we vacate the judgment of the Court of Appeals and remand the case for further proceedings consistent with this opinion.
  It is so ordered.
  Before seeking federal relief, petitioner had filed a mandamus action in the Illinois Supreme Court in 1981. That court denied the petition “without prejudice to proceeding in any appropriate circuit court for consideration of the question presented.” App. 10. In 1983, petitioner commenced a second mandamus action in the Illinois Supreme Court, which denied the motion for leave to file a petition for writ of mandamus. Id., at 9.
  Compare Batchelor v. Cupp, 693 F. 2d 859, 862-864 (CA9 1982); Naranjo v. Ricketts, 696 F. 2d 83, 87 (CA10 1982), with Jenkins v. Fitzberger, 440 F. 2d 1188, 1189 (CA4 1971); McGee v. Estelle, 722 F. 2d 1206, 1214 (CA5 1984) (en banc); Purnell v. Missouri Department of Corrections, 753 F. 2d 703, 710 (CA8 1985).
  Cf. Wainwright v. Sykes, 433 U. S. 72 (1977); Murray v. Carrier, 477 U. S. 478 (1986); Smith v. Murray, 477 U. S. 527 (1986).
  Cf. Iowa Mutual Insurance Co. v. LaPlante, 480 U. S. 9 (1987) (district court may not exercise diversity jurisdiction until remedies in parallel tribal court proceeding have been exhausted); National Farmers Union Insurance Cos. v. Crow Tribe, 471 U. S. 845 (1985) (comity requires that tribal remedies be exhausted before district court considers issue of tribal court jurisdiction).
  Rule 5 of the Rules governing § 2254 eases in the United States district courts requires that the answer to a habeas petition “shall state whether the petitioner has exhausted his state remedies including any post-conviction remedies available to him under the statutes or procedural rules of the state. . . .” The State’s Rule 12(b)(6) motion and accompanying brief did not contain this required statement. App. 12-17. The State represents that this omission “was a mistake on the part of the assistants, on the part of the assistant attorney general. . . . The assistant was not even aware of the exhaustion requirement.” Tr. of Oral Arg. 29, 38 (counsel for respondent).
  It is also true, of course, that the Magistrate, upon receipt of the Rule 12(b)(6) motion, did not then ask the State to make a Rule 5 statement of whether petitioner had exhausted his state remedies. Instead, the Magistrate gave notice to petitioner that the State had filed a motion to dismiss with “an affidavit or other documentary evidence,” and that accordingly, under Rule 56(c) of the Federal Rules of Civil Procedure, petitioner could not “rest upon the mere allegations of your Petition,” but must send affidavits establishing a genuine issue for trial. Record Doc. No. 7. Petitioner filed a response, and the Magistrate then issued his Report and Recommendation that the motion to dismiss be granted. The District Court adopted this recommendation and dismissed the action, without referring to the exhaustion issue. App. 18-21.
  The State can successfully defend a habeas action either by obtaining dismissal for failure to exhaust or by winning on the merits, while the prisoner can only obtain the relief he seeks if the court reaches the merits and rules in his favor. A rule requiring dismissal when the defense of nonexhaustion is raised at the appellate level for the first time therefore would never operate to the prisoner’s benefit. If the prisoner obtains relief in district court, the State could assert this rule to obtain a reversal on appeal, while conversely, if the district court denies habeas relief and the prisoner appeals, the rule requiring dismissal would not result in reversal of the denial of habeas relief.
  The Rules governing §2254 cases in the United States district courts leave open this possibility. While the Magistrate requested the State to file an answer in this case, Rule 4 authorizes a district judge summarily to dismiss a habeas petition if “it plainly appears from the face of the petition and any exhibits annexed to it that the petitioner is not entitled to relief in the district court.” If the petition is not summarily dismissed, “the judge shall order the respondent to file an answer or other pleading. ...” The answer “shall state whether the petitioner has exhausted his state remedies.” Rule 5. Thus, the District Court’s dismissal of a nonmeritorious petition under Rule 4 pretermits consideration of the issue of non-exhaustion. Similarly, it is appropriate for the court of appeals to dispose of nonmeritorious petitions without reaching the nonexhaustion issue.
  See, e. g., Marino v. Ragen, 332 U. S. 561, 564 (1947) (Rutledge, J., concurring) (exhaustion should not be required “whenever it may become clear that the alleged state remedy is nothing but a procedural morass offering no substantial hope of relief”).
  Petitioner has also contested the Court of Appeals’ determination that he failed to exhaust his state remedies. Granberry v. Mizell, 780 F. 2d 14, 16 (1985). On that issue, however, we defer to the Court of Appeals which is more familiar with Illinois’ practice than we are.
instruction: What follows is an opinion from the Supreme Court of the United States. Your task is to determine the ideological "direction" of the decision ("liberal", "conservative", or "unspecifiable"). Use "unspecifiable" if the issue does not lend itself to a liberal or conservative description (e.g., a boundary dispute between two states, real property, wills and estates), or because no convention exists as to which is the liberal side and which is the conservative side (e.g., the legislative veto). Specification of the ideological direction comports with conventional usage. In the context of issues pertaining to criminal procedure, civil rights, First Amendment, due process, privacy, and attorneys, consider liberal to be pro-person accused or convicted of crime, or denied a jury trial, pro-civil liberties or civil rights claimant, especially those exercising less protected civil rights (e.g., homosexuality), pro-child or juvenile, pro-indigent pro-Indian, pro-affirmative action, pro-neutrality in establishment clause cases, pro-female in abortion, pro-underdog, anti-slavery, incorporation of foreign territories anti-government in the context of due process, except for takings clause cases where a pro-government, anti-owner vote is considered liberal except in criminal forfeiture cases or those where the taking is pro-business violation of due process by exercising jurisdiction over nonresident, pro-attorney or governmental official in non-liability cases, pro-accountability and/or anti-corruption in campaign spending pro-privacy vis-a-vis the 1st Amendment where the privacy invaded is that of mental incompetents, pro-disclosure in Freedom of Information Act issues except for employment and student records. In the context of issues pertaining to unions and economic activity, consider liberal to be pro-union except in union antitrust where liberal = pro-competition, pro-government, anti-business anti-employer, pro-competition, pro-injured person, pro-indigent, pro-small business vis-a-vis large business pro-state/anti-business in state tax cases, pro-debtor, pro-bankrupt, pro-Indian, pro-environmental protection, pro-economic underdog pro-consumer, pro-accountability in governmental corruption, pro-original grantee, purchaser, or occupant in state and territorial land claims anti-union member or employee vis-a-vis union, anti-union in union antitrust, anti-union in union or closed shop, pro-trial in arbitration. In the context of issues pertaining to judicial power, consider liberal to be pro-exercise of judicial power, pro-judicial "activism", pro-judicial review of administrative action. In the context of issues pertaining to federalism, consider liberal to be pro-federal power, pro-executive power in executive/congressional disputes, anti-state. In the context of issues pertaining to federal taxation, consider liberal to be pro-United States and conservative pro-taxpayer. In miscellaneous, consider conservative the incorporation of foreign territories and executive authority vis-a-vis congress or the states or judcial authority vis-a-vis state or federal legislative authority, and consider liberal legislative veto. In interstate relations and private law issues, consider unspecifiable in all cases.