
575 F.3d 785 (2009)
Orlando Manuel BOBADILLA, Petitioner-Appellee,
v.
Terry CARLSON, Warden, Respondent-Appellant.
No. 08-3010.
United States Court of Appeals, Eighth Circuit.
Submitted: May 12, 2009.
Filed: August 6, 2009.
*787 Kelly O'Neill Moller, AAG, argued, St. Paul, MN, for appellant.
Lynne Torgerson, argued, Minneapolis, MN, for appellee.
Before LOKEN, Chief Judge, BYE, Circuit Judge, and MILLER, District Judge.[1]
BYE, Circuit Judge.
Warden Terry Carlson appeals the district court's[2] order granting Orlando Manual Bobadilla's petition for writ of habeas corpus pursuant to 28 U.S.C. § 2254. Bobadilla was convicted in Minnesota state court of sexually assaulting T.B., his three-year-old nephew. The district court concluded Bobadilla's rights under the Sixth Amendment's Confrontation Clause were violated and the Minnesota Supreme Court unreasonably applied United States Supreme Court precedent in concluding otherwise. For the following reasons, we affirm.

I
At the time of Bobadilla's conviction, T.B. lived with his mother. T.B.'s father lived separately with his mother, his stepfather, and his brother Bobadilla. On Friday, May 2, 2003, T.B. spent the weekend with his father, grandmother, and other relatives. T.B.'s mother picked him up on Sunday, and, while preparing him for bed, noticed a red area near his anus. In response to his mother's inquiry, T.B. said Bobadilla had inserted a finger into his rectum. T.B.'s mother called T.B.'s father, and they agreed to take T.B. to the emergency room at once. At the hospital, T.B. was examined by a physician, who determined the results were consistent with the abuse described by T.B. A police officer was dispatched to the hospital, where he interviewed T.B.'s parents and an emergency-room nurse.
Five days later, Detective Matthew L. Akerson of the Willmar Police Department conducted an interview with T.B. Detective Akerson contacted Cherlynn Molden, a social worker employed by the Kandiyohi County Family Service Department and asked her to assist with the interview. According to Molden, "Detective Akerson from the Police Department asked me to assist him in interviewing [T.B.]. I wasn't involved in that part of the investigation *788 [that is, the criminal investigation], but he asked me to assist him."
Molden contacted T.B.'s mother and asked her to bring T.B. to the police department. T.B. was escorted to a room specifically designed to make children comfortable while being questioned about allegations of sexual abuse. A camera hidden behind a one-way mirror recorded the interview. Molden sat next to T.B. and asked him questions, while Akerson sat across from T.B. and observed. Molden utilized a "forensic" technique known as the "CornerHouse technique," which consists of asking questions in a structured manner to ascertain the nature of any sexual abuse. In response to the questions, T.B. confirmed the abuse he had first reported to his mother.
Bobadilla was charged in Minnesota state court with first- and second-degree criminal sexual conduct. After speaking to T.B. at length, the trial court judge found him not competent to testify. In lieu of his testimony, the state sought to introduce Molden's testimony recounting her interview with T.B., as well as the video of the interview. Bobadilla objected to the admission of such evidence as a violation of the Confrontation Clause.
The Confrontation Clause of the Sixth Amendment provides: "In all criminal prosecutions, the accused shall enjoy the right ... to be confronted with the witnesses against him." U.S. Const. Amend. VI. Such right is implicated whenever a statement by an unavailable declarant is introduced into evidence at trial, and the defendant has not had an opportunity to cross-examine the declarant. At the time of Bobadilla's trial, the admission of such evidence was governed by the standard set forth in Ohio v. Roberts, 448 U.S. 56, 100 S.Ct. 2531, 65 L.Ed.2d 597 (1980). In Roberts, the Supreme Court held the admission of such statements did not violate the Confrontation Clause so long as the evidence bore "indicia of reliability" by falling "within a firmly rooted hearsay exception" or showing "particularlized guarantees of trustworthiness." Id. at 66, 100 S.Ct. 2531.
The trial court, applying Roberts, allowed Molden to testify and permitted the state to introduce the video of T.B.'s interview with Molden. In addition, the jury heard testimony from T.B.'s mother concerning T.B.'s initial report of abuse, as well as testimony from the doctor who initially examined T.B. Bobadilla was convicted and sentenced to 144 months in prison.
On appeal, Bobadilla once again challenged the admission of the video of T.B.'s interview, as well as Molden's testimony concerning the interview, as a violation of the Confrontation Clause. While his appeal was pending, the Supreme Court issued its decision in Crawford v. Washington, 541 U.S. 36, 124 S.Ct. 1354, 158 L.Ed.2d 177 (2004), which set forth a materially different analysis for Confrontation Clause claims. In Crawford, the wife of a suspect was placed in police custody, given Miranda warnings, and asked a series of questions. The wife's statement implicated her husband, and the government sought to introduce the wife's statement at trial. Because the defendant's wife invoked the state marital privilege and did not testify at trial, the defendant objected to the admission of her statement as a Confrontation Clause violation. The trial court admitted her statement, finding it bore particularlized guarantees of trustworthiness under Roberts. In Crawford, however, the Supreme Court abandoned the Roberts test, concluding the Confrontation Clause had nothing to do with the reliability of the statement at issue. Rather, the Confrontation Clause served to prevent people from bearing testimony against a defendant without the defendant *789 having an opportunity to cross-examine the bearer of the testimony. Id. at 50-51, 60-65, 124 S.Ct. 1354. Thus, the Supreme Court held the "reliability" of a statement was immaterial. The Court held a Confrontation Clause violation exists whenever a "testimonial" statement is admitted against a defendant, regardless of the statement's reliability, when he or she has had no opportunity to cross-examine the declarant. Id. at 68-69, 124 S.Ct. 1354.
While the Court declined to provide a comprehensive definition as to which statements are testimonial, it did note an "accuser who makes a formal statement to government officers bears testimony in a sense that a person who makes a casual remark to an acquaintance does not." Id. at 51, 124 S.Ct. 1354. The Court discussed various possible formulations of statements which are testimonial: (1) "ex parte in-court testimony or its functional equivalentthat is, material such as affidavits, custodial examinations, prior testimony that the defendant was unable to cross-examine, or similar pretrial statements that declarants would reasonably expect to be used prosecutorially"; (2) "extrajudicial statements contained in formalized testimonial materials, such as affidavits, depositions, prior testimony, or confessions"; and (3) "statements that were made under circumstances which would lead an objective witness reasonably to believe that the statement would be available for use at a later trial." Id. at 51-52, 124 S.Ct. 1354 (internal citations and quotation marks omitted).
In Crawford, the Court found it unnecessary to adopt one of the aforementioned formulations of testimonial statements because "[s]tatements taken by police officers in the course of interrogations are ... testimonial under even a narrow standard." Id. at 52, 124 S.Ct. 1354. Furthermore, the Court used the term "`interrogation' in its colloquial, rather than any technical legal, sense." Id. at 53 n. 4, 124 S.Ct. 1354. Recognizing that many definitions of "interrogation" may exist, the statement at issue in Crawford, "knowingly given in response to structured police questioning, qualifie[d] under any conceivable definition." Id.
Because of Crawford, the Minnesota Court of Appeals unanimously reversed Bobadilla's conviction, concluding his Confrontation Clause rights were violated. State v. Bobadilla, 690 N.W.2d 345, 349-50 (Minn.Ct.App.2004). The court determined T.B.'s statements made during the course of his interview with Molden were testimonial, and that, because Bobadilla did not have an opportunity to cross-examine T.B., the admission of those statements violated the Confrontation Clause. The Minnesota Supreme Court reversed, concluding T.B.'s statements were not testimonial. State v. Bobadilla, 709 N.W.2d 243, 256 (Minn.2006). In doing so, the Minnesota Supreme Court applied an eight-factor test, with the most important factors being "whether either a declarant or government questioner is acting, to a substantial degree, in order to produce a statement for trial." Id. at 252.[3]
The court went on to conclude, because Molden's interview was conducted pursuant to Minnesota Statute § 626.556, neither Molden nor T.B. were acting with the predominant purpose of producing a statement for trial. The stated purpose of § 626.556 "is to protect children whose *790 health or welfare may be jeopardized through physical abuse, neglect, or sexual abuse." Minn.Stat. § 626.556(1). The statute allows social workers to interview suspected victims of sexual or physical abuse and, notably, provides that if a report of abuse alleges a violation of a criminal statute, "the local law enforcement agency and local welfare agency shall coordinate the planning and execution of their respective investigation and assessment efforts to avoid a duplication of fact-finding efforts and multiple interviews." Minn.Stat. § 626.556, subd. 10(a). Furthermore, the statute requires, in cases involving alleged sexual abuse, that an audio-video recording be made of any interviews of the alleged victim. Minn.Stat. § 626.556, subd. 10(j).
First, the court noted the express purpose of § 626.556 was to protect the health and welfare of children, not to generate statements for trial. Id. at 254. Second, the court found it immaterial as to the statute requiring social workers to coordinate their investigations with law enforcement and to record the interviews so as to eliminate a need for separate interviews by law enforcement officers, concluding such requirements do not "necessarily indicate that the purpose of the interview was to create a formalized statement for trial." Id. at 255. In sum, the court concluded the statements were not testimonial because the interview "was initiated by a child protection worker in response to a report of sexual abuse for the overriding purpose of assessing whether abuse occurred, and whether steps were therefore needed to protect the health and welfare of the child." Id. at 255.[4]
Bobadilla next filed a petition for writ of habeas corpus pursuant to 28 U.S.C. § 2254 in the United States District Court for the District of Minnesota. The district court concluded T.B.'s statements during the interview were testimonial, the admission of such statements violated the Confrontation Clause, and the Minnesota Supreme Court unreasonably applied Supreme Court precedent in concluding to the contrary. The court granted the petition for writ of habeas corpus, but stayed the order pending the outcome of this appeal.

