
81 Cal.App.3d 325 (1978)
146 Cal. Rptr. 304
In re EMMETT E. SMITH on Habeas Corpus.
Docket No. 32392.
Court of Appeals of California, Second District, Division Three.
May 25, 1978.
*326 COUNSEL
Emmett E. Smith, in pro. per., for Petitioner.
Evelle J. Younger, Attorney General, Jack R. Winkler, Chief Assistant Attorney General, S. Clark Moore, Assistant Attorney General, William R. Pounders and Michael Nash, Deputy Attorneys General, for Respondent.
OPINION
COBEY, J.
Our 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.[1] Smith spent approximately this amount of time in the Los Angeles County jail under sentence from the local federal court, but was, as well, awaiting trial on certain state charges during practically all of that period. These charges were unrelated to the conduct upon which his federal conviction was based (2 Crim. 30201).
*327 More 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 pled guilty.
(1) Smith 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).[2]) As another division of this court noted in In re Bentley (1974) 43 Cal. App.3d 988, 992-993 [118 Cal. Rptr. 452], the governing statutory provision (Pen. Code, § 2900.5, subd. (b)) does not state that eligible presentence custody must be attributable exclusively or solely "to proceedings related to the same conduct for which the defendant has been convicted."
The 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.
It 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 *328 act or acts for which the defendant has been convicted.' (§ 2900.5, subd. (b).)" We believe that Smith's custody was in part so attributable.
Accordingly, 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).
Klein, P.J., concurred.
POTTER, J.
I dissent.
Though Penal Code section 2900.5 does not necessarily contemplate that custody be solely or exclusively attributable to proceedings relating to the same conduct for which conviction results, it does not authorize presentence credit where the pending proceedings have no effect whatever upon a defendant's freedom. In view of the fact that petitioner had been sentenced by a federal court, the superior court had no power to release him from custody. The assumption that he would have been denied bail anyway is, therefore, both gratuitous and irrelevant.
The federal custody was, moreover, totally unrelated to the existence of the state charges. In this respect, the case at bench is different from In re Bentley (1974) 43 Cal. App.3d 988, 992 [118 Cal. Rptr. 452], upon which the majority relies. In Bentley, the pending proceedings were the basis of the petitioner being "held in local custody on suspicion of violation of parole" by virtue of the pending charge. The pending charge was, therefore, one of the bases of his custody, whereas in the instant case the state proceedings had no bearing whatever on petitioner's custodial status.
The most that can be said is that the place of petitioner's detention was affected. However, as our Supreme Court has said in In re Watson (1977) 19 Cal.3d 646, 651 [139 Cal. Rptr. 609, 566 P.2d 243], "where or under what conditions the defendant has been deprived of his liberty" is not relevant.
Penal Code section 669 expressly grants the trial court the power in its discretion to impose a subsequent sentence to be served consecutive to a sentence already imposed for another crime. If presentence credit must be given under the circumstances of this case, all such subsequent *329 sentences must be concurrent to the extent of the presentence custody. Nothing in Penal Code section 2900.5 suggests any such limitation on the court's power.
The mandate of Penal Code section 2900.5 is that presentence credit be granted "only where the custody to be credited is attributable to proceedings related to the same conduct for which the defendant has been convicted." (Italics added.) The trial court properly denied such credit.
Respondent's petition for a hearing by the Supreme Court was denied July 20, 1978.
NOTES
[1]  The trial court and this court previously denied Smith this relief.
[2]  In 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.

This 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."
