
49 Cal.4th 263 (2010)
109 Cal. Rptr. 3d 610
231 P.3d 341
THE PEOPLE, Plaintiff and Appellant,
v.
ARMANDO MONTER JACINTO, Defendant and Respondent.
No. S164011.
Supreme Court of California.
May 27, 2010.
*266 Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Gerald A. Engler, Assistant Attorney General, Donald E. de Nicola, Deputy State Solicitor General, Laurence K. Sullivan, Stan Helfman and Amy Haddix, Deputy Attorneys General, for Plaintiff and Appellant.
Stephanie Clark, under appointment by the Supreme Court, for Defendant and Respondent.

OPINION
WERDEGAR, J.
In the circumstances of this case, did the deportation of the sole witness favorable to the defense violate defendant's federal and state constitutional rights to the compulsory attendance of witnesses in his favor? Reversing the trial court, the Court of Appeal held it did not. We affirm.

FACTS[1]
On May 12, 2006, Eric Garcia and victim Victor Retana went to a restaurant in Santa Rosa and put $10 into the jukebox. When a technical problem caused the music suddenly to stop playing, they asked the restaurant owner for a refund. At the time, defendant Armando Monter Jacinto and an unidentified woman were also present in the restaurant, and defendant was talking to the restaurant's owner. Apparently unhappy with Garcia and Retana's music selections, defendant advised the owner against providing a refund, but he nevertheless refunded the money. As Garcia and Retana prepared to leave, an altercation began. Garcia testified he had already exited the restaurant's front door when he turned to look back and saw Retana standing just inside the door. Defendant, the restaurant owner, the unidentified *267 woman, and an unknown older man were standing very close to Retana, all of them pushing and shoving. According to Garcia, defendant suddenly produced a knife and stabbed Retana in the abdomen. Garcia did not see anyone holding a knife except for defendant, although he admitted he could not see everyone's hands. After the stabbing, Garcia heard Retana ask the restaurant owner: "Did you see what he had done?" Garcia also heard the woman exclaim that she had not "done it."
Detective Carlos Basurto of the Sonoma County Sheriff's Department interviewed Retana in the hospital a week after the crime. According to Detective Basurto, Retana reported that it was Garcia, not he, who became embroiled in an altercation with the people in the restaurant. Retana stated that during the melee people were pushing and shoving and some punches were thrown. He went to assist his friend Garcia and pulled defendant away from the crowd, whereupon defendant drew some sort of blade and stabbed him. Retana told Detective Basurto he was sure the woman had not stabbed him. Police arrested defendant and charged him with attempted murder and assault with a deadly weapon.
Before trial, the defense employed Carlos Escobedo to investigate the case. Defendant's family contacted Escobedo and urged him to interview someone named Nicolas Esparza,[2] who claimed to be a percipient witness to the stabbing. Escobedo located Esparza in county jail, where he was being held on an unrelated domestic violence charge, and interviewed him on July 19, 2006. During this interview, Esparza told Escobedo he worked in a lunch truck sponsored by the restaurant. At the time of the stabbing, Esparza said he was outside the restaurant, cleaning the truck. He said he saw the entire altercation and saw the woman in the group take something out of her purse and "hit[] [Retana] with a blade." Esparza reported seeing blood spurt from the victim's body. When asked to describe the knife, Esparza said he did not "exactly" see the blade, but later agreed when Escobedo asked if he "saw her put the blade in the [victim's] abdomen." Esparza said he was not drunk at the time (having just finished his day's work) and was 99 percent sure the woman did the stabbing. According to Escobedo, Esparza told him that although he might get into trouble by revealing what he saw, "he thought it was unfair [that defendant] was in jail for something he didn't do." On October 6, Escobedo returned to the jail and served the sheriff with a subpoena for Esparza.
On October 16, Escobedo again returned to the jail, this time to serve Esparza personally with a subpoena and to reinterview him. Before the *268 interview, Escobedo spoke to a receptionist at the jail named "Rita," whom the prosecutor later described as a "long time member of the Sheriff's Office who works at the . . . jail." Rita read from a computer screen and confirmed that Esparza was listed in the sheriff's database as a defense witness in a case; she mentioned as well that she thought Esparza would be deported. When Escobedo reinterviewed Esparza, Esparza also mentioned he thought he would be deported. Escobedo did not advise anyone at the jail not to deport Esparza.
Esparza was in fact released to federal authorities and deported on October 18, 2006. As a consequence, defendant moved to dismiss the charges, claiming that Esparza's deportation violated his constitutional rights under the federal due process and compulsory process clauses. (U.S. Const., 5th, 6th, 14th Amends.) At the hearing on the motion, Escobedo testified that, as a result of his investigation, he had determined that Esparza was the only person actually to witness the stabbing other than the victim himself. According to Escobedo, a waitress at the restaurant confirmed that she saw Esparza outside the restaurant the night of the stabbing. The prosecution presented no evidence suggesting a federal immigration detainer existed naming Esparza as a person wanted for deportation; accordingly, the trial court held no such detainer existed. (But see, post, at p. 272 & fn. 5.) Finding the missing evidence from Esparza was material to defendant's proposed defense, the trial court granted defendant's motion to dismiss the charges. The Court of Appeal reversed, and we granted review.

DISCUSSION
(1) For those accused by the government of having committed a crime, the Sixth Amendment to the United States Constitution sets forth several fundamental protections, including the right to legal counsel, to an impartial jury, to notice of the charges, to confront one's accusers, and to a speedy trial. Pertinent to the matter before us today is another component of the bundle of rights guaranteed by the Sixth Amendment: the right of one accused of a crime to compel the testimony of those who have favorable evidence. Thus, the Sixth Amendment provides that "[i]n all criminal prosecutions, the accused shall enjoy the right . . . to have compulsory process for obtaining witnesses in his favor . . . ." This constitutional guarantee, generally termed the compulsory process clause, applies in both federal and state trials. (Washington v. Texas (1967) 388 U.S. 14 [18 L.Ed.2d 1019, 87 S.Ct. 1920] [6th Amend.'s compulsory process clause is incorporated into the 14th Amend.'s due process clause, making it applicable in state prosecutions].)
The right of an accused to compel witnesses to come into court and give evidence in the accused's defense is a fundamental one. As the high court has *269 explained: "The right to offer the testimony of witnesses, and to compel their attendance, if necessary, is in plain terms the right to present a defense, the right to present the defendant's version of the facts as well as the prosecution's to the jury so it may decide where the truth lies. Just as an accused has the right to confront the prosecution's witnesses for the purpose of challenging their testimony, he has the right to present his own witnesses to establish a defense. This right is a fundamental element of due process of law." (Washington v. Texas, supra, 388 U.S. at p. 19.)
(2) Article I, section 15 of the California Constitution similarly guarantees as a matter of state constitutional law that "[t]he defendant in a criminal cause has the right . . . to compel attendance of witnesses in the defendant's behalf . . . ." This court, as the final arbiter of the meaning of the California Constitution, has likewise found the state constitutional right to compel the attendance of witnesses a basic component of a fair trial. (In re Martin (1987) 44 Cal.3d 1, 30 [241 Cal.Rptr. 263, 744 P.2d 374]; see also People v. Barnum (2003) 29 Cal.4th 1210, 1223 [131 Cal.Rptr.2d 499, 64 P.3d 788] ["The right to compulsory process is a `fundamental' right."].) "A judicial system with power to compel attendance of witnesses is essential to effective protection of the inalienable rights guaranteed by [the state Constitution]." (Vannier v. Superior Court (1982) 32 Cal.3d 163, 171 [185 Cal.Rptr. 427, 650 P.2d 302].)
A criminal defendant's rights under the compulsory process clause can be infringed in several ways. "They include, for example, statements to defense witnesses to the effect that they would be prosecuted for any crimes they reveal or commit in the course of their testimony. [Citations.] They also include statements to defense witnesses warning they would suffer untoward consequences in other cases if they were to testify on behalf of the defense. [Citations.] Finally, they include arresting a defense witness before he or other defense witnesses have given their testimony." (In re Martin, supra, 44 Cal.3d at pp. 30-31.) In this case, defendant contends the prosecution violated his rights under the compulsory process clause when the sheriff released Esparza to federal officials from United States Immigration and Customs Enforcement (ICE), knowing he would most likely be deported and thus unavailable to testify on defendant's behalf.
(3) To prevail on a claim of prosecutorial violation of the right to compulsory process, a defendant must establish three elements. "`First, he must demonstrate prosecutorial misconduct, i.e., conduct that was "entirely unnecessary to the proper performance of the prosecutor's duties and was of such a nature as to transform a defense witness willing to testify into one unwilling to testify."' (In re Williams (1994) 7 Cal.4th 572, 603 [29 Cal.Rptr.2d 64, 870 P.2d 1072].) Second, he must establish the prosecutor's misconduct was a substantial cause in depriving the defendant of the witness's testimony. (Ibid.) The defendant, however, `is not required to prove *270 that the conduct under challenge was the "direct or exclusive" cause. [Citations.] Rather, he need only show that the conduct was a substantial cause. [Citations.] The misconduct in question may be deemed a substantial cause when, for example, it carries significant coercive force [citation] and is soon followed by the witness's refusal to testify.' (In re Martin, supra, 44 Cal.3d at p. 31.) Finally, the defendant must show the testimony he was unable to present was material to his defense." (People v. Lucas (1995) 12 Cal.4th 415, 457 [48 Cal.Rptr.2d 525, 907 P.2d 373]; see In re Williams, at p. 603; United States v. Valenzuela-Bernal (1982) 458 U.S. 858 [73 L.Ed.2d 1193, 102 S.Ct. 3440].)
(4) Applying this test to the facts of this case, we conclude defendant did not satisfy the first element, i.e., prosecutorial misconduct. Preliminarily, we note that although defendant subpoenaed Esparza to appear at trial, the trial was set for a date after Esparza's scheduled release from local custody. Accordingly, the sheriff in any event would have had no responsibility for ensuring Esparza's appearance at trial. But even if we assume, as is apparently the case, that county jail officials released Esparza to federal immigration authorities immediately upon the expiration of his jail term, thereby rendering him unavailable to testify at trial, defendant fails to show prosecutorial misconduct, i.e., that the prosecutor acted in a manner "`entirely unnecessary to the proper performance of [his] duties'" and thereby prevented Esparza from testifying on defendant's behalf. (In re Williams, supra, 7 Cal.4th at p. 603; accord, People v. Mincey (1992) 2 Cal.4th 408, 460 [6 Cal.Rptr.2d 822, 827 P.2d 388].) Because it was the sheriff, not the prosecutor, who released Esparza to immigration officials, to satisfy this element defendant must show the jail officials were part of the prosecution team (or otherwise acted at the prosecution's behest). This he did not do.
(5) As in other counties, the Sonoma County Sheriff has legal authority to run the county jail and acts as the custodian of the prisoners and detainees therein. (Pen. Code, § 4000; Gov. Code, § 26605.) Another division of the sheriff's department provides law enforcement services to certain parts of the county. Indeed, Detective Basurto of the Sonoma County Sheriff's Department investigated the crime in this case. But this formal identity between sheriff's deputies operating and providing protective services in the jail and detectives in the law enforcement division investigating crimes does not automatically render the deputies assigned to the jail members of the prosecutorial team. Absent some additional showing of affirmative prosecutorial involvement in Esparza's removal,[3] we cannot hold the prosecutor *271 legally responsible merely because a sheriff's deputy working at the jail was involved. As the Court of Appeal explained below: "The sheriff's department was no more than the custodian of witness Esparza. In this case, it was not a part of the prosecutorial investigative team . . . [and] the action of the sheriff's department or county jail personnel may not be attributed to the prosecution."
Our decision is consistent with United States v. Valenzuela-Bernal, supra, 458 U.S. 858 (Valenzuela-Bernal), cited by both parties. In that case, the defendant, an alien present in the country illegally, was driving a car with five other men, all of whom had crossed the border illegally. At a checkpoint near Temecula, border patrol agents noticed the five passengers lying down in the car and motioned for the defendant to stop. He instead sped through the checkpoint and engaged agents in a high-speed chase before stopping the car and attempting to flee on foot. The defendant and three of the five passengers were captured, whereupon the defendant admitted he was in the country illegally and was transporting the other men in order to assist human smugglers. The three passengers confirmed this story and admitted their undocumented status. All three identified the defendant as the driver of the car.
(6) After determining the three passengers possessed no additional material evidence related to the charge against the defendant (i.e., transporting illegal aliens), the Assistant United States Attorney arranged for the deportation of two of the three, detaining the third to permit him to testify for the prosecution at the defendant's criminal trial. The defendant subsequently moved to dismiss the indictment on the ground that "the Government's deportation of the two passengers . . . violated . . . his Sixth Amendment right to compulsory process for obtaining favorable witnesses." (Valenzuela-Bernal, supra, 458 U.S. at p. 861.) The high court disagreed. The court explained that the compulsory process clause "does not by its terms grant to a criminal defendant the right to secure the attendance and testimony of any and all witnesses: it guarantees him `compulsory process for obtaining witnesses in his favor.'" (Id. at p. 867.) The court observed that in Washington v. Texas, supra, 388 U.S. 14, the seminal decision on the meaning of the compulsory process clause, the State of Texas had violated the defendant's compulsory process rights because he had been deprived of "`relevant and material'" testimony "`vital'" to his defense. (Valenzuela-Bernal, at p. 867, italics omitted.) From this, the Valenzuela-Bernal court concluded a defendant *272 "cannot establish a violation of his constitutional right to compulsory process merely by showing that deportation of [potential witnesses] deprived him of their testimony. He must at least make some plausible showing of how their testimony would have been both material and favorable to his defense." (Ibid.; see also id. at p. 873.) "As in other cases concerning the loss of material evidence, sanctions will be warranted for deportation of alien witnesses only if there is a reasonable likelihood that the testimony could have affected the judgment of the trier of fact." (Id. at pp. 873-874.) Because the defendant made no showing the deported witnesses could have provided material, favorable evidence for his defense, his right to compulsory process was not violated.
Here, of course, defendant was deprived of the testimony of the sole witness in his defense, one whose testimony, if believed, would have fully exonerated him. Seeking to distinguish Valenzuela-Bernal, the People note the prosecutor in that case was directly responsible for the witnesses' removal from the country, whereas in this case no evidence shows the prosecutor played any part in Esparza's deportation. Instead, deputy sheriffs working in the jail acted on their own in cooperating with ICE. For the reasons previously discussed, we agree.
Moreover, even were the jail personnel to be characterized as members of the prosecution team, defendant would face an additional obstacle to establishing his claim of prosecutorial misconduct: no misconduct occurred in connection with Esparza's deportation because the sheriff properly acquiesced to ICE's request for Esparza, as represented by the issuance of the federal immigration detainer. That Esparza was present in the country in violation of immigration laws is undisputed. The prosecutor, arguing in opposition to the motion to dismiss before the trial court, assumed ICE had issued a federal immigration detainer seeking Esparza's custody once his misdemeanor term in county jail expired.[4] Although the prosecution presented no direct evidence of the detainer, one in fact existed and the Court of Appeal took judicial notice of it.[5]
(7) The federal government's power over immigration issues is supreme. (See generally De Canas v. Bica (1976) 424 U.S. 351, 354 [47 L.Ed.2d 43, *273 96 S.Ct. 933] ["Power to regulate immigration is unquestionably exclusively a federal power."]; People v. Kim (2009) 45 Cal.4th 1078, 1108 [90 Cal.Rptr.3d 355, 202 P.3d 436] [Congress has plenary power over immigration].) Faced with an immigration detainer from ICE, the sheriff and his employees properly complied, as a matter of comity, by releasing Esparza to ICE's custody. Accordingly, defendant fails to establish a violation of his constitutional rights under either the state or federal compulsory process clauses.
(8) Defendant, we observe, was not powerless to ensure that Esparza would appear at his trial. Indeed, the law requires him to take an active role in ensuring the presence of his witnesses. As the United States Supreme Court has observed: "There is a significant difference between the Compulsory Process Clause weapon and other rights that are protected by the Sixth Amendmentits availability is dependent entirely on the defendant's initiative. Most other Sixth Amendment rights arise automatically on the initiation of the adversary process and no action by the defendant is necessary to make them active in his or her case. While those rights shield the defendant from potential prosecutorial abuses, the right to compel the presence and present the testimony of witnesses provides the defendant with a sword that may be employed to rebut the prosecution's case. The decision whether to employ it in a particular case rests solely with the defendant. The very nature of the right requires that its effective use be preceded by deliberate planning and affirmative conduct." (Taylor v. Illinois (1988) 484 U.S. 400, 410 [98 L.Ed.2d 798, 108 S.Ct. 646], italics added, fn. omitted.)
Thus, in addition to serving a subpoena on Esparza, other procedures were potentially available to defendant to ensure Esparza's testimony at trial. For example, if a witness is in jail, Code of Civil Procedure section 1995 authorizes a procedure by which the jailer must produce the witness, or allow *274 the witness to be deposed in the jail to preserve his testimony.[6] Because defendant, through his investigator, learned that Esparza might be deported, possibly before trial, defendant could have moved to depose Esparza in the jail.
Defendant also could have approached ICE and invoked part 215.2(a) of title 8 of the Code of Federal Regulations (2010), which provides: "Any departure-control officer who knows or has reason to believe that the case of an alien in the United States comes within the provisions of [8 C.F.R.] § 215.3 shall temporarily prevent the departure of such alien from the United States and shall serve him with a written temporary order directing him not to depart, or attempt to depart, from the United States until notified of the revocation of the order." (Italics added.) Esparza, as a material witness in a criminal case, arguably came within this provision, as part 215.3 of title 8 of the Code of Federal Regulations (2010) provides in pertinent part: "The departure from the United States of any alien within one or more of the following categories shall be deemed prejudicial to the interests of the United States. [¶] . . . [¶] (g) Any alien who is needed in the United States as a witness in . . . any criminal case under investigation or pending in a court in the United States: Provided, That any alien who is a witness in . . . any criminal case pending in any criminal court proceeding may be permitted to depart from the United States with the consent of the appropriate prosecuting authority, unless such alien is otherwise prohibited from departing under the provisions of this part." (Italics omitted.)
In short, defendant was not without legal tools to ensure that Esparza was available to testify on his behalf.

CONCLUSION
The decision of the Court of Appeal reversing the trial court is affirmed.
George, C.J., Baxter, J., Chin, J., and Corrigan, J., concurred.
KENNARD, J., Concurring.
Defendant subpoenaed a witness to testify at his upcoming criminal trial. At the time, the witness was in the custody of the *275 Sonoma County Sheriff because he was serving a jail sentence on a matter unrelated to defendant's trial. After the witness completed his sentence, the sheriff turned him over to federal immigration authorities, who promptly deported him, thereby making him unavailable to testify on behalf of defendant. I agree with the majority that the release of the witness to federal immigration authorities did not violate defendant's constitutional right to compel the attendance of witnesses on his behalf. (U.S. Const., 6th Amend.; Cal. Const., art. I, § 15.)
As the majority points out, to establish a violation of the right to compel the attendance of witnesses a defendant must show, among other things, misconduct by the prosecution. (People v. Lucas (1995) 12 Cal.4th 415, 457 [48 Cal.Rptr.2d 525, 907 P.2d 373].) The prosecution team is comprised of not only the prosecutor but also "others acting on the government's behalf in the case, including the police." (Kyles v. Whitley (1995) 514 U.S. 419, 437 [131 L.Ed.2d 490, 115 S.Ct. 1555].) Here, defendant has not established prosecutorial misconduct because the federal immigration detainer required the Sonoma County Sheriff to deliver the witness to the custody of federal officials; defendant has failed to establish prosecutorial involvement in the deportation of the witness. (Maj. opn., ante, at pp. 270, 272-273.) This conclusion is sufficient to resolve this issue.
But the majority also holds that even though the Sonoma County Sheriff's Department investigated the crime with which defendant was charged, the sheriff's deputies operating the jail cannot be considered members of the prosecution team, and therefore any misconduct by those deputies cannot be attributed to the prosecution. (Maj. opn., ante, at pp. 270-271.)
This is a difficult issue that, in light of the majority's correct conclusion pertaining to the federal immigration detainer, need not be addressed in this case. Whether the prosecution team includes the investigating law enforcement agency itself or only some of its personnel and, if so, which personnel under what circumstances, are substantial questions as shown by language in a couple of our cases suggesting that the agency itself is part of the prosecution team (see People v. Zambrano (2007) 41 Cal.4th 1082, 1133 [63 Cal.Rptr.3d 297, 163 P.3d 4]; In re Steele (2004) 32 Cal.4th 682, 696-697 [10 Cal.Rptr.3d 536, 85 P.3d 444]) and language in an earlier decision suggesting that only the agency's investigators are part of the prosecution team (In re Brown (1998) 17 Cal.4th 873, 879 [72 Cal.Rptr.2d 698, 952 P.2d 715]). *276 Because there was no prosecutorial misconduct here and thus there is no need to resolve the issue in this case and because of the difficulty in determining who are or are not members of the prosecution team, I do not join the majority's holding on this point.
Moreno, J., concurred.
NOTES
[1]  As the trial court dismissed the case before trial, the facts are drawn from the preliminary hearing and the hearing in support of the motion to dismiss.
[2]  Other documents, such as the reporter's transcript and the pleadings in the trial court, spell his name as "Nicholas Esparza." We adopt the spelling used in the Court of Appeal opinion, which is consistent with Esparza's booking sheet.
[3]  Both the People and the Court of Appeal refer to this argument as one involving "state action," but that phrase is misleading. (See, e.g., Shelley v. Kraemer (1948) 334 U.S. 1 [92 L.Ed. 1161, 68 S.Ct. 836] [judicial enforcement of a racially restrictive covenant constitutes state action]; Burton v. Wilmington Pkg. Auth. (1961) 365 U.S. 715 [6 L.Ed.2d 45, 81 S.Ct. 856] [racial discrimination by a private restaurant that leased space from a state agency constitutes state action].) The sheriff's department is clearly a governmental agency and acts with state action. (See Lugar v. Edmondson Oil Co. (1982) 457 U.S. 922 [73 L.Ed.2d 482, 102 S.Ct. 2744] [execution of a writ of attachment by the county sheriff constitutes state action].) The pertinent question here is not whether state action exists, but whether the sheriff's actions are attributable to the prosecution.
[4]  The prosecutor argued: "The jail's obligation ceased when the federal government came in and said [Esparza] is being deported. What we don't have is any information on why he was being deported other than it was [a] mandatory deportation." (Italics added.) He continued: "What [ICE] has told us at this point is that [Esparza] was picked up from jail and they drove him away. He went back to Mexico."
[5]  Included in the materials for which judicial notice was granted by the Court of Appeal is a copy of a federal immigration detainer, dated August 19, 2006, asking Sonoma County authorities to detain Esparza "for a period not to exceed 48 hours . . . to provide adequate time for [federal immigration officials] to assume custody of the alien." Esparza was sentenced on July 3, 2006, to serve 180 days for two counts of misdemeanor spousal abuse (Pen. Code, § 273.5), so it is likely ICE officials did not immediately move to take custody. In a subsequent document dated October 17, 2006, ICE notified Esparza it intended to remove him from the country. He was apparently deported the next day.

"[A]n appellate court generally is not the forum in which to develop an additional factual record . . . ." (People v. Peevy (1998) 17 Cal.4th 1184, 1207 [73 Cal.Rptr.2d 865, 953 P.2d 1212].) "Reviewing courts generally do not take judicial notice of evidence not presented to the trial court. Rather, normally `when reviewing the correctness of a trial court's judgment, an appellate court will consider only matters which were part of the record at the time the judgment was entered.'" (Vons Companies, Inc. v. Seabest Foods, Inc. (1996) 14 Cal.4th 434, 444, fn. 3 [58 Cal.Rptr.2d 899, 926 P.2d 1085]; see Doers v. Golden Gate Bridge etc. Dist. (1979) 23 Cal.3d 180, 184, fn. 1 [151 Cal.Rptr. 837, 588 P.2d 1261] [same].) Defendant did not object to the People's request for judicial notice in the appellate court, however, and both parties referred to the judicially noticed material at oral argument before this court. Under such circumstances, we conclude the material judicially noticed by the appellate court is properly before us.
[6]  Code of Civil Procedure section 1995 provides in pertinent part: "If the witness be a prisoner, confined in a jail within this state, [the court may make] an order for his examination in the jail upon deposition, or for his temporary removal and production before a court . . . ."
