
    Robert Orin SHAW a/k/a David Carr, Petitioner-Appellant, v. William French SMITH, Attorney General, et al., Respondents-Appellees.
    No. 81-1494
    Summary Calendar.
    United States Court of Appeals, Fifth Circuit.
    July 23, 1982.
    
      Robert Orin Shaw a/k/a David Carr, pro se.
    Rebecca D. Westfall, Asst. U. S. Atty., El Paso, Tex., for respondents-appellees.
    Before RUBIN, SAM D. JOHNSON and GARWOOD, Circuit Judges.
   ALVIN B. RUBIN, Circuit Judge:

Robert Shaw, who is serving a federal sentence for interstate transportation of a stolen motor vehicle, filed a petition for a writ of habeas corpus under 28 U.S.C. § 2241 et seq., contending that he has not been properly credited with time he earlier served in state custody. The district court, without holding an evidentiary hearing, determined that no genuine issue of material fact existed, and rendered summary judgment in favor of the federal defendants. Finding an insufficient basis in the record from which to draw conclusions regarding a portion of the time claimed by Shaw, we vacate so much of the judgment below as relates to that period and remand for further findings, and an evidentiary hearing, if necessary. We otherwise affirm the judgment denying Shaw relief.

I.

In 1976, Shaw was charged by Texas authorities with forgery. At approximately the same time, he was also charged by federal authorities with interstate transportation of a stolen motor vehicle in violation of 18 U.S.C. § 2312. Shaw was tried first on the state charges, convicted, and, on January 5, 1977, sentenced to twenty-one years in state prison. Thereafter, federal authorities, having lodged a detainer against Shaw on August 25, 1976, took custody of him to prosecute him on the federal charge. After he was also convicted on that charge, Shaw was sentenced, on March 31, 1977, to five years in federal prison to run consecutively to his state sentence. He was then returned to Texas custody to resume serving his state sentence.

On January 9, 1980, the Texas Court of Criminal Appeals vacated Shaw’s state forgery conviction and ordered his release from state custody. Ex parte Shaw, 592 S.W.2d 633 (Tex.Cr.App.1980). He was not, however, transferred to- United States custody until August 14, 1980, when he was deemed to have begun serving his federal sentence.

II.

The computation of federal sentences is governed by 18 U.S.C. § 3568 (1976 ed.), which provides, in relevant part:

The sentence of imprisonment of any person convicted of an offense shall commence to run from the date on which such person is received at the penitentiary, reformatory, or jail for service of such sentence. The Attorney General shall give any such person credit toward service of his sentence for any days spent in custody in connection with the offense or acts for which sentence was imposed. As used in this section, the term “offense” means any criminal offense . .. which is in violation of an Act of Congress and is triable in any court established by Act of Congress.

Id. (emphasis added). Looking first to the literal terms of the statute, it is beyond peradventure that the time spent by Shaw in Texas custody on his state forgery conviction was not “in connection with the offense [interstate transportation of a stolen motor vehicle] . . . for which [his federal] sentence was imposed,” despite the fact that both convictions apparently resulted from a single “crime spree.” In United States v. Shillingford, 586 F.2d 372 (5th Cir. 1978), for example, the prisoner argued that, because the acts of assault that resulted in both his state and federal convictions were the same, section 3568 required deduction from his federal sentence of the time spent in state custody on the state charges. We simply held the contention to be “without merit.” 586 F.2d at 374. In sum, the Attorney General is ordinarily not required to give credit toward a federal sentence for time spent by a prisoner serving a sentence imposed by another jurisdiction for an unrelated offense. Willis v. United States, 438 F.2d 923, 925 (5th Cir. 1971); Sanders v. McGuire, 405 F.2d 881 (5th Cir. 1968).

Case law has, however, established one general exception to this basic rule. Time spent in state custody, even if for an unrelated offense, must be credited toward time served on a federal sentence “if the continued state confinement was exclusively the product of such action by federal law-enforcement officials as to justify treating the state jail as the practical equivalent of a federal one.” Ballard v. Blackwell, 449 F.2d 868, 869 (5th Cir. 1971). “If, for example, a state defendant is denied bail solely because of a federal detainer issued against him, the time spent in state custody awaiting trial must be credited to his federal sentence.” Shillingford, supra, 586 F.2d at 375 n.6. See also Spence v. United States, 452 F.2d 1198, 1199 (5th Cir. 1971); Ballard, supra, 449 F.2d at 869; Davis v. Attorney General, 425 F.2d 238, 240 (5th Cir. 1970). Moreover, the burden is upon the petitioner to show that this is the ease. Cf. O’Connor v. Attorney General, 470 F.2d 732, 734 (5th Cir. 1972) (“[T]he burden of [petitioner] ... will be ... to show that the federal detainer alone caused his continued state confinement.”).

Shaw here contends that he is entitled to credit against his federal sentence for the time he spent in Texas prisons for what was ultimately determined by Texas courts to be an invalid state conviction. The federal defendants moved below for summary judgment. The district court held that Shaw was not entitled to credit on his federal sentence for the time he spent in Texas custody “between January 5, 1977, and August 14, 1980, when .. . federal authorities assumed custody,” and granted the defendants’ motion.

Summary judgment is appropriate when, viewed in the light most favorable to the opposing party, no genuine issue of material fact exists and the moving party is entitled to judgment as a matter of law. United States v. R & D One Stop Records, Inc., 661 F.2d 433, 435-36 (5th Cir. 1981). As to the period between January 5, 1977, the date of Shaw’s state sentencing, and January 9, 1980, the date Shaw’s state conviction was vacated, we agree with the district court: no genuine issue of material fact existed and the federal defendants were entitled to judgment as a matter of law. Shaw did not and could not show that the action of federal law-enforcement officials, i.e., the lodging of a federal detainer against him, was the sole reason for his continued state confinement. Texas statutorily forbids felons with sentences of fifteen years or longer from being released on bail pending appeal. See Tex.Code Crim. Proe.Ann. art. 44.04(b) (Vernon). Because Shaw’s sentence was for twenty-one years, it is apparent that this Texas statute, not the existence of the federal detainer, accounted for Shaw’s continued confinement during this period.

As to the period between January 9, 1980, when Shaw’s state conviction was vacated, and August 14, 1980, when he was placed in federal custody, however, we can find nothing in the record explaining this more than seven-month delay. On the record as presently constituted, the district court could not have determined that this period of continued state confinement was not solely the result of the existence of the federal detainer.

We therefore remand the case so that the district court may determine, after an evi-dentiary hearing, if necessary, whether the existence of the federal detainer was, in effect, the sole reason for this delay. In connection with those proceedings, the district court should consider anew Shaw’s request for the appointment of counsel.

The judgment is AFFIRMED in part, VACATED in part, and REMANDED for further proceedings not inconsistent with this opinion. 
      
      . Shaw was allowed jail time credit on his federal sentence for the period from August 25, 1976, the date the federal detainer was lodged against him, until January 4, 1977, the day before his state sentencing. This was presumably done on the ground that the sole reason prohibiting Shaw’s release from custody on bail pending his trial on the state charges was the existence of the federal detainer lodged against him. See Part II infra. In any event, the crediting of this time against Shaw’s federal sentence is not in dispute.
     