II
In a habeas proceeding, this Court reviews the district court's conclusions of law de novo and its factual findings for clear error. Randolph v. Kemna, 276 F.3d 401, 403 (8th Cir.2002). The Supreme Court has stated "that the essence of habeas corpus is an attack by a person in custody upon the legality of that custody, and that the traditional function of the writ is to secure release from illegal custody." Preiser v. Rodriguez, 411 U.S. 475, 484, 93 S.Ct. 1827, 36 L.Ed.2d 439 (1973). A writ of habeas corpus is appropriate when a state prisoner is "in custody in violation of the Constitution or laws or treaties of the United States." 28 U.S.C. § 2254(a). A person is in custody in violation of the Constitution "`if any consecutive sentence the prisoner is scheduled to serve was imposed as the result of a deprivation of constitutional rights.'" Garlotte v. Fordice, 515 U.S. 39, 41, 115 S.Ct. 1948, 132 L.Ed.2d 36 (1995) (quoting Peyton v. Rowe, 391 U.S. 54, 64-65, 88 S.Ct. 1549, 20 L.Ed.2d 426 (1968)).
The Antiterrorism and Effective Death Penalty Act (AEDPA), 28 U.S.C. § 2254, limits the power of federal courts to grant habeas relief for any claim "adjudicated on the merits in State court proceedings" unless the adjudication:

