Justice Kennedy
delivered the opinion of the Court.
Under the Antiterrorism and Effective Death Penalty Act of 1996 (AEDPA), 110 Stat. 1214, a federal court can grant an application for a writ of habeas corpus on behalf of a person held pursuant to a state-court judgment if the state-court adjudication “resulted in a decision that was contrary to, or involved an unreasonable application of, clearly established Federal law, as determined by the Supreme Court of the United States.” 28 U. S. C. § 2254(d)(1). The United States Court of Appeals for the Ninth Circuit ruled that a state court unreasonably applied clearly established law when it held that the respondent was not in custody for Miranda purposes. Alvarado v. Hickman, 316 F. 3d 841 (2002). We disagree and reverse.
I
Paul Soto and respondent Michael Alvarado attempted to steal a truck in the parking lot of a shopping mall in Santa Fe Springs, California. Soto and Alvarado were part of a larger group of teenagers at the mall that night. Soto decided to steal the truck, and Alvarado agreed to help. Soto pulled out a .357 Magnum and approached the driver, Francisco Castaneda, who was standing near the truck emptying trash into a dumpster. Soto demanded money and the ignition keys from Castaneda. Alvarado, then five months short of his 18th birthday, approached the passenger side door of the truck and crouched down. When Castaneda refused to comply with Soto’s demands, Soto shot Castaneda, killing him. Alvarado then helped hide Soto’s gun.
Los Angeles County Sheriff’s detective Cheryl Comstock led the investigation into the circumstances of Castaneda’s death. About a month after the shooting, Comstock left word at Alvarado’s house and also contacted Alvarado’s mother at work with the message that she wished to speak with Alvarado. Alvarado’s parents brought him to the Pico Rivera Sheriff’s Station to be interviewed around lunchtime. They waited in the lobby while Alvarado went with Com-stock to be interviewed. Alvarado contends that his parents asked to be present during the interview but were rebuffed.
Comstock brought Alvarado to a small interview room and began interviewing him at about 12:30 p.m. The interview lasted about two hours, and was recorded by Comstock with Alvarado’s knowledge. Only Comstock and Alvarado were present. Alvarado was not given* a warning under Miranda v. Arizona, 384 U. S. 436 (1966). Comstock began the interview by asking Alvarado to recount the events on the night of the shooting. On that night, Alvarado explained, he had been drinking alcohol at a friend’s house with some other friends and acquaintances. After a few hours, part of the group went home and the rest walked to a nearby mall to use its public telephones. In Alvarado’s initial telling, that was the end of it. The group went back to the friend’s home and “just went to bed.” App. 101.
Unpersuaded, Comstock pressed on:
“Q. Okay. We did real good up until this point and everything you’ve said it’s pretty accurate till this point, except for you left out the shooting.
“A. The shooting?
“Q. Uh huh, the shooting.
“A. Well I had never seen no shooting.
“Q. Well I’m afraid you did.
“A. I had never seen no shooting.
“Q. Well I beg to differ with you. I’ve been told quite the opposite and we have witnesses that are saying quite the opposite.
“A. That I had seen the shooting?
“Q. So why don’t you take a deep breath, like I told you before, the very best thing is to be honest.... You can’t have that many people get involved in a murder and expect that some of them aren’t going to tell the truth, okay? Now granted if it was maybe one person, you might be able to keep your fingers crossed and say, god I hope he doesn’t tell the truth, but the problem is is that they have to tell the truth, okay? Now all I’m simply doing is giving you the opportunity to tell the truth and when we got that many people telling a story and all of a sudden you tell something way far fetched different.” Id., at 101-102 (punctuation added).
At this point, Alvarado slowly began to change his story. First he acknowledged being present when the carjacking occurred but claimed that he did not know what happened or who had a gun. When he hesitated to say more, Comstock tried to encourage Alvarado to discuss what happened by appealing to his sense of honesty and the need to bring the man who shot Castaneda to justice. See, e. g., id., at 106 (“[W]hat I’m looking for is to see if you’ll tell the truth”); id., at 105-106 (“I know it’s very difficult when it comes time to ‘drop the dime’ on somebody[,] . . . [but] if that had been your parent, your mother, or your brother, or your sister, you would darn well want [the killer] to go to jail ’cause no one has the right to take someone’s life like that.. Alvarado then admitted he had helped the other man try to steal the truck by standing near the passenger side door. Next he admitted that the other man was Paul Soto, that he knew Soto was armed, and that he had helped hide the gun after the murder. Alvarado explained that he had expected Soto to scare the driver with the gun, but that he did not expect Soto to kill anyone. Id., at 127. Toward the end of the interview, Comstock twice asked Alvarado if he needed to take a break. Alvarado declined. When the interview was over, Comstock returned with Alvarado to the lobby of the sheriff’s station where his parents were waiting. Alvarado’s father drove him home.
A few months later, the State of California charged Soto and Alvarado with first-degree murder and attempted robbery. Citing Miranda, supra, Alvarado moved to suppress his statements from the Comstock interview. The trial court denied the motion on the ground that the interview was noncustodial. App. 196. Alvarado and Soto were tried together, and Alvarado testified in his own defense. He offered an innocent explanation for his conduct, testifying that he happened to be standing in the parking lot of the mall when a gun went off nearby. The government’s cross-examination relied on Alvarado’s statement to Comstock. Alvarado admitted having made some of the statements but denied others. When Alvarado denied particular statements, the prosecution countered by playing excerpts from the audio recording of the interview.
During cross-examination, Alvarado agreed that the interview with Comstock “was a pretty friendly conversation,” id., at 438, that there was “sort of a free flow between [Alvarado] and Detective Comstock,” id., at 439, and that Alvarado did not “feel coerced or threatened in any way” during the interview, ibid. The jury convicted Soto and Alvarado of first-degree murder and attempted robbery. The trial judge later reduced Alvarado’s conviction to second-degree murder for his comparatively minor role in the offense. The judge sentenced Soto to life in prison and Alvarado to 15-years-to-life.
On direct appeal, the Second Appellate District Court of Appeal (hereinafter state court) affirmed. People v. Soto, 74 Cal. App. 4th 1099, 88 Cal. Rptr. 2d 688 (1999) (unpublished in relevant part). The state court rejected Alvarado’s contention that his statements to Comstock should have been excluded at trial because no Miranda warnings were given. The court ruled Alvarado had not been in custody during the interview, so no warning was required. The state court relied upon the custody test articulated in Thompson v. Keohane, 516 U. S. 99, 112 (1995), which requires a court to consider the circumstances surrounding the interrogation and then determine whether a reasonable person would have felt at liberty to leave. The state court reviewed the facts of the Comstock interview and concluded Alvarado was not in custody. App. to Pet. for Cert. C-17. The court emphasized the absence of any intense or aggressive tactics and noted that Comstock had not told Alvarado that he could not leave. The California Supreme Court denied discretionary review.
Alvarado filed a petition for a writ of habeas corpus in the United States District Court for the Central District of California. The District Court agreed with the state court that Alvarado was not in custody for Miranda purposes during the interview. Alvarado v. Hickman, No. ED CV-00-326-VAP(E) (2000), App. to Pet. for Cert. B-1 to B-10. “At a minimum,” the District Court added, the deferential standard of review provided by 28 U. S. C. § 2254(d) foreclosed relief. App. to Pet. for Cert. B-7.
The Court of Appeals for the Ninth Circuit reversed. Alvarado v. Hickman, 316 F. 3d 841 (2002). First, the Court. of Appeals held that the state court erred in failing to account for Alvarado’s youth and inexperience when evaiuating whether a reasonable person in his position would have felt free to leave. It noted that this Court has considered a suspect’s juvenile status when evaluating the voluntariness of confessions and the waiver of the privilege against self-incrimination. See id., at 843 (citing, inter alia, Haley v. Ohio, 332 U. S. 596, 599-601 (1948), and In re Gault, 387 U. S. 1, 45 (1967)). The Court of Appeals held that in light of these authorities, Alvarado’s age and experience must be a factor in the Miranda custody inquiry. 316 F. 3d, at 843. A minor with no criminal record would be more likely to feel coerced by police tactics and conclude he is under arrest than would an experienced adult, the Court of Appeals reasoned. This required extra “safeguards ... commensurate with the age and circumstances of a juvenile defendant.” See id., at 850. According to the Court of Appeals, the effect of Alvarado’s age and inexperience was so substantial that it turned the interview into a custodial interrogation.
The Court of Appeals next considered whether Alvarado could obtain relief in light of the deference a federal court must give to a state-court determination on habeas review. The deference required by AEDPA did not bar relief, the Court of Appeals held, because the relevance of juvenile status in Supreme Court case law as a whole compelled the “extension of the principle that juvenile status is relevant” to the context of Miranda custody determinations. 316 F. 3d, at 853. In light of the clearly established law considering juvenile status, it was “simply unreasonable to conclude that a reasonable 17-year-old, with no prior history of arrest or police interviews, would have felt that he was at liberty to terminate the interrogation and leave.” Id., at 854-855 (internal quotation marks omitted).
We granted certiorari. 539 U. S. 986 (2003).
II
We begin by determining the relevant clearly established law. For purposes of 28 U. S. C. § 2254(d)(1), clearly established law as determined by this Court “refers to the holdings, as opposed to the dicta, of this Court’s decisions as of the time of the relevant state-court decision.” Williams v. Taylor, 529 U. S. 362, 412 (2000). We look for “the governing legal principle or principles set forth by the Supreme Court at the time the state court renders its decision.” Lockyer v. Andrade, 538 U. S. 63, 71-72 (2003).
Miranda itself held that preinterrogation warnings are required in the context of custodial interrogations given “the compulsion inherent in custodial surroundings.” 384 U. S., at 458. The Court explained that “custodial interrogation” meant “questioning initiated by law enforcement officers after a person has been taken into custody or otherwise deprived of his freedom of action in any significant way.” Id., at 444. The Miranda decision did not provide the Court with an opportunity to apply that test to a set of facts.
After Miranda, the Court first applied the custody test in Oregon v. Mathiason, 429 U. S. 492 (1977) (per curiam). In Mathiason, a police officer contacted the suspect after a burglary victim identified him. The officer arranged to meet the suspect at a nearby police station. At the outset of the questioning, the officer stated his belief that the suspect was involved in the burglary but that he was not under arrest. During the 30-minute interview, the suspect admitted his guilt. He was then allowed to leave. The Court held that the questioning was not custodial because there was “no indication that the questioning took place in a context where [the. suspect’s] freedom to depart was restricted in any way.” Id., at 495. The Court noted that the suspect had come voluntarily to the police station, that he was informed that he was not under arrest, and that he was allowed to leave at the end of the interview. Ibid.
In California v. Beheler, 463 U. S. 1121 (1983) (per cu-riam), the Court reached the same result in a case with facts similar to those in Mathiason. In Beheler, the state court had distinguished Mathiason based on what it described as differences in the totality of the circumstances. The police interviewed Beheler shortly after the crime occurred; Be-heler had been drinking earlier in the day; he was emotionally distraught; he was well known to the police; and he was a parolee who knew it was necessary for him to cooperate with the police. 463 U. S., at 1124-1125. The Court agreed that “the circumstances of each case must certainly influence” the custody determination, but reemphasized that “the ultimate inquiry is simply whether there is a formal arrest or restraint on freedom of movement of the degree associated with a formal arrest.” Id,., at 1125 (internal quotation marks omitted). The Court found the case indistinguishable from Mathiason. It noted that how much the police knew about the suspect and how much time had elapsed after the crime occurred were irrelevant to the custody inquiry. 463 U. S., at 1125.
Our more recent cases instruct that custody must be determined based on how a reasonable person in the suspect’s situation would perceive his circumstances. In Berkemer v. McCarty, 468 U. S. 420 (1984), a police officer stopped a suspected drunk driver and asked him some questions. Although the officer reached the decision to arrest the driver at the beginning of the traffic stop, he did not do so until the driver failed a sobriety test and acknowledged that he had been drinking beer and smoking marijuana. The Court held the traffic stop noncustodial despite the officer’s intent to arrest because he had not communicated that intent to the driver. “A policeman’s unarticulated plan has no bearing on the question whether a suspect was ‘in custody’ at a particular time,” the Court explained. Id., at 442. “[T]he only relevant inquiry is how a reasonable man in the suspect’s position would have understood his situation.” Ibid. In a footnote, the Court cited a New York state case for the view that an objective test was preferable to a subjective test in part because it does not “ ‘place upon the police the burden of anticipating the frailties or idiosyncrasies of every person whom they question.’” Id., at 442, n. 35 (quoting People v. P., 21 N. Y. 2d 1, 9-10, 233 N. E. 2d 255, 260 (1967)).
Stansbury v. California, 511 U. S. 318 (1994) (per cu-riam), confirmed this analytical framework. Stansbury explained that “the initial determination of custody depends on the objective circumstances of the interrogation, not on the subjective views harbored by either the interrogating officers or the person being questioned.” Id., at 323. Courts must examine “all of the circumstances surrounding the interrogation” and determine “how a reasonable person in the position of the individual being questioned would gauge the breadth of his or her freedom of action.” Id., at 322, 325 (internal quotation marks and alteration omitted).
Finally, in Thompson v. Keohane, 516 U. S. 99 (1995), the Court offered the following description of the Miranda custody test:
“Two discrete inquiries are essential to the determination: first, what were the circumstances surrounding the interrogation; and second, given those circumstances, would a reasonable person have felt he or she was not at liberty to terminate the interrogation and leave. Once the scene is set and the players’ lines and actions are reconstructed, the court must apply an objective test to resolve the ultimate inquiry: was there a formal arrest or restraint on freedom of movement of the degree associated with a formal arrest.” 516 U. S., at 112 (internal quotation marks and footnote omitted).
We turn now to the case before us and ask if the state-court adjudication of the claim “involved an unreasonable application” of clearly established law when it concluded that Alvarado was not in custody. 28 U. S. C. § 2254(d)(1). See Williams, 529 U. S., at 413 (“Under the ‘unreasonable application’ clause, a federal habeas court may grant the writ if the state court identifies the correct governing principle from this Court’s decisions but unreasonably applies that principle to the facts of the prisoner’s case”). The term “ ‘unreasonable’ ” is “a common term in the legal world and, accordingly, federal judges are familiar with its meaning.” Id., at 410. At the same time, the range of reasonable judgment can depend in part on the nature of the relevant rule. If a legal rule is specific, the range may be narrow. Applications of the rule may be plainly correct or incorrect. Other rules are more general, and their meaning must emerge in application over the course of time. Applying a general standard to a specific case can demand a substantial element of judgment. As a result, evaluating whether a rule application was unreasonable requires considering the rule’s specificity. The more general the rule, the more leeway courts have in reaching outcomes in case-by-case determinations. Cf. Wright v. West, 505 U. S. 277, 308-309 (1992) (Kennedy, J., concurring in judgment).
Based on these principles, we conclude that the state court’s application of our clearly established law was reasonable. Ignoring the deferential standard of § 2254(d)(1) for the moment, it can be said that fairminded jurists could disagree over whether Alvarado was in custody. On one hand, certain facts weigh against a finding that Alvarado was in custody. The police did not transport Alvarado to the station or require him to appear at a particular time. Cf. Mathiason, 429 U. S., at 495. They did not threaten him or suggest he would be placed under arrest. Ibid. Alvarado’s parents remained in the lobby during the interview, suggesting that the interview would be brief. See Berkemer, supra, at 441-442. In fact, according to trial counsel for Alvarado, he and his parents were told that the interview was “ ‘not going to be long.’ ” App. 186. During the interview, Comstock focused on Soto’s crimes rather than Alvarado’s. Instead of pressuring Alvarado with the threat of arrest and prosecution, she appealed to his interest in telling the truth and being helpful to a police officer. Cf. Mathiason, supra, at 495. In addition, Comstock twice asked Alvarado if he wanted to take a break. At the end of the interview, Alvarado went home. App. 186. All of these objective facts are consistent with an interrogation environment in which a reasonable person would have felt free to terminate the interview and leave. Indeed, a number of the facts echo those of Mathiason, a per curiam summary reversal in which we found it “clear from these facts” that the suspect was not in custody. 494 U. S., at 495.
Other facts point in the opposite direction. Comstock interviewed Alvarado at the police station. The interview lasted two hours, four times longer than the 30-minute interview in Mathiason. Unlike the officer in Mathiason, Comstock did not tell Alvarado that he was free to leave. Alvarado was brought to the police station by his legal guardians rather than arriving on his own accord, making the extent of his control over his presence unclear. Counsel for Alvarado alleges that Alvarado’s parents asked to be present at the interview but were rebuffed, a fact that — if known to Alvarado — might reasonably have led someone in Alvarado’s position to feel more restricted than otherwise. These facts weigh in favor of the view that Alvarado was in custody.
These differing indications lead us to hold that the state court’s application of our custody standard was reasonable. The Court of Appeals was nowhere close to the mark when it concluded otherwise. Although the question of what an “unreasonable application” of law . might be is difficult in some cases, it is not difficult here. The custody test is general, and the state court’s application of our law fits within the matrix of our prior decisions. We cannot grant relief under AEDPA by conducting our own independent inquiry into whether the state court was correct as a de novo matter. “[A] federal habeas court may not issue the writ simply because that court concludes in its independent judgment that the state-court decision applied [the law] incorrectly.” Woodford v. Visciotti, 537 U. S. 19, 24-25 (2002) (per curiam). Relief is available under § 2254(d)(1) only if the state court’s decision is objectively unreasonable. See Williams, 529 U. S., at 410; Andrade, 538 U. S., at 75. Under that standard, relief cannot be granted.
III
The Court of Appeals reached the opposite result by placing considerable reliance on Alvarado’s age and inexperience with law enforcement. Our Court has not stated that a suspect’s age or experience is relevant to the Miranda custody analysis, and counsel for Alvarado did not press the importance of either factor on direct appeal or in habeas proceedings. According to the Court of Appeals, however, our Court’s emphasis on juvenile status in other contexts demanded consideration of Alvarado’s age and inexperience here. The Court of Appeals viewed the state court’s failure to “ ‘extend a clearly established legal principle [of the relevance of juvenile status] to a new context’ ” as objectively unreasonable in this case, requiring issuance of the writ. 316 F. 3d, at 853 (quoting Anthony v. Cambra, 236 F. 3d 568, 578 (CA9 2000)).
The petitioner contends that if a habeas court must extend a rationale before it can apply to the facts at hand then the rationale cannot be clearly established at the time of the state-court decision. Brief for Petitioner 10-24. See also Hawkins v. Alabama, 318 F. 3d 1302, 1306, n. 3 (CA11 2003) (asserting a similar argument). There is force to this argument. Section 2254(d)(1) would be undermined if habeas courts introduced rules not clearly established under the guise of extensions to existing law. Cf. Teague v. Lane, 489 U. S. 288 (1989). At the same time, the difference between applying a rule and extending it is not always clear. Certain principles are fundamental enough that when new factual permutations arise, the necessity to apply the earlier rule will be beyond doubt.
This is not such a case, however. Our opinions applying the Miranda custody test have not mentioned the suspect’s age, much less mandated its consideration. The only indications in the Court’s opinions relevant to a suspect’s experience with law enforcement have rejected reliance on such factors. See Beheler, 463 U. S., at 1125 (rejecting a lower court’s view that the defendant’s prior interview with the police was relevant to the custody inquiry); Berkemer, 468 U. S., at 442, n. 35 (citing People v. P., 21 N. Y. 2d, at 9-10, 233 N. E. 2d, at 260, which noted the difficulties of a subjective test that would require police to “ ‘anticipate] the frailties or idiosyncrasies of every person whom they question’ ”); 468 U. S., at 430-432 (describing a suspect’s criminal past and police record as a circumstance “unknowable to the police”).
There is an important conceptual difference between the Miranda custody test and the line of cases from other contexts considering age and experience. The Miranda custody inquiry is an objective test. As we stated in Keohane, “[o]nce the scene is set and the players’ lines and actions are reconstructed, the court must apply an objective test to resolve the ultimate inquiry.” 516 U. S., at 112 (internal quotation marks omitted). The objective test furthers “the clarity of [Miranda’s] rule,” Berkemer, 468 U. S., at 430, ensuring that the police do not need “to make guesses as to [the circumstances] at issue before deciding how they may interrogate the suspect,” id., at 431. To be sure, the line between permissible objective facts and impermissible subjective experiences can be indistinct in some cases. It is possible to subsume a subjective factor into an objective test by making the latter more specific in its formulation. Thus the Court of Appeals styled its inquiry as an objective test by considering what a “reasonable 17-year-old, with no prior history of arrest or police interviews,” would perceive. 316 F. 3d, at 854-855 (case below).
At the same time, the objective Miranda custody inquiry could reasonably be viewed as different from doctrinal tests that depend on the actual mindset of a particular suspect, where we do consider a suspect’s age and experience. For example, the voluntariness of a statement is often said to depend on whether “the defendant’s will was overborne,” Lynumn v. Illinois, 372 U. S. 528, 534 (1963), a question that logically can depend on “the characteristics of the accused,” Schneckloth v. Bustamonte, 412 U. S. 218, 226 (1973). The characteristics of the accused can include the suspect’s age, education, and intelligence, see ibid., as well as a suspect’s prior experience with law enforcement, see Lynumn, supra, at 534. In concluding that there was “no principled reason” why such factors should not also apply to the Miranda custody inquiry, 316 F. 3d, at 850, the Court of Appeals ignored the argument that the custody inquiry states an objective rule designed to give clear guidance to the police, while consideration of a suspect’s individual characteristics — including his age — could be viewed as creating a subjective inquiry. Cf. Mathiason, 429 U. S., at 495-496 (noting that facts arguably relevant to whether an environment is coercive may have “nothing to do with whether respondent was in custody for purposes of the Miranda rule”). For these reasons, the state court’s failure to consider Alvarado’s age does not provide a proper basis for finding that the state court’s decision was an unreasonable application of clearly established law.
Indeed, reliance on Alvarado’s prior history with law enforcement was improper not only under the deferential standard of 28 U. S. C. § 2254(d)(1), but also as a de novo matter. In most eases, police officers will not know a suspect’s interrogation history. See Berkemer, supra, at 430-431. Even if they do, the relationship between a suspect’s past experiences and the likelihood a reasonable person with that experience would feel free to leave often will be speculative. True, suspects with prior law enforcement experience may understand police procedures and reasonably feel free to leave unless told otherwise. On the other hand, they may view past as prologue and expect another in a string of arrests. We do not ask police officers to consider these contingent psychological factors when deciding when suspects should be advised of their Miranda rights. See Berkemer, supra, at 431-432. The inquiry turns too much on the suspect’s subjective state of mind and not enough on the “objective circumstances of the interrogation.” Stansbury, 511 U. S., at 323.
The state court considered the proper factors and reached a reasonable conclusion. The judgment of the Court of Appeals is
Reversed.