¶1Opinion
¶2Our Supreme Court directed the Director of Corrections to show cause before us in habeas corpus why Emmett E. Smith should not be granted, pursuant to Penal Code section 2900.5, an eight months, seventeen days presentence custody credit upon his current state prison sentence.
¶3*327More specifically, apparently on February 2, 1976, Smith was placed in the county jail by federal authorities pending his transfer to an appropriate federal prison facility. On February 25, 1976, the state brought its charges against Smith. On November 9, 1976, he was sentenced to prison on two of the state charges to which he had pied guilty.
¶4Smith spent 259 days in the Los Angeles County jail in presentence custody. The fact that he was then apparently doing time on his earlier unrelated federal sentence as well is without legal consequence. (See In re Pollock (1978) 80 Cal.App.3d 779, 783-784 [145 Cal.Rptr. 833] (custody on two state matters).
¶5The Attorney General contends that Smith’s confinement in the Los Angeles County jail was solely as a federal prisoner ineligible for bail. The trial court so reported. This is an unrealistic view. The record shows that Smith had then pending against him 28 separate state charges (2 Crim. 30201). He probably would not have been released on bail regardless of his detention under the federal sentence, and he certainly would not have been kept in local nonfederal custody until his trial and conviction on state charges in the absence of those charges.
¶6It seems obvious to us that in this case Smith’s custody in the Los Angeles County jail was on a dual basis and that one of the two bases qualified under the aforementioned Penal Code section 2900.5, subdivision (b). As our Supreme Court stated in In re Watson (1977) 19 Cal.3d 646, 651 [139 Cal.Rptr. 609, 566 P.2d 243], “[t]he 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 *328act or acts for which the defendant has been convicted.’ (§ 2900.5, subd. (b).)” We believe that Smith’s custody was in part so attributable.
¶7Accordingly, Smith’s petition for a writ of habeas corpus is granted. Emmett E. Smith shall receive credit for 259 days presentence custody upon his current state prison sentence (Los Angeles County Superior Court case No. A324435).
¶8Klein, P. J., concurred.
¶9-The trial court and this court previously denied Smith this relief.
¶10In Pollock, the court interpreted Penal Code section 2900.5 to provide that a defendant is entitled to receive credit upon a prison sentence for time spent in jail awaiting disposition of the criminal proceedings resulting in that sentence even though during that same period of jail time the defendant is serving a prison sentence on another conviction.
¶11This interpretation accords with the statement in In re Ewing (1978) 78 Cal.App.3d 455, 460 [144 Cal.Rptr. 229], that “[i]t is appropriate to apply the Penal Code section 2900.5 credit, if otherwise proper, even to a period of custodial time in which a defendant is serving a sentence on another conviction.”