
19 Cal.3d 646 (1977)
566 P.2d 243
139 Cal. Rptr. 609
In re CHARLES DENTON WATSON on Habeas Corpus.
Docket No. Crim. 19806.
Supreme Court of California.
July 15, 1977.
*647 COUNSEL
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, Edward T. Fogel, Jr., and Nancy A. Saggese, Deputy Attorneys General, for Appellant.
Albert D. Silverman, under appointment by the Supreme Court, for Petitioner.
*648 OPINION
SULLIVAN, J.[*]
D.J. McCarthy, Superintendent of the California Men's Colony at San Luis Obispo appeals from an order granting Charles Denton Watson's petition for a writ of habeas corpus seeking, pursuant to section 2900.5 of the Penal Code,[1] 285 days presentence credit for jail time spent in custody in Texas. (1a) The central question which we face is whether petitioner is entitled to have such time credited upon his sentence where it was spent in jail in a foreign jurisdiction while he was resisting extradition to California for trial upon charges of which he was ultimately convicted. As will appear, we conclude that he is entitled to the credit. We affirm the order.
The facts are not in dispute. On November 30, 1969, petitioner was arrested in McKinney, Texas at the request of the Los Angeles Police Department as a part of its investigation of the Tate-LaBianca murders. The next day the department obtained a warrant for petitioner's arrest for murder (§ 187) and sent officers to Texas to effect his return to this state. Petitioner refused to return.
On December 8, 1969, he was charged by indictment in California with seven counts of murder and one count of conspiracy to commit murder and a bench warrant was issued for his arrest. After formal demand by this state, the Governor of Texas granted extradition but petitioner resisted it, pursuing various proceedings in an effort to invalidate the Texas extradition order. All of these failed and he was returned to California on September 11, 1970.
After trial by jury, petitioner was found guilty of seven counts of murder of the first degree and one count of conspiracy to commit murder. He was eventually sentenced to life imprisonment on merged counts, counts two through eight having been consolidated into one count. While serving this sentence at California Men's Colony, San Luis Obispo, California, petitioner applied for presentence jail time credit pursuant to the newly enacted section 2900.5 as interpreted by this court in In re Kapperman (1974) 11 Cal.3d 542 [114 Cal. Rptr. 97, 522 P.2d 657]. This request was denied by the prison authorities. On October 29, 1974, petitioner filed the instant petition for a writ of habeas corpus in the Superior Court of San Luis Obispo County seeking credit against his *649 prison sentence for the 285 days of presentence jail time spent in custody in the Texas jail from his initial arrest on November 30, 1969, to his return to California on September 11, 1970. The petition was granted. This appeal followed.
Section 2900.5, as it read at the applicable time,[2] provided that any defendant convicted of a felony who "has been in custody in any city, county, or city and county jail" shall receive "credit upon his sentence" for "all days of custody of the defendant from the date of arrest to the date on which the serving of the sentence imposed commences," if "the custody to be credited is attributable to charges arising from the same criminal act or acts for which the defendant has been convicted." Since petitioner had been incarcerated in a Texas county jail upon his arrest for the murder charges of which he was ultimately convicted, it would appear that under a literal application of the statute he was entitled to credit for "all days of custody ... from date of arrest to the date on which the serving of the sentence imposed commences," namely, the 285 days spent in custody in Texas.
Appellant concedes that a literal reading of the statute would grant petitioner the credit sought, but urges that the section should not be read literally since to do so would benefit fugitives from justice  a result *650 contrary to the public policy of this state. Such policy, according to appellant, has been established by section 3064 which provides: "From and after the suspension or revocation of the parole of any prisoner and until his return to custody he shall be deemed an escapee and fugitive from justice and no part of the time during which he is an escapee and fugitive from justice shall be part of his term." Therefore, argues appellant, the Legislature has demonstrated that fugitives should not benefit from their flight and must have intended to extend its section 3064 treatment of fugitives to section 2900.5. Appellant offers no support for such an assertion of legislative intention other than the suggestion that it is necessary to consider the holding of In re Pearce (1974) 40 Cal. App.3d 399 [115 Cal. Rptr. 222] in respect to the allegedly analogous section 3064.
In Pearce, the defendant's parole was suspended in California and he was thereafter apprehended and placed in jail in Alabama solely because of his suspended parole. He successfully resisted extradition to California in Alabama's courts for 15 months after which he was returned to state prison in California. Pearce then sought credit against his term of imprisonment for the time spent in jail in Alabama while resisting extradition to this state. The court held that he was not entitled to the credit because "`return to custody' [in § 3064] beyond any doubt means return to the custody of California's prison authorities" (id., at p. 401), that he was not in the control or custody of the California prison authorities while resisting extradition in Alabama, and that he therefore remained a fugitive from justice until he returned to California.
In the case at bench, appellant argues that since petitioner was a fugitive from justice during the time he spent in jail in Texas while resisting extradition to California, then similarly and consistently with the public policy set forth in section 3064 he is entitled to no credit for such time.
While petitioner having been charged with the commission of a crime within California and thereafter having been found in Texas was a fugitive from justice for purposes of extradition (Appleyard v. Massachusetts (1906) 203 U.S. 222, 227-228 [51 L.Ed. 161, 163-164, 27 S.Ct. 122]; Roberts v. Reilly (1885) 116 U.S. 80, 97 [29 L.Ed. 544, 549, 6 S.Ct. 291]; see In re Murdock (1936) 5 Cal.2d 644, 648 [55 P.2d 843]) and remained such even though in custody in Texas, this circumstance does not equate petitioner, charged with a crime but not yet tried or convicted, with a California prisoner, convicted and paroled, whose parole has been *651 suspended or revoked. Nor does such circumstance establish that the Legislature intended to apply its policy with respect to the latter, to persons like petitioner who were not paroled prisoners. Indeed the Pearce court emphasized the absence of any relationship between section 3064 and section 2900.5 in stating: "The recent cases of In re Kapperman, 11 Cal.3d 542 [114 Cal. Rptr. 97, 522 P.2d 657], and In re Grey, 11 Cal.3d 554 [114 Cal. Rptr. 104, 522 P.2d 664], are found to be inapposite on this appeal. They concern Penal Code section 2900.5 providing generally for credit on a felony conviction for all county jail time served prior to sentence as a result of the charge leading to the conviction." (40 Cal. App.3d at p. 402.)
We think it clear that section 2900.5 deals with a different type of custody than does section 3064. The latter section obviously pertains to a convicted and paroled prisoner who, after the suspension or revocation of his parole, is entitled to no credit for any of his escape time against the term of his sentence until he has returned to the custody of the California prison authorities. The former section on the contrary pertains to the pretrial incarceration of a person charged with crime but not yet tried much less convicted, and therefore clothed with the presumption of innocence. To implement the underlying philosophy of section 2900.5, the courts have therefore given the term "custody" as used in that section a liberal interpretation. (In re Jordan (1975) 50 Cal. App.3d 155, 157-158 [123 Cal. Rptr. 268], presentence time credit for time spent in federal medical center; People v. Meals (1975) 48 Cal. App.3d 215, 226 [121 Cal. Rptr. 742], presentence time credit although defendant also on parole hold prior to sentencing.) As the court stated in People v. Williams (1975) 53 Cal. App.3d 720, 723 [125 Cal. Rptr. 901]), "Both sections 2900.5 and 2900.6 reflect the basic philosophy that when a person is incarcerated he is being punished by the reality of incarceration. Thus, in both sections any presentence time is credited toward his ultimate sentence. Section 2900 reflects the older philosophy that a person was sent to a prison to be punished as opposed to the philosophy expressed in [2900.5] that the fact of incarceration is punishment." (Italics in original.)
(2) The crucial element of the statute is not where or under what conditions the defendant has been deprived of his liberty but rather whether the custody to which he has been subjected "is attributable to charges arising from the same criminal act or acts for which the defendant has been convicted." (§ 2900.5, subd. (b).) In recognition of this element the courts have placed the emphasis on the fact of the defendant's custody prior to the commencement of his sentence regardless *652 of the particular locale, institution, facility or environment of his incarceration. Thus in In re Jordan, supra, 50 Cal. App.3d 155, the court held that custody in a "city and county jail" must be read to include custody in a federal mental hospital. The defendant was arrested in California for stealing explosives, both a federal and a state crime. Having been first charged with the federal offense, upon his own motion he was committed to a mental hospital for federal prisoners in Missouri for a medical examination to determine whether he was competent to stand trial. He remained in federal custody until the charges against him were dismissed, at which time he was taken into custody by California authorities. He pleaded guilty to the state charges and was sentenced to prison. Upon denial of his request for presentence time credit for the two years spent in federal custody, he sought relief by habeas corpus. The Court of Appeal granted the writ and held him entitled to the credit, reasoning that although section 2900.5 did not on its face require the credit, nevertheless under its holding in In re Young (1973) 32 Cal. App.3d 68, 75 [107 Cal. Rptr. 915],[3] the presentence jail time amounted to a "`deprivation of liberty'" which "`suffered only by the indigent does not meet federal standards of equal protection....'" (50 Cal. App.3d at pp. 157-158.) Concluded the Jordan court: "Though we do not have here an unconstitutional discrimination based on indigency, we do have a defendant who was deprived of his liberty for a period of two years because of a circumstance (incompetency) beyond his control. This can operate to create an unconstitutional discrimination fully as serious to the alleged incompetent as exists in Young with reference to an indigent. In the light of Young we find no reason why the equal protection clause should not apply to the petitioner so that he will receive credit for the time spent in federal custody." (50 Cal. App.3d at p. 158.)
It is noteworthy that in 1976 the Legislature, in apparent acceptance of the liberal rationale of the above decisions, amended section 2900.5, to broaden the term "custody" without limitation as to place of presentence custody.[4] It is also noteworthy that the Courts of Appeal have at least *653 impliedly recognized that presentence custody in another jurisdiction qualifies for credit. In Jordan, as we have seen, the court granted credit for custody in a mental hospital in Missouri; in In re Miller (1974) 41 Cal. App.3d 1046 [116 Cal. Rptr. 624], the court suggested that custody in a Texas jail qualified provided it was attributable to charges arising from the same criminal act. The only distinction between the case at bench on the one hand and Miller and Jordan on the other, is that the defendants in the latter two cases were not resisting extradition while in custody in the foreign jurisdiction.
Additionally we observe that both New York and Michigan have interpreted their comparable statutes as allowing presentence jail time credit to defendants incarcerated in foreign jurisdictions while resisting extradition. In People v. Havey (1968) 11 Mich. App. 69 [160 N.W.2d 629, 636], the Michigan Court of Appeals, quoting 24B Corpus Juris Secundum, Criminal Law, section 1995(5), page 645, held that under a comparable statute the defendant was entitled to credit against his sentence for time spent in jail in Oregon awaiting extradition to Michigan. In People v. Nagler (1964) 21 App.Div.2d 490 [251 N.Y.S.2d 107], it was held that the broad scope of the New York statute permitted the granting of credit for detention in France pending extradition to New York.
*654 Finally, we apprehend no public policy in this state against those defendants charged with crime who have resisted California's demand for their extradition. Any person arrested and held for extradition or ordered to be extradited has both a federal and state right to test the validity of the arrest and extradition. (See Indigents' Right to Appointed Counsel in Interstate Extradition Proceedings (1975) 28 Stan.L.Rev. 1039.) "Whenever the executive of the State, upon whom such demand has been made, by virtue of his warrant, causes the arrest for delivery of a person charged as a fugitive from the justice of another State, the prisoner is held in custody only under color of authority derived from the Constitution and laws of the United States and is entitled to invoke the judgment of the judicial tribunals whether of the State or the United States, by the writ of habeas corpus, upon the lawfulness of his arrest and imprisonment." (Roberts v. Reilly, supra, 116 U.S. 80, 94 [29 L.Ed. 544, 548].) California in 1937 adopted the Uniform Criminal Extradition Act (§ 1547 et seq.) which extends many rights to fugitives from justice faced with extradition and which specifically authorizes procedures to resist extradition by resort to the courts. Texas adopted the same act in 1951 and accorded the same rights. If a defendant were denied credit for time spent in jail solely because he was resisting extradition it would seriously penalize a person for exercising his right to resist extradition. Defendants under section 2900.5 are not deprived of presentence credit for jail time in California because they exercise their rights to make motions pursuant to sections 995 or 1538.5. No good reason has been advanced to suggest that the statutory right to challenge extradition should be treated any differently. In both situations, the defendants are in jail to face criminal charges, they are presumed innocent and are exercising their statutory rights to challenge the validity of those charges and of their custody.
(1b) In sum, we hold that a defendant convicted of a felony is entitled to credit pursuant to section 2900.5 against his sentence for the presentence time spent in jail in a foreign jurisdiction resisting extradition to this state on charges of which he has been ultimately convicted.
The order is affirmed.
Bird, C.J., Tobriner, J., Mosk, J., Clark, J., Richardson, J., and Manuel, J., concurred.
NOTES
[*]   Retired Associate Justice of the Supreme Court sitting under assignment by the Chairman of the Judicial Council.
[1]  Hereafter, unless otherwise indicated, all section references are to the Penal Code.
[2]  Section 2900.5 as added to the Penal Code in 1971 (Stats. 1971, ch. 1732, § 2, p. 3686) provided:

"(a) In all felony convictions, either by plea or by verdict, when the defendant has been in custody in any city, county, or city and county jail, all days of custody of the defendant from the date of arrest to the date on which the serving of the sentence imposed commences, including days served as a condition of probation in compliance with a court order, shall be credited upon his sentence, or credited to any fine which may be imposed, at the rate of not less than twenty dollars ($20) per day, or more, in the discretion of the court imposing the sentence. If the total number of days in custody exceeds the number of days of the sentence to be imposed, the entire sentence shall be deemed to have been served. In any case where the court has imposed both a prison sentence and a fine, any days to be credited to the defendant shall first be applied to the sentence imposed, and thereafter such remaining days, if any, shall be applied to the fine.
"(b) For the purposes of this section, credit shall be given only where the custody to be credited is attributable to charges arising from the same criminal act or acts for which the defendant has been convicted.
"(c) This section shall be applicable only to those persons who are delivered into the custody of the Director of Corrections on or after the effective date of this section."
As originally enacted the section was applicable only to those persons delivered into the custody of the Director of Corrections on or after March 4, 1972, and would not have provided for presentence jail time credit for petitioner. However, this court in In re Kapperman, supra, 11 Cal.3d 542, 550 held that the section should be given full retroactive effect, concluding "that the credit under section 2900.5 should be extended to those incarcerated or on parole for felony offenses regardless of the date of their commitment to state prison." The section was amended in 1976 so as to broaden the definition of custody.
[3]  In Young the court granted presentence jail time credit on the petitioner's prison term, holding that since he could not afford bail due to his indigency, any denial of such credit would constitute a denial of equal protection of the laws, petitioner's jail time amounting to an additional deprivation of liberty not imposed upon other defendants having the means to post bail and secure their liberty pending trial.
[4]  Section 2900.5 as amended in 1976 provides:

"(a) In all felony and misdemeanor convictions, either by plea or by verdict, when the defendant has been in custody, including but not limited to any time spent in a jail, camp, work furlough facility, halfway house, rehabilitation facility, hospital prison, or similar institution, all days of custody of the defendant, including days served as a condition of probation in compliance with a court order, shall be credited upon his sentence, or credited to any fine which may be imposed, at the rate of not less than thirty dollars ($30) per day, or more, in the discretion of the court imposing the sentence. If the total number of days in custody exceeds the number of days of the sentence to be imposed, the entire sentence shall be deemed to have been served. In any case where the court has imposed both a prison or jail sentence and a fine, any days to be credited to the defendant shall first be applied to the sentence imposed, and thereafter such remaining days, if any, shall be applied to the fine.
"(b) For the purposes of this section, credit shall be given only where the custody to be credited is attributable to proceedings related to the same conduct for which the defendant has been convicted.
"(c) For the purposes of this section, `sentence' includes any fine or period of imprisonment imposed as a condition of probation or otherwise ordered by a court in imposing or suspending the imposition of any sentence, and also includes any term of imprisonment, including any period of imprisonment prior to release on parole and any period of imprisonment and parole, prior to discharge, whether established or fixed by statute, by any court, or by any duly authorized administrative agency. The credits provided by this section shall not be considered in establishing or fixing any condition of probation, parole date, or term of imprisonment; but such credits shall be applied to any such condition of probation, parole date, or term of imprisonment no later than one week after it has been established or fixed.
"(d) It shall be the duty of the court imposing the sentence to determine the total number of days to be credited pursuant to the provisions of this section. The total number of days to be credited shall be contained in the abstract of judgment provided for in Section 1213."