*791 (1) 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; or
(2) resulted in a decision that was based on an unreasonable determination of the facts in light of the evidence presented in the State court proceeding.
28 U.S.C. § 2254(d).
The district court correctly concluded the decision of the Minnesota Supreme Court was not contrary to clearly established Federal law, as determined by the Supreme Court. Under the "contrary to" clause, federal courts may grant a writ of habeas corpus only if "the state court arrives at a conclusion opposite to that reached by [the Supreme] Court on a question of law or if the state court decides a case differently than [the Supreme] Court has on a set of materially indistinguishable facts." Williams v. Taylor, 529 U.S. 362, 413, 120 S.Ct. 1495, 146 L.Ed.2d 389 (2000). Because the Minnesota Supreme Court applied the governing legal rule from Crawfordthat the admission of testimonial statements absent an opportunity to cross-examine the declarant violates the Confrontation Clauseand did not reach a contrary conclusion on a set of materially indistinguishable facts, its decision was not "contrary to" clearly established law. See id. at 405-06, 120 S.Ct. 1495.
The district court was correct to conclude, however, that the decision of the Minnesota Supreme Court was an "unreasonable application" of Crawford. Under this clause, a federal habeas court may grant the writ if "the state court identifies the correct legal principle from [the Supreme] Court's decisions but unreasonably applies that principle to the facts of the principal case." Id. at 413, 120 S.Ct. 1495. Additionally a decision "also involves an unreasonable application of [the] Court's precedent if the state court either unreasonably extends a legal principle from [Supreme Court] precedent to a new context where it should not apply or unreasonably refuses to extend that principle to a new context where it should apply." Id. at 407, 120 S.Ct. 1495. The Supreme Court has noted, however, that "an unreasonable application of federal law is different from an incorrect application of federal law." Id. at 410, 120 S.Ct. 1495 (emphasis in original).
Crawford held that statements taken by police officers in the course of interrogations are testimonial under even the narrowest standard, and it was unreasonable for the Minnesota Supreme Court not to conclude the interview of T.B. was, in all relevant aspects, a form of police interrogation. First, the interview was initiated by a police officer. Second, the interview was conducted for the purpose of the criminal investigation. Although Molden contacted T.B.'s mother, the evidence demonstrates it was Detective Akerson who requested Molden to do so. Furthermore, Molden stated Detective Akerson asked her to "assist him" in questioning T.B. and that she was not involved in the criminal investigation until Detective Akerson "asked [her] to assist him." Third, the interview was not conducted until five days after the abuse was first alleged, which indicates the purpose of the interview was to confirm a past allegation of abuse rather than to assess immediate threats to T.B.'s health and welfare. Because of these circumstances, this interview was no different than any other police interrogation: it was initiated by a police officer a significant time after the incident occurred for the purpose of gathering evidence during a criminal investigation.
The only significant difference between the interview involved in the present case and the one held to be testimonial in Crawford is instead of a police officer asking *792 questions about a suspected criminal violation, he sat silent while a social worker did the same. We find this to be a distinction without a difference. In addition to the aforementioned facts, the interview took place at police headquarters in a room specifically designed for the interrogation of children who allege sexual abuse. Furthermore, under the statute, the interview was recorded for the sole purpose of eliminating the need for T.B. to be interviewed by law enforcement personnel. Molden also utilized a structured, "forensic" method of interrogating T.B. Notably, Crawford identified a "recorded statement, knowingly given in response to structured police questioning," as qualifying under any conceivable definition of interrogation. 541 U.S. at 53 n. 4, 124 S.Ct. 1354. In sum, Justice Page was correct to conclude Molden was simply acting as a "surrogate interviewer" for the police. Bobadilla, 709 N.W.2d at 258 (Page, J., dissenting). Molden was contacted by a police officer to assist with the criminal investigation, the interview took place several days after the abuse allegedly occurred, the interview was conducted at police headquarters with a police officer present, and Molden utilized a structured method of questioning to elicit T.B.'s statements. As such, it was unreasonable for the Minnesota Supreme Court to conclude, even though the questioning was undertaken by a social worker, the statements made by T.B. during his interrogation were in any way different than the statements found to be testimonial in Crawford.
We, like the district court, are unpersuaded by the existence of Minnesota Statute § 626.556. While it is true the statute authorizes social workers to interview alleged victims of abuse for the purpose of protecting their health and welfare, the circumstances of the present case, as described above, indicate such was not the purpose of T.B.'s interview. Contrary to the Minnesota Supreme Court's assertion, this interview was not conducted "for the overriding purpose of assessing whether abuse occurred, and whether steps were therefore needed to protect the health and welfare of the child." Id. at 255. Molden's testimony makes clear she decided to interview T.B. only after Detective Akerson asked her to assist him with the criminal investigation. The interview being conducted five days after the alleged abuse is a further indication of its purpose, which was to elicit information for use at trial, rather than determining whether steps were needed to protect T.B.'s immediate health and welfare. Furthermore, given the alleged abuse was reported promptly and T.B.'s parents voluntarily cooperated with the investigation, there is no evidence T.B.'s health or welfare was in further danger. Additionally, the district court did not clearly err in finding Molden did not ask the type of questions one would reasonably expect if the purpose of the interview was to assess "imminent" risks to T.B.'s health and welfare, such as whether he had recently seen Bobadilla or whether he was spending any time at his grandmother's house. Instead, the interview consisted of highly structured questioning aimed at getting T.B. to repeat, on videotape, his allegation of abuse.
Thus, even if the purpose of an interview under Minnesota Statute § 626.556 is to assess immediate threats to a child's health and welfare, and thus different than the purpose of the police interrogation found to include testimonial statements in Crawford, such was not the purpose of this particular interview. It is the circumstances of the interview at issue which must control, not just the purpose of the statute itself. As the district court astutely noted, if a prosecutor six months after abuse occurred asked a social worker to help him videotape a statement for an upcoming trial, it would be unreasonable to conclude the purpose of the interview was to protect the child from immediate danger *793 just because the statute says as much. Just as such situation would clearly be akin to the police interrogation in Crawford, so too is the present interview, and it was unreasonable for the Minnesota Supreme Court to conclude otherwise.
Additionally, the statute, rather than dispelling the hallmarks of traditional police interrogations, requires them. The statute mandates social workers and police officers coordinate the planning and execution of their investigation to eliminate the need for multiple interviews. Thus, even if a social worker is acting for a different purpose, the statute requires the interview to achieve another purpose akin to a police interrogation: assisting law enforcement with the investigation of a suspected criminal violation. In this vein, the statute also requires the social worker to videotape the interview so police officers do not have to conduct a second interview with the victim. In such cases, the social worker's interview is a substitute for, and functions as, the police interrogation. Far from making such interviews unlike the police interrogation in Crawford, the statute mandates them to be the functional equivalent of such interrogations.
In sum, Crawford held statements made during police interrogations are testimonial. The Minnesota Supreme Court unreasonably applied Crawford in holding T.B.'s statements made during his interview with Molden and Detective Akerson were not testimonial. Just as in Crawford, the interview in the present case was initiated by a police officer to obtain statements for use during a criminal investigation, was recorded so further law enforcement interviews would be unnecessary, and involved structured questioning designed to confirm a prior allegation of abuse. No one disputes should Detective Akerson have conducted the questioning, such statements would be testimonial under Crawford. It was unreasonable for the Minnesota Supreme Court to conclude just because he requested another government agent to ask the same questions in order to achieve the same purpose, the result is different. Our conclusion is reinforced by § 626.526, which required Molden to act as a substitute for a police interrogator. Thus, we agree with the district court about Bobadilla's Confrontation Clause rights being violated and the Minnesota Supreme Court unreasonably applying Crawford in concluding to the contrary.
The district court was also correct to conclude the violation of the Confrontation Clause was not harmless. In determining whether an error is harmless we ask whether "the error had a substantial and injurious effect or influence in determining the jury's verdict." Toua Hong Chang v. Minnesota, 521 F.3d 828, 832 (8th Cir.2008). While there was other evidence tending to prove Bobadilla's guilt, it is clear the prosecution's case rested heavily on Molden's testimony and the videotape of her interview with T.B. The only other evidence admitted into trial was the testimony of T.B.'s mother recounting T.B.'s first statement he made about the abusethe only statement outside of the interview in which he identifies Bobadilla as the perpetratoras well as testimony from the doctor indicating the medical examination was consistent with sexual abuse. Given the other evidence of Bobadilla's guilt was minimal, it is likely the admission of T.B.'s statements made during the course of the interview had a substantial effect in influencing the jury's verdict. Thus, the error was not harmless.[5]


