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.
*1106
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,
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,
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,
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 Au *1107 gust 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.,
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.
Notes
. 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.
