Justice Rehnquist
delivered the opinion of the Court.
A divided Court of Appeals for the Ninth Circuit held that respondent’s state-court murder conviction was constitutionally invalid. Its holding has two bases: (1) the pretrial photographic identification procedure employed by state police was “so impermissibly suggestive as to give rise to a very substantial likelihood of irreparable in-court misidenti-fication of the [respondent]”; and (2) the admission of the in-court identification “constituted error of constitutional dimension.” 611 F. 2d 754, 755 (1979). The question before us is whether the Court of Appeals properly analyzed respondent’s challenge to his state-court murder conviction, given the limited nature of the review provided federal courts by 28 U. S. C. § 2254.
I
In 1973, respondent was convicted in the Superior Court of Kern County, Cal., of the first-degree murder of one of his fellow inmates at a California correctional institution. At trial, three witnesses testified that they had witnessed all or part of the attack on the inmate and identified respondent as participating in the murder. Respondent offered as an alibi three other witnesses who testified that respondent was in bed at the time the stabbing occurred. At no point did respondent object to his in-court identification by the State’s three eyewitnesses.
On direct appeal to the California Court of Appeal, respondent claimed for the first time that the pretrial photographic identification employed by the state police violated the due process of law guaranteed him by the Fourteenth Amendment of the United States Constitution. The California Court of Appeal analyzed his contention under the test earlier enunciated by this Court in Simmons v. United States, 390 U. S. 377 (1968). The court explained that each case must be considered on its own facts and a violation of due process will occur and a conviction will be set aside only if the photographic identification procedure was so impermissibly suggestive as to give rise to a very substantial likelihood of irreparable misidentification. The California court then rejected respondent’s contention, in this language:
“Reviewing the facts of the present case to determine if the particular photographic identification procedure used contained the proscribed suggestive characteristics, we first find that the photographs were available for cross-examination purposes at the trial. We further find that there is no showing of influence by the investigating officers [; ] that the witnesses had an adequate opportunity to view the crime; and that their descriptions are accurate. The circumstances thus indicate the inherent fairness of the procedure, and we find no error in the admission of the identification evidence.” App. to Pet. for Cert. C-4 — C-5.
Respondent did not seek direct review of the California Court of Appeal’s decision with the California Supreme Court. He did, however, later raise the pretrial identification issue in state habeas corpus proceedings. The California Superior Court, the California Court of Appeal, and the California Supreme Court all denied relief.
On December 9, 1977, respondent filed a petition for a writ of habeas corpus pursuant to 28 U. S. C. § 2254 in the United States District Court for the Northern District of California and again raised the pretrial identification issue. On May 23, 1978, the District Court denied the petition and respondent appealed this order to the United States Court of Appeals for the Ninth Circuit.
The Court of Appeals for the Ninth Circuit reversed. The court, employing the same standard used by the California state courts, concluded “the photographic identification was so impermissibly suggestive as to give rise to a very substantial likelihood of irreparable misidentification.” 611 F. 2d, at 759. This conclusion was based, inter alia, on the court’s finding that (1) the circumstances surrounding the witnesses’ observation of the crime were such that there was a grave likelihood of misidentification; (2) the witnesses had failed to give sufficiently detailed descriptions of the assailant; and (3) considerable pressure from both prison officials and prison factions had been brought to bear on the witnesses. Id., at 758-759.
II
The findings made by the Court of Appeals for the Ninth Circuit are considerably at odds with the findings made by the California Court of Appeal. Both courts made their findings after reviewing- the state-court trial record and neither court has indicated that this record is not a completely adequate record upon which to base such findings.
If this were simply a run-of-the-mine case in which an appellate court had reached an opposite conclusion from a trial court in a unitary judicial system, there would be little reason for invocation of this Court’s discretionary jurisdiction to make a third set of findings. But unfortunately for the smooth functioning of our federal system, which consists of 50 state judicial systems and one national judicial system, this is not such a run-of-the-mine case. Instead, this case presents important questions regarding the role to be played by the federal courts in the exercise of the habeas corpus jurisdiction conferred upon them by 28 U. S. C. § 2254.
It has long been established, as to those constitutional issues which may properly be raised under § 2254, that even a single federal judge may overturn the judgment of the highest court of a State insofar as it deals with the application of the United States Constitution or laws to the facts in question. As might be imagined, this result was not easily arrived at under the Habeas Corpus Act of 1867, the predecessor to 28 U. S. C. § 2254. But the present doctrine, adumbrated in the Court’s opinion in Moore v. Dempsey, 261 U. S. 86 (1923), and culminating in this Court’s opinion in Fay v. Noia, 372 U. S. 391 (1963), is that the Act of 1867 allows such collateral attack.
The petitioner asserts that in reaching its decision the majority of the Court of Appeals for the Ninth Circuit failed to observe certain limitations on its authority specifically set forth in 28 U. S. C. §2254 (d). Section 2254 (d) provides:
“(d) In any proceeding instituted in a Federal court by an application for a writ of habeas corpus by a person in custody pursuant to the judgment of a State court, a determination after a hearing on the merits of a factual issue, made by a State court of competent jurisdiction in a proceeding to which the applicant for the writ and the State or an officer or agent thereof were parties, evidenced by a written finding, written opinion, or other reliable and adequate written indicia, shall be presumed to be correct, unless the applicant shall establish or it shall otherwise appear, or the respondent shall admit—
“(1) that the merits of the factual dispute were not resolved in the State court hearing;
“(2) that the factfinding procedure employed by the State court was not adequate to afford a full and fair hearing;
“(3) that the material facts were not adequately developed at the State court hearing;
“(4) that the State court lacked jurisdiction of the subject matter or over the person of the applicant in the State court proceeding;
“(5) that the applicant was an indigent and the State court, in deprivation of his constitutional right, failed to appoint counsel to represent him in the State court proceeding;
“(6) that the applicant did not receive a full, fair, and adequate hearing in the State court proceeding; or
“(7) that the applicant was otherwise denied due process of law in the State court proceeding;
“(8) or unless that part of the record of the State court proceeding in which the determination of such factual issue was made, pertinent to a determination of the sufficiency of the evidence to support such factual determination, is produced as provided for hereinafter, and the Federal court on a consideration of such part of the record as a whole concludes that such factual determination is not fairly supported by the record:
“And in an evidentiary hearing in the proceeding in the Federal court, when due proof of such factual determination has been made, unless the existence of one or more of the circumstances respectively set forth in paragraphs numbered (1) to (7), inclusive, is shown by the applicant, otherwise appears, or is admitted by the respondent, or unless the court concludes pursuant to the provisions of paragraph numbered (8) that the record in the State court proceeding, considered as a whole, does not fairly support such factual determination, the burden shall rest upon the applicant to establish by convincing evidence that the factual determination by the State court was erroneous.”
It is obvious from a literal reading of the above that § 2254 (d) is applicable to the present situation although it has been contended that this should not be the case where a state appellate court, as opposed to a trial court, makes the pertinent factual findings. We, however, refuse to read this limitation into § 2254 (d). Admittedly, the California Court of Appeal made the factual determinations at issue here and it did so after a review of the trial court record. Nevertheless, it clearly held a “hearing” within the meaning of § 2254 (d). Both respondent and the State were formally before the court. Respondent was given an opportunity to be heard and his claim received plenary consideration even though he failed to raise it before the trial court. After respondent presented his case to the state appellate court, that court concluded in a written opinion that “the facts of the present case” did not adequately support respondent’s claim. Since that court was requested to determine the issue by respondent, we do not think he may now be heard to assert that its proceeding was not a “hearing” within the meaning of § 2254 (d).
Section 2254 (d) applies to cases in which a state court of competent jurisdiction has made “a determination after a hearing on the merits of a factual issue.” It makes no distinction between the factual determinations of a state trial court and those of a state appellate court. Nor does it specify any procedural requirements that must be satisfied for there to be a “hearing on the merits of a factual issue,” other than that the habeas applicant and the State or its agent be parties to the state proceeding and that the state-court determination be evidenced by “a written finding, written opinion, or other reliable and adequate written indicia.” Section 2254 (d) by its terms thus applies to factual determinations made by state courts, whether the court be a trial court or an appellate court. Cf. Swenson v. Stidham, 409 U. S. 224, 230 (1972). This interest in federalism recognized by Congress in enacting § 2254 (d) requires deference by federal courts to factual determinations of all state courts. This is true particularly in a case such as this where a federal court makes its determination based on the identical record that was considered by the state appellate court and where there was no reason for the state trial court to consider the issue because respondent failed to raise the issue at that level. See Souza v. Howard, 488 F. 2d 462 (CA1 1973). In fact, if the state appellate court here had declined to rule on the “identification” issue because it had not been properly raised in the trial court, the federal court would have been altogether barred from considering it absent a showing of “cause” and “prejudice.” Wainwright v. Sykes, 433 U. S. 72 (1977).
Given the applicability of § 2254 (d) to the present case, it is apparent that the Court of Appeals for the Ninth Circuit did not apply the “presumption of correctness” which is mandated by the statute to the factual determinations made by the California state courts. Indeed, the court did not even refer in its opinion to § 2254 (d). Last Term we denied certiorari in Lombard v. Taylor, 445 U. S. 946 (1980), in which a New York prosecutor sought certiorari from a judgment of the Court of Appeals for the Second Circuit. That court had held in a § 2254 action that the habeas petitioner had been the victim of knowing use of perjured testimony at his trial, and reversed the District Court’s refusal to grant the writ. In that case, however, the Federal Court of Appeals indicated in the course of its opinion full awareness of § 2254 (d), and after an examination of the same documentary evidence on which the state court relied, it expressly concluded that the state-court finding to the contrary was not entitled to deference by reason of § 2254 (d). Taylor v. Lombard, 606 F. 2d 371, 375 (1979). The approach of the Court of Appeals for the Ninth Circuit in the instant case was quite different. Its only reference to the previous state-court decision and collateral proceedings was to state in one sentence that “[t]he Petition followed the appellant’s conviction of murder in a California state court and his exhaustion of all available state court remedies.” 611 F. 2d, at 755. From this statement, its opinion went directly to a discussion of the “facts” and constitutional merits of the respondent’s claims.
Undoubtedly, a court need not elaborate or give reasons for rejecting claims which it regards as frivolous or totally without merit. This, however, was not the situation presented here. To the contrary, the Court of Appeals reached a conclusion which was in conflict with the conclusion reached by every other state and federal judge after reviewing the exact same record. Reading the court’s opinion in conjunction with § 2254 (d), it is clear that the court could not have even implicitly relied on paragraphs 1 through 7 of § 2254 (d) in reaching its decision. It is impossible to tell whether the majority of the court relied on paragraph 8 because its opinion gives no indication that § 2254 was even considered.
Obviously, if the Court of Appeals in this case or any other court of appeals had simply inserted a boilerplate paragraph in its opinion that it had considered the state record as a whole and concluded that the state appellate court’s factual determinations were not fairly supported by the record, this objection to the judgment of the Court of Appeals could not as easily be made. Just as obviously, this would be a frustration of the intent of Congress in enacting § 2254 (d). Reference can be made to Rule 52 of the Federal Rules of Civil Procedure which requires a United States district court following a bench trial to “find the facts specially and state separately its conclusions of law thereon . . . .” It is a matter of common knowledge that on some occasions a district judge will simply take findings of fact and conclusions of law prepared by the party whom the judge has indicated at the close of trial shall prevail and without alteration adopt them as his own. However, a requirement such as is imposed by Rule 52 undoubtedly makes a judge more aware that it is his own imprimatur that is placed on the findings of fact and conclusions of law, whoever may prepare them. When Congress provided in § 2254 (d) that a habeas court could not dispense with the “presumption of correctness” embodied therein unless it concluded that the factual determinations were not supported by the record, it contemplated at least some reasoned written references to § 2254 (d) and the state-court findings. State judges as well as federal judges swear allegiance to the Constitution of the United States, and there is no reason to think that because of their frequent differences of opinions as to how that document should be interpreted, all are not doing their mortal best to discharge their oath of office.
Federal habeas has been a source of friction between state and federal courts, and Congress obviously meant to alleviate some of that friction when it enacted subsection (d) in 1966 as an amendment to the original Federal Habeas Act of 1867. Accordingly, some content must be given to the provisions of the subsection if the will of Congress be not frustrated. Since the 1966 amendment, this Court has had few opportunities to address the various provisions of subsection (d), and never in a context similar to the one presented here. See, e. g., Cuyler v. Sullivan, 446 U. S. 335 (1980); LaVallee v. Delle Rose, 410 U. S. 690 (1973). A writ issued at the behest of a petitioner under 28 U. S. C § 2254 is in effect overturning either the factual or legal conclusions reached by the state-court system under the judgment of which the petitioner stands convicted, and friction is a likely result. The long line of our cases previously referred to accepted that friction as a necessary consequence of the Federal Habeas Act of 1867, 28 U. S. C. § 2254. But it is clear that in adopting the 1966 amendment, Congress in § 2254 (d) intended not only to minimize that inevitable friction but also to establish that the findings made by the state-court system “shall be presumed to be correct” unless one of seven conditions specifically set forth in § 2254 (d) was found to exist by the federal habeas court. If none of those seven conditions were found to exist, or unless the habeas court concludes that the relevant state-court determination is not “fairly supported by the record,” “the burden shall rest upon the applicant to establish by convincing evidence that the factual determination by the State court was erroneous.” (Emphasis supplied.)
Although arising in a much different context, we think the recent language used in Addington v. Texas, 441 U. S. 418 (1979), has no little bearing on the issue here:
“The function of a standard of proof, as that concept is embodied in the Due Process Clause and in the realm of factfinding, is to ‘instruct the factfinder concerning the degree of confidence our society thinks he should have in the correctness of factual conclusions for a particular type of adjudication.’ In re Winship, 397 U. S. 358, 370 (1970) (Harlan, J., concurring). The standard serves to allocate the risk of error between the litigants and to indicate the relative importance attached to the ultimate decision.” Id., at 423.
When it enacted the 1966 amendment to 28 U. S. C. § 2254, Congress specified that in the absence of the previously enumerated factors one through eight, the burden shall rest on the habeas petitioner, whose case by that time had run the entire gamut of a state judicial system, to establish “by convincing evidence that the factual determination of the State court was erroneous.” 28 U. S. C. §2254 (d). Thus, Congress meant to insure that a state finding not be overturned merely on the basis of the usual “preponderance of the evidence” standard in such a situation. In order to ensure that this mandate of Congress is enforced, we now hold that a habeas court should include in its opinion granting the writ the reasoning which led it to conclude that any of the first seven factors were present, or the reasoning which led it to conclude that the state finding was “not fairly supported by the record.” Such a statement tying the generalities of § 2254 (d) to the particular facts of the case at hand will not, we think, unduly burden federal habeas courts even though it will prevent the use of the “boilerplate” language to which we have previously adverted. Moreover, such a statement will have the obvious value of enabling courts of appeals and this Court to satisfy themselves that the congressional mandate has been complied with. No court reviewing the grant of an application for habeas corpus should be left to guess as to the habeas court’s reasons for granting relief notwithstanding the provisions of § 2254 (d). Cf. Greater Boston Television Corp. v. FCC, 143 U. S. App. D. C. 383, 444 F. 2d 841, 851 (1970)
Having said this, we are not to be understood as agreeing or disagreeing with the majority of the Court of Appeals on the merits of the issue of impermissibly suggestive identification procedures. Both the California courts and the federal courts relied on the basic Simmons case for their legal analysis. Applying the same test, the majority of the Court of Appeals for the Ninth Circuit reached a different determination than had all the other courts which considered the issue. Assuredly this is not the first nor the last time that such a result will occur. We do think, however, that Congress was intent on some sort of written explanation of the § 2254 (d) factors when such a result does occur. The judgment of the Court of Appeals for the Ninth Circuit is accordingly vacated, and the case is remanded for further proceedings consistent with this opinion.
It is so ordered.
Justice Blackmun concurs in the result. He would vacate the judgment of the Court of Appeals and merely remand the case to that court for reconsideration in light of 28 U. S. C. §2254 (d).
This Court previously reserved the question in Cuyler v. Sullivan, 446 U. S. 335, 341, n. 5 (1980). The Courts of Appeals, without extensive analysis, have reached differing conclusions as to whether findings of fact made by a state appellate court can be considered “determination [s] after a hearing on the merits of a factual issue” within the meaning of 28 U. S. C. §2254 (d). Compare Drayton v. Hayes, 589 F. 2d 117, 122, n. 9 (CA2 1979); White v. Finkbeiner, 570 F. 2d 194, 201 (CA7 1978), appeal after remand, 611 F. 2d 186 (1979); Payne v. Cardwell, 436 F. 2d 577 (CA6 1971); Hill v. Nelson, 466 F. 2d 1346, 1348 (CA9 1972), with Souza v. Howard, 488 F. 2d 462 (CA1 1973); and United States ex rel. Harris v. Illinois, 457 F. 2d 191 (CA7 1972).
The dissent contends that any argument premised on § 2254 (d) was “abandoned” because petitioner raised his § 2254 (d) argument before the District Court, but did not do so in his appellate brief. Post, at 554. Presumably this contention does not mean to imply that petitioner conceded error with regard to the state-court factual determinations, but instead that he “abandoned” his right to rely on § 2254 (d) as a reason for not rejecting these factual determinations. Whether or not the petitioner specifically directed the Court of Appeals’ attention to § 2254 (d) makes no difference as to the outcome of this case. The present codification of the federal habeas statute is the successor to “the first congressional grant of jurisdiction to the federal courts,” Preiser v. Rodriguez, 411 U. S. 475, 485 (1973), and the 1966 amendments embodied in § 2254 (d) were intended by Congress as limitations on the exercise of that jurisdiction. As we held in Louisville & Nashville B. Co. v. Mottley, 211 U. S. 149, 152 (1908), and have repeatedly since reaffirmed, “it is the duty of this [C]ourt to see to it that the jurisdiction of the [district court], which is defined and limited by statute, is not exceeded.” Having had the benefit of the full briefing and argument from the parties on the § 2254 (d) issue, we are simply following the well-established doctrine of the Mottley case in deciding the § 2254 (d) issue.
In addition to minimizing the “friction” between the state and federal courts, the limited nature of the review provided by § 2254 also serves the interest that both society and the individual criminal defendant have “in insuring that there will at some point be the certainty that comes with an end to litigation, and that attention will ultimately be focused not on whether a conviction was free from error but rather on whether the prisoner can be restored to a useful place in the community.” Sanders v. United States, 373 U. S. 1, 24-25 (1963) (Harlan, J., dissenting). See also Schneckloth v. Bustamonte, 412 U. S. 218, 262 (1973) (Powell, J., concurring).