*794 III
For the aforementioned reasons, we affirm the decision of the district court.
NOTES
[1]  The Honorable Brian Stacy Miller, United States District Judge for the Eastern District of Arkansas, sitting by designation.
[2]  The Honorable Patrick J. Schiltz, United States District Judge for the District of Minnesota.
[3]  The remaining factors are: (1) whether the declarant was a victim or an observer; (2) whether it was the police or the declarant who initiated the conversation; (3) the location where the statements were made; (4) the declarant's emotional state when the statements were made; (5) the level of formality and structure of the conservation between the officer and declarant; and (6) if and how the statements were recorded. Id. at 250.
[4]  Although we will discuss this point in detail later in the opinion, while it is true Molden initiated the contact with T.B.'s mother, it was Detective Akerson who first decided to interview T.B. and requested that Molden do so.
[5]  The Supreme Court has since issued additional decisions interpreting the scope of the Confrontation Clause. Davis v. Washington, 547 U.S. 813, 126 S.Ct. 2266, 165 L.Ed.2d 224 (2006) (holding that statements made during a 911 emergency call were not testimonial, while statements made to a police officer after the danger had passed were testimonial); Melendez-Diaz v. Mass., ___ U.S. ___, 129 S.Ct. 2527, 174 L.Ed.2d 314 (2009) (holding that lab analyses introduced into trial are testimonial). The Court's decision in Davis strongly supports our conclusion that T.B.'s statements made during the course of the interview with Molden were testimonial, because "the circumstances indicate that there is no ... emergency, and that the primary purpose of the interrogation is to establish or prove past events potentially relevant to later criminal prosecution." 124 S.Ct. at 2273-74. Davis does not influence our analysis, however, because it was issued after the decision of the Minnesota Supreme Court in the present case, and does not impact whether the Minnesota Supreme Court unreasonably applied Supreme Court precedent at the time of its decision.
