
    Aubry Rea JOHNSON, Petitioner-Appellant, v. A. GILL, Warden, Respondent-Appellee.
    No. 15-16400
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted May 18, 2017, San Francisco, California Filed February 20, 2018
    Lisa Sciandra (argued), San Leandro, California, for Petitioner-Appellant.
    Michael G. Tierney (argued), Assistant United States Attorney; Camil A. Skipper, Appellate Chief; Phillip A. Talbert, United States Attorney; United States Attorney's Office, Fresno, California; for Respondent-Appellee.
    Before: Richard C. Tallman and Sandra S. Ikuta, Circuit Judges, and Solomon Oliver, Jr., Chief District Judge.
    
      
      The Honorable Solomon Oliver, Jr., Chief United States District Judge for the Northern District of Ohio, sitting by designation.
    
   Dissent by Chief District Judge Oliver

Aubry Johnson was criminally convicted in both state and federal court. Both courts sentenced him to serve periods of incarceration, with the federal sentence to run consecutively to the state sentence. While serving his state sentence, he was twice erroneously turned over to federal authorities, first from August through November of 2009 and then again from December 2009 through February 2010. Once his state sentence was complete and the Marshals Service took him into federal custody, the Bureau of Prisons (BOP) concluded that Johnson's federal sentence commenced in June 2011, when the federal government for the first time gained primary jurisdiction over him.

Johnson filed a petition for a writ of habeas corpus challenging that determination. He argues that his federal sentence actually commenced on one of the instances when the state prematurely transferred him to the federal authorities. As a result, Johnson contends that he should receive credit against his federal sentence for the period starting on the date he was erroneously turned over to federal authorities and including all his time in state prison after he was returned to state custody. Because the state credited the time the federal authorities erroneously held Johnson against his state sentence, Johnson effectively seeks double-credit against both his state and federal sentences for the period between August 2009 and June 2011. We disagree and hold that because these erroneous transfers did not manifest the state's consent to terminate its primary jurisdiction over Johnson, he was not in federal custody for purposes of 18 U.S.C. § 3585(a), and therefore the federal sentence did not commence.

I

The Sheriff's Department in Harris County, Texas, arrested Aubry Johnson in February 2007 for fraudulently using identifying information and for violating his probation for a prior robbery conviction. In June 2007, a state court sentenced Johnson to a six-year term of imprisonment for aggravated robbery as a result of the probation violation. After sentencing, the court committed Johnson to the custody of the Texas Department of Criminal Justice (TDCJ) to serve his sentence. In August 2007, the TDCJ transferred Johnson to Fort Bend County, where a state court sentenced Johnson to a twelve-month concurrent sentence of imprisonment for fraudulent use of identifying information.

While Johnson was in state custody, the United States indicted him on federal charges for aiding and abetting device fraud and identity theft. The federal court issued writs of habeas corpus ad prosequendum for Johnson on May 10, 2007, June 29, 2007, and August 29, 2007, so that he could attend federal court proceedings. Upon conviction for the federal charges, the district court sentenced Johnson to an 88-month term of imprisonment, to run consecutively to his state sentence for aggravated robbery. The Marshals Service filed a federal detainer with the state authorities, requesting that the state hold Johnson so that federal authorities could assume custody of him when he satisfied his state sentence.

The two errors central to this appeal occurred in late 2009. While Johnson was still serving his state sentence in the Texas prison system, the TDCJ transferred Johnson to the custody of the Dallas County Sheriff's Department to answer for additional state charges that were ultimately dismissed. Rather than return Johnson to the TDCJ, however, the Dallas County Sheriff's Department mistakenly transferred Johnson to the Marshals Service on August 7, 2009, pursuant to the federal detainer. When the error was discovered, the Marshals Service returned Johnson to the Dallas County Sheriff's Department on November 3. A short while later, on December 9, 2009, the Dallas County Sheriff's Department informed the Marshals Service that Johnson had completed his state sentence and that the department intended to release Johnson unless the Marshals Service took custody of him. On December 14, the Dallas County Sheriff's Department transferred Johnson to the Marshals Service. This was also a mistake. Johnson remained with the federal authorities until February 12, 2010, when the Marshals Service returned him to the TDCJ. Johnson received credit toward his state sentence for the periods during which the Marshals Service erroneously had physical custody of him.

Texas paroled Johnson on February 23, 2011. Because the Marshals Service had filed a federal detainer with the state, the state authorities held Johnson for federal pick-up, but due to an oversight the Marshals Service failed to retrieve him, and so Johnson was released the same day. Several months later, on June 6, 2011, Johnson visited his parole officer, at which time the Marshals Service apprehended him and turned him over to the BOP to serve his federal sentence.

The BOP determined that Johnson's federal sentence commenced on June 6, 2011, when the Marshals Service took Johnson into federal custody. Nevertheless, Johnson received credit against his federal sentence for the period during which he was released from all custody, between February 23, 2011 (when he was paroled from state custody) through June 5, 2011, when the Marshals Service apprehended him. Johnson objected to this calculation; he argued that his federal sentence commenced on one of the occasions when the state erroneously transferred him to the Marshals Service, either on August 7, 2009, or December 14, 2009. Therefore, Johnson contends, he is entitled to credit against his federal sentence for the time period between August 2009 and June 2011, even though the state already gave him credit for this same time period. After unsuccessfully pursuing administrative remedies, Johnson filed a petition for a writ of habeas corpus pursuant to 28 U.S.C. § 2241, which the district court denied. He timely appealed.

We have jurisdiction under 28 U.S.C. § 1291 and review the district court's ruling de novo. Tablada v. Thomas , 533 F.3d 800, 805 (9th Cir. 2008). Although Johnson is currently incarcerated at the Federal Correctional Institution in Oakdale, Louisiana, habeas jurisdiction was proper in the district court because Johnson filed his petition while incarcerated at the Federal Correctional Institution in Mendota, California. Brown v. United States , 610 F.2d 672, 677 (9th Cir. 1980). His subsequent transfer does not destroy the jurisdiction established at the time of filing. Francis v. Rison , 894 F.2d 353, 354 (9th Cir. 1990).

II

The federal statute governing when a term of imprisonment commences, 18 U.S.C. § 3585, provides that "[a] sentence to a term of imprisonment commences on the date the defendant is received in custody awaiting transportation to, or arrives voluntarily to commence service of sentence at, the official detention facility at which the sentence is to be served." 18 U.S.C. § 3585(a). In order to determine whether Johnson's federal sentence commenced when the state mistakenly transferred him to the federal government, we begin by interpreting § 3585(a) in its historical context.

A

Although "custody" can mean mere physical possession or control of a person, it may also refer to lawful authority over a person. See Black's Law Dictionary 441 (9th ed. 2009) (defining "constructive custody" as "[c]ustody of a person (such as a parolee or probationer) whose freedom is controlled by legal authority but who is not under direct physical control"); Webster's Third New International Dictionary 559 (2002) ("[C]ontrol of a thing or person with such actual or constructive possession as fulfills the purpose of the law or duty requiring it."). Courts have long interpreted "custody" in the context of § 3585 and its predecessors as referring to the federal government's control over a prisoner when it has both physical custody and primary jurisdiction.

The concept of primary jurisdiction was established by the Supreme Court nearly a century ago, when it acknowledged the need for comity between state and federal authorities with respect to managing defendants who are subject to both state and federal criminal prosecutions and sentences. See Ponzi v. Fessenden , 258 U.S. 254, 259, 42 S.Ct. 309, 66 L.Ed. 607 (1922). In Ponzi , the Supreme Court stated the general rule that the first sovereign to arrest a defendant obtains primary jurisdiction over him as against other sovereigns.

Id . at 260, 42 S.Ct. 309 ("The chief rule which preserves our two systems of courts from actual conflict of jurisdiction is that the court which first takes the subject-matter of the litigation into its control, whether this be person or property, must be permitted to exhaust its remedy, to attain which it assumed control, before the other court shall attempt to take it for its purpose."). Nevertheless, the sovereign with primary jurisdiction could consent to the defendant's transfer to another sovereign for trial or other proceedings. Id . at 261, 42 S.Ct. 309. Such a decision is vested "solely to the discretion of the sovereignty making it," acting through "its representatives with power to grant it." Id. at 260, 42 S.Ct. 309. In the federal system, for example, a "transfer of a federal prisoner to a state court for such purposes" may be "exercised with the consent of the Attorney General." Id. at 261-62, 42 S.Ct. 309.

Congress enacted the earliest predecessor of § 3585, 18 U.S.C. § 709a, in 1932. See Jonah R. v. Carmona , 446 F.3d 1000, 1003 (9th Cir. 2006) (discussing the history of § 3585 ). Courts interpreted § 709a in light of Ponzi and the concept of primary jurisdiction, concluding that a state's transfer of a defendant to the federal government does not trigger the commencement of the federal sentence unless the federal government obtains primary jurisdiction over the defendant. In Zerbst v. McPike , for instance, Louisiana state authorities had primary jurisdiction over a defendant, but transferred him to the federal government for the duration of a federal prosecution. 97 F.2d 253, 254 (5th Cir. 1938). When the federal sentencing was complete, the prisoner was returned to the state, which took him back to state jail and tried and sentenced him for a state crime. Id . After the defendant served his state sentence, he argued that his federal sentence began running when he was taken to the state jail following his federal sentencing. Id. The Fifth Circuit rejected this argument. It explained that the state had primary jurisdiction over the defendant and merely lent the prisoner to the federal government "without a complete surrender of the prior jurisdiction over him which the State had acquired." Id . Therefore, the federal sentence did not "commence" until the defendant was received at the federal penitentiary after the state sentence was complete. Id.

Courts interpreted 18 U.S.C. § 3568, the successor statute to § 709a, in light of this doctrine of primary jurisdiction. See, e.g. , Hayward v. Looney , 246 F.2d 56, 58 (10th Cir. 1957) (interpreting 18 U.S.C. § 3568, a recodification of 709a); United States ex rel. Moses v. Kipp , 232 F.2d 147, 150 (7th Cir. 1956) (same). In doing so, courts consistently concluded that a federal sentence did not commence until the federal government had "legal custody" of a defendant, meaning the primary jurisdiction necessary to enforce the federal sentence. Burge v. United States , 332 F.2d 171, 175 (8th Cir. 1964) ; see also Crawford v. Jackson , 589 F.2d 693, 695 (D.C. Cir. 1978). When § 3568 was recodified as § 3585, our current statute, in 1984, courts retained the same interpretation. See, e.g. , Elwell v. Fisher , 716 F.3d 477, 481 (8th Cir. 2013) ("Pursuant to the doctrine of primary jurisdiction, service of a federal sentence generally commences when the United States takes primary jurisdiction and a prisoner is presented to serve his federal sentence, not when the United States merely takes physical custody of a prisoner who is subject to another sovereign's primary jurisdiction."); United States v. Evans , 159 F.3d 908, 911-12 (4th Cir. 1998) (same). We have implicitly reached the same conclusion. See Taylor v. Reno , 164 F.3d 440 (9th Cir. 1998). In Taylor , the federal government surrendered its primary jurisdiction over a federal defendant by releasing him on his own recognizance pending sentencing. Id. at 443. While at large, he was arrested by the state and jailed on a murder charge. Id. State officials later produced the defendant for federal sentencing pursuant to a writ of habeas corpus ad prosequendum. Id. At his federal sentencing, the district court stated that the defendant was "now in federal custody," id ., but federal officials returned him to state custody to serve his sentence. Id . at 444. We rejected the defendant's argument that his federal sentence commenced on the date of his federal sentencing. See id . Because the defendant was in federal custody only by the state's agreement, the state maintained its priority, and "the district court did not have authority to order [the defendant] into federal custody to commence his federal sentence." Id .

Absent a clear indication to the contrary, we assume that Congress was aware that courts interpreted the predecessors to § 3585 in light of the primary jurisdiction doctrine and intended to carry that doctrine forward in enacting the materially similar § 3585. Cf., e.g. , Tex. Dep't of Hous. & Cmty. Affairs v. Inclusive Cmtys. Project, Inc. , --- U.S. ----, 135 S.Ct. 2507, 2519-20, 192 L.Ed.2d 514 (2015) (reasoning that Congress can be understood to acquiesce to widespread views in the courts of appeal); United States v. Wilson , 503 U.S. 329, 336, 112 S.Ct. 1351, 117 L.Ed.2d 593 (1992) (interpreting § 3585(b) and reasoning that courts should not lightly assume "that Congress intended to depart from a long established policy" (internal quotation marks omitted) (quoting Robertson v. R.R. Labor Bd. , 268 U.S. 619, 627, 45 S.Ct. 621, 69 L.Ed. 1119 (1925) ) ). Consistent with our implicit conclusion in Taylor , and with the many decades of judicial interpretation of § 3585 and its predecessors, we therefore interpret "custody" in § 3585(a) as "legal custody," meaning that the federal government has both physical custody of the defendant and the primary jurisdiction necessary to enforce the federal sentence. Accordingly, under § 3585(a), "[a] sentence to a term of imprisonment commences on the date" that the federal government has primary jurisdiction over a defendant who is "received in custody awaiting transportation to" the official detention facility.

Our interpretation is also consistent with the BOP's understanding of the statutory scheme, to which we ordinarily afford "substantial deference." Jonah R. , 446 F.3d at 1006 ; see also Reno v. Koray , 515 U.S. 50, 61, 115 S.Ct. 2021, 132 L.Ed.2d 46 (1995) (holding that courts may defer to BOP program statements). Pursuant to a BOP Program Statement, "[w]hen it has been determined [that] an inmate was committed improperly to federal custody and primary jurisdiction resides with a state sovereign (i.e., the inmate was under jurisdiction of the federal sentencing court on the basis of a writ of habeas corpus ad prosequendum), [the BOP] will make every effort to return the inmate to state custody." U.S. Dep't of Justice, Fed. Bureau of Prisons, Program Statement No. 5160.05: Designation of State Institution for Service of Federal Sentence 11 (2003) ("Program Statement"). In such situations, the BOP's Program Statement provides that "[a] return to the state means that the federal sentence should be considered as not having commenced since transfer to the Bureau was in error and the prisoner should have been returned to the state." Id. at 12. Although the Program Statement refers to the situation in which a prisoner's erroneous federal custody is pursuant to a writ of habeas corpus ad prosequendum, see id . 11-12, the BOP's policy with regard to such writs recognizes that a federal sentence does not commence merely because a prisoner is in the federal government's physical custody. Because the BOP's interpretation is a permissible construction of the statute, we defer to it. See Reno , 515 U.S. at 61, 115 S.Ct. 2021.

B

Having determined that a federal sentence commences only when the federal government has physical possession of and primary jurisdiction over the defendant, we must next determine when the federal government obtains such primary jurisdiction. It is well established that if a sovereign takes a defendant into its custody before another sovereign has done so, then the arresting sovereign establishes its primary jurisdiction and may give effect to its sentence before other sovereigns may do so. Thomas v. Brewer , 923 F.2d 1361, 1365 (9th Cir. 1991). A sovereign's priority terminates when the sentence expires, charges are dismissed, or the prisoner is allowed to go free. See Elwell , 716 F.3d at 481 ; Taylor , 164 F.3d at 445 ; cf. Strand v. Schmittroth , 251 F.2d 590, 599 (9th Cir. 1957) (en banc) ("When a defendant or a parolee or a probationer is released from actual physical custody, even for temporary purposes, he may be arrested, tried and convicted by any other such sovereign in the territory in which he may be without the consent of the first sovereign, which may have a judgment against him as yet unsatisfied or which may be seeking to try him.").

The more difficult situation arises when one sovereign transfers a defendant to another sovereign. Such a case requires an exercise of comity between the sovereigns, and turns on whether the state with primary jurisdiction intended to surrender its priority upon transfer or merely transferred temporary control of the defendant to the federal government. See United States v. Warren , 610 F.2d 680, 685 (9th Cir. 1980) (a sovereign with priority "may elect under the doctrine of comity to relinquish" control of a defendant); see also Ponzi , 258 U.S. at 266, 42 S.Ct. 309 (stating that the Attorney General may give "the consent of the United States" to permit a federal prisoner to be tried in a state's courts, but this consent does not relinquish priority). Because a state's transfer of temporary control of the defendant "extends no further than it is intended to extend," Zerbst , 97 F.2d at 254, and a state that mistakenly transferred a prisoner to the federal government lacked the intent to surrender primary jurisdiction, such a mistaken transfer does not constitute a relinquishment of primary jurisdiction. If the state retains primary jurisdiction, the federal sentence does not commence pursuant to § 3585. Therefore, a prisoner's federal sentence does not commence when the state mistakenly transfers a prisoner to the federal government.

This conclusion raises a second question: how to determine whether the state's transfer of a prisoner is a mistake. In determining whether a state's transfer of a defendant to a second sovereign is intended to be "a complete surrender of the prior jurisdiction" that the state acquired over the defendant, Zerbst , 97 F.2d at 254, we consider the record as a whole. In light of the obligations of comity, we give particular weight to the state's own determination that the transfer of the prisoner to the federal government was a mistake. See Ponzi , 258 U.S. at 260, 42 S.Ct. 309. If the state is silent on this issue, we may consider whether the state and federal government made a formal temporary transfer of physical control pursuant to a writ of habeas corpus ad prosequendum or written request for temporary custody, see Taylor , 164 F.3d at 445, and whether a properly authorized representative of the state approved the transfer, see Ponzi , 258 U.S. at 260, 42 S.Ct. 309. Because the "[d]etermination of priority of custody and service of sentence between state and federal sovereigns is a matter of comity to be resolved by the executive branches of the two sovereigns," Warren , 610 F.2d at 684, two sovereigns are not bound "by the actions of mere subordinate administrative officials such as the state sheriff and federal marshal," Smith v. Swope , 91 F.2d 260, 262 (9th Cir. 1937).

The Tenth Circuit's decision in Weekes v. Fleming , 301 F.3d 1175 (10th Cir. 2002), illustrates such a record-specific analysis. In that case, a state arrested a defendant; transferred him to federal authorities for criminal proceedings in federal court; obtained his return to state court on a writ of habeas corpus ad prosequendum where he was sentenced to a term of imprisonment; and finally returned him to federal court where he pleaded guilty and was sentenced to imprisonment. Id . at 1177. After the federal authorities transferred the defendant to federal prison, the BOP determined that the defendant had not yet served his prior state sentence and returned him to state prison. Id . at 1177-78. Upon the conclusion of his state term of imprisonment and his return to federal prison, the defendant claimed that his federal sentence began when he was first transported to the federal prison. Id . at 1179.

The Tenth Circuit agreed, holding that the record demonstrated that the state had intentionally relinquished primary jurisdiction over the defendant. Id . at 1181. In determining the state's intent, the court first noted that the United States had not presented "either a written request for temporary custody or a writ of habeas corpus ad prosequendum" when it took the defendant away from state authorities, which gave rise to a presumption that both the federal government and the state government had "agreed to a permanent change of custody." Id . Further, the state's subsequent acts confirmed this presumption was correct. These acts included "(1) the subsequent use of an ad prosequendum writ to regain custody, (2) a sentencing order expressly providing that the state sentence should be served concurrently with a future federal sentence, and (3) a state-lodged detainer requesting [the defendant's] return to the state prison system upon completion of his federal sentence." Binford v. United States , 436 F.3d 1252, 1255 (10th Cir. 2006) (discussing Weekes ) (emphasis omitted). Because the record demonstrated that the state had agreed to surrender primary jurisdiction over the defendant and that "[t]he United States was under no duty to return [the defendant] to state custody after federal sentencing," the court concluded that he "must be given federal credit for time served since ... the date his federal sentence actually commenced." Id . (first and third alterations in original) (quoting Weekes , 301 F.3d at 1181 ).

The dissent argues that our conclusion may prevent a prisoner from being given credit for all time served in official custody. Dissent at 771-72. It therefore urges the adoption of a rule that the state must be deemed to have surrendered its primary jurisdiction when it transfers the prisoner to the federal government unless the state expressly preserves its primary jurisdiction through a writ of habeas corpus ad prosequendum. Dissent at 772-73. We disagree. Such an approach is contrary to the principles of comity expressed in Ponzi , which establish that the sovereign which is first to arrest a defendant obtains primary jurisdiction over him as against other sovereigns, and any transfer must be with that sovereign's consent. 258 U.S. at 260, 42 S.Ct. 309. We would interfere with the comity necessary for managing defendants who are subject to criminal prosecution and sentences by both state and federal sovereigns by adopting a rule that prevents sovereigns from rectifying a mistaken transfer or by holding as a matter of law that the state surrendered its primary jurisdiction when it merely made a mistake. For instance, a rule that a state's mistaken transfer of a prisoner triggers the commencement of a federal sentence might motivate federal authorities to retain such a prisoner against the wishes of the state, so as to ensure that the prisoner serves the full sentence imposed by federal law.

Moreover, the dissent's concern that prisoners will not be fully credited for time served is misplaced. Dissent at 771-72. In this case, for instance, Johnson received credit against his state sentence for time erroneously spent in federal custody. Even the dissent agrees that Johnson is not entitled to receiving credit against both his state and federal sentence for the time spent in federal custody, the result he seeks on appeal. See Dissent at 775. Nor does our interpretation of § 3585 preclude courts from fashioning remedies "to prevent the government from abusing its coercive power to imprison a person by artificially extending the duration of his sentence through releases and re-incarcerations," Free , 333 F.3d at 554, where necessary to ensure that the prisoner's period of incarceration is not extended due to a mistaken transfer.

III

We now consider whether, under § 3585(a), Johnson's federal sentence commenced on June 6, 2011, or on one of the two occasions when the state erroneously transferred him to the Marshals Service on August 7, 2009, or December 14, 2009. The parties do not dispute that Texas was the first sovereign to obtain jurisdiction over Johnson when the state arrested him in February 2007, and Texas therefore had initial primary jurisdiction. See Thomas , 923 F.2d at 1365 (citing Warren , 610 F.2d at 684-85 ). Because Johnson's consecutive federal sentence could not commence under § 3585(a) until the federal government obtained primary jurisdiction over him, we must decide whether and when Texas relinquished its primary jurisdiction to the federal government.

Johnson argues that the record establishes that Texas relinquished its primary jurisdiction in 2009 when the Dallas County Sheriff's Department twice transferred him to the federal government and represented on one occasion that his the state sentence was complete. Moreover, as in Weekes , Johnson's transfer to federal control was not pursuant to a writ of habeas corpus ad prosequendum or a written request for temporary custody from the federal government. Thus, in Johnson's view the federal government had legal custody over him upon his erroneous transfer.

We disagree. As explained above, the crucial question is whether, in view of the record as a whole, the state intended to relinquish its primary jurisdiction over Johnson on August 7, 2009, or December 14, 2009, when it transferred him to the Marshals Service. Here, Johnson does not dispute that the Sheriff's Department made a mistake. Highlighting this fact, the Marshals Service's returned Johnson to state authorities when the error was discovered, and Texas took him back. By acknowledging and correcting the error, the state and federal sovereigns made clear that they had not reached an agreement to transfer primary jurisdiction over Johnson. Cf. Zerbst , 97 F.2d at 254 ("The prior right acquired by first arrest continues unchanged until the arresting government has completed the exercise of its powers, and a waiver extends no further than it is intended to extend." (emphasis added) ).

Johnson argues that we should follow Weekes and hold that the state intended to relinquish primary jurisdiction because the state did not transfer him to the federal government pursuant to a writ of habeas corpus ad prosequendum or a written request for temporary custody. Again we disagree. In Weekes , the absence of a writ of habeas corpus ad prosequendum was only one relevant factor, and "the further acts of the two sovereigns" confirmed the court's conclusion that the state and federal sovereigns had reached an agreement for a transfer of primary jurisdiction. 301 F.3d at 1181. Here, unlike in Weekes , there is no indication (1) that either sovereign believed that Texas would have to "borrow" Johnson by means of a writ of habeas corpus ad prosequendum in order to get physical custody, (2) that Texas consented to Johnson's serving his state sentence concurrently with his federal sentence, or (3) that Texas lodged a detainer with the federal authorities acknowledging the federal government's priority. See id . at 1181. Rather, the record best reflects a mutual understanding between the sovereigns that Texas's error was not a surrender of priority and that comity counseled in favor of returning Johnson to the state authorities.

We conclude that on this record, Texas established its priority of jurisdiction when it arrested Johnson in February 2007. From the time of arrest through the time Texas paroled Johnson, the state did not manifest an intent to surrender its priority in favor of the federal government. The Sheriff Department's transfers of Johnson to the federal government in August and December of 2009 were merely mistakes. Therefore, the federal government did not obtain legal custody, i.e., "custody enabling and entitling it to enforce the [consecutive federal] sentence," Burge , 332 F.2d at 175, until after Johnson completed his state sentence. The BOP accordingly did not err in determining that Johnson's federal sentence commenced on June 6, 2011, when the federal government for the first time exercised exclusive penal custody over Johnson.

AFFIRMED.

OLIVER, Chief District Judge, dissenting:

I respectfully dissent. I disagree with the majority that Johnson is not entitled to credit toward his federal sentence for the time he was held in detention by the U.S. Marshal Service on two occasions: August 7 through November 3, 2009, and December 14, 2009 through February 12, 2010, after being released by the Dallas County Sheriff's Department to the U.S. Marshal Service. I would find that the federal authorities obtained primary jurisdiction over him when they took physical custody of his body, and his sentence commenced pursuant to 18 U.S.C. § 3585(a) at that time. Further, even if the federal authorities did not have primary jurisdiction when he was being detained by the Marshals, he nevertheless began his sentence pursuant to 18 U.S.C. § 3585(a) because he was being held for the purpose of commencing his federal sentence.

I do agree with the majority that the existing case law in this Circuit, like that in others, holds that as between state and federal sovereigns, the one having primary jurisdiction over a defendant obtains priority in terms of custody and service of sentence. Taylor v. Reno , 164 F.3d 440, 444 (9th Cir. 1998). Furthermore, it is clear that the sovereign which first gains custody of a defendant maintains primary jurisdiction over him unless it is relinquished. Id . In this Circuit, unlike in some others, primary jurisdiction is relinquished by a federal court when it places a defendant on bond, for example. Id . at 444-45. But, primary jurisdiction by a sovereign is not relinquished if it transfers a prisoner in custody to another sovereign pursuant to a writ of habeas corpus ad prosequendum to answer charges in that jurisdiction. Id . at 444. Under such circumstances, the prisoner is deemed to be "on loan." U.S. v. Evans , 159 F.3d 908, 912 (4th Cir. 1998) ; Thomas v. Brewer , 923 F.2d 1361, 1367 (9th Cir. 1991) ; Crawford v. Jackson , 589 F.2d 693, 695 (D.C. Cir. 1978). Thus, a prisoner is not entitled to have his federal sentence commence immediately upon sentencing in federal court if he has been held pursuant to a writ prior to sentencing.

This court has not, however, addressed before today the issue of whether a prisoner is entitled to credit for time served in federal custody where he was mistakenly turned over to federal officials to commence his federal sentence by a state having primary jurisdiction over him. I think that the majority, in holding that Johnson would not be entitled to any credit for the time he served in federal custody, misinterprets Circuit precedent. It also interprets the doctrine of primary jurisdiction in a way that is inconsistent with 18 U.S.C. § 3585(a), which defines when a federal prisoner commences his sentence, and is likely to result in the denial of relief to prisoners involved in erroneous transfers between sovereigns where significant prejudice would result.

In my view, Taylor and the line of cases that establish when a prisoner may be "on loan" to another sovereign do not support the majority's conclusion that the prisoner in this case, who was mistakenly released from state to federal custody, should not receive credit for the time he spent in federal custody. See , e.g. , Ponzi v. Fessenden , 258 U.S. 254, 260-61, 42 S.Ct. 309, 66 L.Ed. 607 (1922) ; Zerbst v. McPike , 97 F.2d 253, 254 (5th Cir. 1938).

Indeed, I read Taylor to do no more than confirm the universally-accepted principle that when a state allows a prisoner in its custody to appear in federal court by a writ, that prisoner is "on loan" to the federal court. Thus, the state maintains its primary jurisdiction over the prisoner for purposes of sentencing. In Taylor , the court specifically held that, because the defendant was released on bond pending sentencing in federal court, the state obtained jurisdiction over him when they arrested him on a murder charge. Taylor , 164 F.3d at 445. Since the federal court did not have primary jurisdiction over him at the time of sentencing in federal court, he was not entitled to commence his sentence in federal court before commencing his sentence in state court. Id .

I do not think the relevant case law supports the proposition that a sovereign must always consent in order to lose its primary jurisdiction. That is certainly one way that it could happen. For example, a court might be confronted with the issue of whether a sovereign from whom a prisoner was acquired by another sovereign pursuant to a writ may have nevertheless consented to the latter sovereign's having priority in regard to a prisoner's service of his sentence. See , e.g ., Binford v. U.S. , 436 F.3d 1252, 1256 (10th Cir. 2006) (concluding that parties had reached no agreement to alter fact that the state had primary jurisdiction over defendant who was loaned to federal authorities through a writ). There may also be circumstances under which the court has to determine whether a sovereign who relinquished a prisoner to another without requiring a writ may nevertheless have reached agreement with the second sovereign that it would maintain primary jurisdiction. See , e.g ., Weekes v. Fleming , 301 F.3d 1175, 1181 (10th Cir. 2002) (concluding that Idaho, who first had primary jurisdiction, consented to a relinquishment of custody to the United States because the United States was allowed to take possession of the prisoner without a writ, and there was other evidence of the parties' consent to such an arrangement). Indeed, in Smith v. Swope , 91 F.2d 260, 262 (9th Cir. 1937), this court acknowledged the possibility of sovereigns making various arrangements in regard to sentencing, including staggering them, but found no evidence of such an agreement in that case. In making a determination of this type, one would look to the administrative and judicial officers charged with making such decisions, not subordinate officials, such as Marshals or sheriffs. But there is nothing to suggest in Taylor and the line of cases dealing with prisoners "on loan" to another sovereign, as concluded by the majority, that consent is always dispositive of whether primary jurisdiction is relinquished.

The court made clear in Taylor that the doctrine of primary jurisdiction is based on who has custody or control of the "body" of the prisoner. In deciding that the federal court, which first had primary jurisdiction, had relinquished it by placing the defendant on bond, the court stated in Taylor :

As in Strand , the state in this case, not the federal government maintained physical control of Taylor. The sovereign who lacks possession of the body permits another to proceed against the accused.

164 F.3d at 445 (internal quotations omitted). Thus, Taylor instructs that just as the federal court relinquished primary jurisdiction in that case because it no longer had custody of the body, the state twice relinquished primary jurisdiction over Johnson in this case on the two occasions when the Dallas County Sheriff's Department relinquished control of him to the U.S. Marshal Service.

The law establishing that the temporary relinquishment of a prisoner pursuant to a writ does not alter primary jurisdiction itself suggests that the consent theory on which the majority relies in this case is not well-founded. By consent, they do not mean just consent to the turnover of the prisoner, but that the turnover was not through their mistake or accident. Suppose that, through accident or mistake, a state prisoner is turned over by a state with primary jurisdiction to federal authorities for sentencing without a writ and that the federal prisoner is sent to a federal prison facility thereafter to commence his sentence. I do not believe the majority would argue, or the case law supports, the conclusion that the state would have maintained jurisdiction under these circumstances. In Taylor , it was because the prisoner was delivered to federal court pursuant to a "valid writ" that the state court was able to maintain primary jurisdiction over the defendant. Id . at 444. There was no inquiry about the intent of the judge who had responsibility for deciding the issue of whether he should release the defendant on bond. Indeed, the judge's intent was deemed irrelevant to the inquiry as evidenced by the fact that on appeal in that case, the court found his pronouncement upon imposition of sentence, that defendant was "now in federal custody", to be of no significance. Id . at 445-46.

But beyond concluding that a sovereign's intent to transfer must be determined by consideration of the record as a whole, the majority goes further by concluding, citing Smith , 91 F.2d at 262, that sovereigns are not bound by subordinate officials such as sheriffs and U.S. Marshals. Yet Smith was a much different case than this one. That case involved circumstances where a defendant was convicted and sentenced in federal court and immediately commenced his sentence in the custody of the U.S. Marshal, who was instructed to transfer him to a federal penitentiary. Id . at 261. The Marshal did not. Some time thereafter, he transferred the defendant to state custody to commence his state sentence. Id . Upon completion of the service of his time in state custody, he was being held for the commencement of his federal sentence. Id . We held that he properly commenced his federal sentence in the custody of the Marshal. Consequently, the Marshal's delivery of the prisoner to state authorities, contrary to his instructions that he deliver him to the federal penitentiary, did not toll the running of his federal sentence. Id . at 262. There was no question that the federal court had primary jurisdiction and that the defendant commenced his sentence in federal custody. As such, the court acknowledged that it was not called upon to determine whether or not there was an agreement between sovereigns that the defendant would serve a staggered sentence. Under the circumstances of that case, the federal authorities were bound to give credit to the prisoner despite the ministerial error of the Marshal. However, this determination was not based on whether the state obtained primary jurisdiction, but on the federal common law doctrine that once a defendant's sentence has begun, it should be continued uninterrupted, unless interrupted by fault of the prisoner. Id . As a result, the court concluded that he was entitled to credit toward his federal sentence for the time he spent in a state institution.

I do not think that Smith , or the case law in general, supports the notion that federal courts, in determining whether jurisdiction has been relinquished by a sovereign, must always engage in a prolix exercise of combing through the state statute to determine which officials have the proper authority to commit the sovereign and whether the sovereign has potentially relinquished its authority. There is nothing in the record to suggest that the Sheriff in this case was engaging in fraud, subterfuge, or trickery, or that the Marshal obtained possession of the prisoner through such means. Furthermore, I think the majority's position regarding the need for consent from a properly-authorized state representative ignores the practical reality that, in many states, the power to release a prisoner, or take some other affirmative act that might indicate a relinquishment of priority, is exercised by subordinate officials, such as sheriffs. There is nothing in this case to suggest that the Dallas County Sheriff's Department was not empowered to make decisions regarding whether to release or retain prisoners who were legitimately entrusted to its custody and control. Thus, I am left with a serious concern that this decision will result in the denial of relief in even the most egregious cases where significant prejudice to a prisoner could result from an erroneous transfer. The majority's position in this case unnecessarily adds to uncertainty regarding the rights and protections of prisoners subject to the jurisdiction of both state and federal sovereigns. I also do not think that the majority's reliance on a U.S. DEPARTMENT OF JUSTICE , FEDERAL BUREAU OF PRISONS , PROGRAM STATEMENT NO . 5160.05: DESIGNATION OF STATE INSTITUTION FOR SERVICE OF FEDERAL SENTENCE 1 (2003) ("Program Statement") is well-founded. It states, in relevant part, "when it has been determined [that] an inmate was committed improperly to federal custody and primary jurisdiction resides with a state sovereign (i.e., the inmate was under the jurisdiction of the federal sentencing court on the basis of a writ of habeas ad prosequendum), [the BOP] will make every effort to return the inmate to state custody." Id . at 11. The Program Statement further provides that, "[a] return to the state means that the federal sentence should be considered as not having commenced since the transfer to the Bureau was in error and the prisoner should have been returned to the state. ..." Id. at 12. Acknowledging that this Policy Statement refers only to erroneous federal custody involving writs, the majority nevertheless concludes that "the BOP's policy with regard to such writs recognizes that a federal sentence does not commence merely because a prisoner is in the federal government's physical custody." Maj. Op. 15. However, as discussed previously, I do not think that the authority regarding prisoners being "on loan" by one sovereign to another through a writ has any applicability to the very different circumstances of this case. Consequently, I find the majority's reliance on the Program Statement to be unpersuasive.

I conclude that the federal government acquired primary jurisdiction over Johnson on the two occasions when the Sheriff turned him over to the Marshal and that he should be given credit for the time spent in the custody of the Marshal. This result is supported by cases in this Circuit and others, which teach that physical custody of the body of the prisoner determines which sovereign has primary jurisdiction in the absence of the prisoner being in the custody of a sovereign pursuant to a writ or an agreement of the sovereigns to the contrary. On the two occasions when the prisoner was released into the possession of the Marshal it was not pursuant to a writ. There was also no agreement between the sovereigns at that time that primary jurisdiction would remain with the state. It was not until later that the federal authorities, recognizing that Johnson had been released to them by mistake, consented to the state again having primary jurisdiction. During the time that Johnson was in the custody of the Marshal, the federal government had primary jurisdiction over him and he should be given credit toward his federal sentence for that time. Even if I were to conclude, consistent with the majority, that the state maintained primary jurisdiction over Johnson when he was delivered by the Sheriff to the Marshal, I would still find that he had commenced his sentence and should be given credit for the time served in the custody of the Marshal.

Admittedly, courts have varied regarding whether to give federal credit to a prisoner mistakenly taken into federal custody by federal authorities when the state had, and never relinquished, primary jurisdiction. Some courts have read the doctrine of primary jurisdiction into the definition of "received into custody," concluding that a federal prisoner who is mistakenly delivered to a federal penal institution to begin his sentence is not received in custody for the purpose of commencing his federal sentence. For example, in Binford , the court held that a prisoner, who appeared before the federal court pursuant to a writ and was mistakenly delivered to a federal facility after sentencing in federal court, was not entitled to the time he spent at the federal facility before being returned to the state because the state court had primary jurisdiction. Reading the doctrine of primary jurisdiction as a gloss on 18 U.S.C. § 3585(a), the court concluded that "his sentence never began until he was finally received into federal custody for the purpose of serving his sentence, after completing his state sentence." Id . at 1256.

Other courts, while acknowledging the importance of the doctrine of primary jurisdiction in determining which sovereign has priority in regard to the service of its sentence, have not viewed the doctrine as altering the plain meaning of the words "received in custody" in § 3585(a), and have allowed credit for the time spent in federal detention. For example, in Free v. Miles , 333 F.3d 550 (5th Cir. 2003), the court implicitly reached this conclusion. In Free , a prisoner had been brought before the federal court on a writ from a state court, sentenced, and mistakenly sent to a federal facility, rather than back to the state, to begin his sentence. Id . at 551. After serving six months at the federal facility, the error was discovered and he was sent back to the state to commence his sentence there. Id . The Bureau of Prisons determined that the defendant's federal sentence did not start to run until he completed his state sentence. Id . The defendant maintained that his federal sentence should be deemed to have commenced on the date he was first transferred to a federal facility. Id . at 552-53. Further, he claimed that since his federal sentence had commenced before his state sentence, he should be given credit toward his federal sentence for the time he spent in state custody. Id . The district court adopted the report and recommendation of the magistrate judge, who determined that Free's federal sentence commenced when he was initially taken into custody because 18 U.S.C. § 3585(a) states that, "a term of imprisonment commences on the date the defendant is received in custody. ..." Id . at 552. The court, however, did not grant the defendant credit toward his federal conviction for the time he spent in state custody. Id . While denying credit to the defendant for the time he spent in state custody, the court noted in respect to the time he originally spent in federal custody that, "[a]lthough the BOP originally did not give Free credit for these six months, he rightfully and successfully challenged that decision ...." Id . at 555 ; see also Boston v. Att'y Gen. of U.S. , 210 Fed.Appx. 190, 192 (3d Cir. 2006) (concluding that there should be a straightforward determination of the commencement of a federal sentence under 18 U.S.C. § 3585(a) ).

I find that the cases indicating that a prisoner's sentence commences when he arrives at a federal facility to begin his sentence, even if it is later determined that the state had primary jurisdiction at the time of his sentence, are more persuasive than those holding to the contrary. The doctrine of primary jurisdiction was developed as a rule of comity between sovereigns to assist them in determining which had priority in terms of whose sentence would be served first when a defendant had charges pending before more than one sovereign. It was not developed to determine when a federal sentence commences. 18 U.S.C. § 3585(a) defines when a federal sentence commences, stating:

A sentence to a term of imprisonment commences on the date the defendant is received in custody awaiting transportation to, or arrives voluntarily to commence service of sentence at, the official detention facility at which the sentence is to be served.

I submit that, when Johnson was taken into custody by the Marshal upon delivery by the Sheriff on the two occasions involved in this case, it was clearly for the purpose of commencing his federal sentence. The fact that the comity contemplated by the sovereigns failed to work on a particular occasion because of a mistake should not affect Johnson's right to have his sentence commenced under the terms required by the plain meaning of the words set forth in the statute. The sovereign in this case, the federal government, was not deprived of its authority or jurisdiction to act by the primary jurisdiction doctrine, a doctrine of comity only.

Having concluded that Johnson should be given credit for the time he actually spent in federal custody, I do not think he is entitled to credit toward his federal sentence for the time he spent in state custody. There is some federal common law authority for the proposition that once a prisoner begins the commencement of his federal sentence, that sentence must continue uninterrupted until completed. Smith , 91 F.2d at 260 ; Weekes , 301 F.3d at 1180. Johnson was entitled to have his sentence commence on either of the days he was turned over to the Marshal, and if that doctrine were applicable here, he would be entitled to federal credit for the time he spent in state custody after his federal sentence had commenced. However, "[t]raditionally, the doctrine for credit for time at liberty has only been applied where a convicted person has served some part of his sentence and then been erroneously released." U.S. v. Martinez , 837 F.2d 861, 865 (9th Cir. 1988). The court did find the doctrine to be applicable in Smith , awarding credit toward his federal sentence to the defendant for time spent in state custody after he began his sentence in federal custody and was transferred to state custody before completing his federal sentence. 91 F.2d at 260 ; Weekes , 301 F.3d at 1181-82 (also concluding that where federal sentence was interrupted by service of state sentence that defendant should receive credit toward federal sentence for time spent in state custody). However, it does not seem to have been regularly applied to a situation such as in this case where Johnson was mistakenly given the opportunity to begin his federal sentence first. Generally, courts have not applied this doctrine in situations where the state had primary jurisdiction and the defendant erroneously began his federal sentence before serving his state sentence and the sovereigns have agreed as a matter of comity that primary jurisdiction should be restored to the first sovereign. Further, courts recently addressing the issue have concluded, in light of this common law doctrine's main purpose, that it has been, or should be, considerably narrowed. For example, while acknowledging the common law rule that a prisoner is entitled to credit where his prison sentence is interrupted through no fault of his own, the court in Free stated, "[t]he limited function of this rule is clear. Its sole purpose is to prevent the government from abusing its coercive power to imprison a person by artificially extending the duration of his sentence through releases and re-incarcerations." 333 F.3d at 554. In reaching its decision, the court relied on the Seventh Circuit decision in Dunne v. Keohane , 14 F.3d 335 (7th Cir. 1994). In Dunne , the court stated, "[t]he common law rule has not been successfully invoked for many years, but we are not disposed to question its continued vitality in its core area of application, when the government is trying to delay the expiration of the defendant's sentence." Id . at 336-37. That court further stated, "[e]ven if reclassification from federal prisoner to state boarder, with no release into the free community might be thought to violate the rule if it resulted in postponing the date at which the prisoner's last sentence must expire, there was no postponement." Id . at 337. Likewise, in Free , the court concluded that the defendant's sentence was not elongated as a result of his serving the first six months of his federal sentence prior to serving his state sentence. 333 F.3d at 555.

I would reach the same result in regard to the prisoner in this case, give him credit for the time he served in federal custody, but I would find that he is not entitled to credit for the time he spent in state custody. As the court indicated in Free ,

The rule against piecemeal incarceration precludes the government from artificially extending the expiration date of a prison sentence; the rule does not, however, justify or mandate that a prisoner receive a 'get out of jail early' card ... even when the prisoner is not at fault.

333 F.3d at 555. As in Free , the prisoner's sentence in this case was not elongated as a result of the transfer from federal to state custody.

Finally, I address another concern of the majority: allowing Johnson credit for the time he spent in the custody of the U.S. Marshal Service under the circumstances of this case would be in violation of 18 U.S.C. § 3585(b) because he would be receiving credit against both his state and federal sentences. Section 3585(b) permits the Bureau of Prisons to give credit to a defendant "for certain periods spent in official detention only if the time 'has not been credited against another sentence.' " However, that section deals with credit for time a defendant has been detained prior to being taken into custody to commence his sentence. It does not address credit for time spent in custody after commencement of a sentence. Furthermore, it is the prerogative of the state, as sovereign, to determine whether it would give Johnson credit for time served in federal custody. In any case, having already concluded that Johnson is not entitled to credit toward his federal sentence for the time he spent in state custody, the dispositive issue here is whether Johnson is entitled to credit toward his federal sentence for the time he mistakenly spent in federal custody.

For all of these reasons, I would REVERSE the decision of the district court and grant Johnson's request for a writ requiring that the Bureau of Prisons give him credit toward his federal sentence for the periods of time from August 7 through November 3, 2009, and December 14, 2009 through February 12, 2010, finding that he had begun his sentence in the custody of the U.S. Marshal Service during those periods. I would find that Johnson is not eligible for credit toward his federal sentence for time served in state custody. 
      
      As we explained in Taylor v. Reno , "[t]he term 'primary jurisdiction' in this context refers to the determination of priority of custody and service of sentence between state and federal sovereigns." 164 F.3d 440, 444 n.1 (9th Cir. 1998). "A lack of 'primary jurisdiction' does not mean that a sovereign does not have jurisdiction over a defendant. It simply means that the sovereign lacks priority of jurisdiction for purposes of trial, sentencing and incarceration." Id .
     
      
      A federal writ of habeas corpus ad prosequendum secures the presence for trial of a criminal defendant who is held in a state's custody. United States v. Mauro , 436 U.S. 340, 357-58, 98 S.Ct. 1834, 56 L.Ed.2d 329 (1978) ; see also 28 U.S.C. § 2241(c)(5) ("The writ of habeas corpus shall not extend to a prisoner unless ... [i]t is necessary to bring him into court to testify or for trial.").
     
      
      A detainer "may be lodged against a prisoner on the initiative of a prosecutor or law enforcement officer" and "puts the officials of the institution in which the prisoner is incarcerated on notice that the prisoner is wanted in another jurisdiction ... upon his release from prison." Mauro , 436 U.S. at 358, 98 S.Ct. 1834 ; see also 28 U.S.C. § 566(c) ("Except as otherwise provided by law or Rule of Procedure, the United States Marshals Service shall execute all lawful writs, process, and orders issued under the authority of the United States, and shall command all necessary assistance to execute its duties.").
     
      
      "Under the doctrine of credit for time at liberty, a convicted person is entitled to credit against his sentence for the time he was erroneously at liberty provided there is a showing of simple or mere negligence on behalf of the government and provided the delay in execution of sentence was through no fault of his own." United States v. Martinez , 837 F.2d 861, 865 (9th Cir. 1988).
     
      
      This provision provides, in full:
      (a) Commencement of sentence.-A sentence to a term of imprisonment commences on the date the defendant is received in custody awaiting transportation to, or arrives voluntarily to commence service of sentence at, the official detention facility at which the sentence is to be served.
      (b) Credit for prior custody.-A defendant shall be given credit toward the service of a term of imprisonment for any time he has spent in official detention prior to the date the sentence commences-
      (1) as a result of the offense for which the sentence was imposed; or
      (2) as a result of any other charge for which the defendant was arrested after the commission of the offense for which the sentence was imposed;
      that has not been credited against another sentence.
     
      
      Section 709a provided, in pertinent part, that "the sentence of imprisonment of any person convicted of a crime in a court of the United States shall commence to run from the date on which such person is received at the penitentiary, reformatory, or jail for service of said sentence." Act of June 29, 1932, Pub. L. 72-210, § 1, 47 Stat. 381, 381.
     
      
      Other courts agreed with the Fifth Circuit. Applying § 709a, the D.C. Circuit held that "when a prisoner is in the custody of a state and the federal government receives him for the purposes of trial only, the sentence imposed by the federal court does not begin to run until the state has exhausted its demands against him and yields him to the federal government." Strewl v. McGrath , 191 F.2d 347, 348 (D.C. Cir. 1951). And in Vanover v. Cox , the Eighth Circuit applied the same general rule, holding that a Virginia state prisoner's federal sentence could not have commenced under § 709a unless "[t]he consent of the Virginia authorities" to a surrender of primary jurisdiction was "expressly shown." 136 F.2d 442, 444 (8th Cir. 1943).
     
      
      In pertinent part, 18 U.S.C. § 3568 stated: "The sentence of imprisonment of any person convicted of an offense in a court of the United States shall commence to run from the date on which such person is received at the penitentiary, reformatory, or jail for service of said sentence." Act of June 25, 1948, Pub. L. 80-772, 62 Stat. 683, 838. As the reviser's notes to the Act explained, the amended § 3568 reflected only a "[m]inor change in phraseology." H.R. Rep. 80-304, app. at 171 (1947), reprinted in 18 U.S.C.S. at 2636 (West 1948). In 1960 and 1966, Congress amended § 3568 with respect to the provision governing credit for presentence custody, but the provision governing the commencement of federal sentences remained unchanged. See Act of Sept. 2, 1960, Pub. L. 86-691, § 1, 74 Stat. 738, 738; Bail Reform Act of 1966, Pub. L. 89-465, § 4, 80 Stat. 214, 217; see also Jonah R. , 446 F.3d at 1003-04 (discussing these amendments).
     
      
      Section 3585 did not materially change § 3568: § 3585 referred to "a sentence to a term of imprisonment" rather than "the sentence of imprisonment" in § 3568; and § 3585 provided that the sentence "commences on the date the defendant is received in custody awaiting transportation to ... the official detention facility at which the sentence is to be served," rather than providing that the sentence "shall commence to run from the date on which such person is received at the penitentiary, reformatory, or jail for service of said sentence" in § 3568. Compare Bail Reform Act of 1966, 80 Stat. at 217, with Sentencing Reform Act of 1984, Pub. L. 98-473, § 212(a)(2), 98 Stat. 1837, 2001.
     
      
      The dissent argues that the doctrine of primary jurisdiction should not alter "the plain meaning of the words 'received in custody' in § 3585(a)," Dissent at 773. Yet the dissent acknowledges that "primary jurisdiction by a sovereign is not relinquished if it transfers a prisoner in custody to another sovereign pursuant to a writ of habeas corpus ad prosequendum." Dissent at 769, see also Dissent at 770-71, 771-73. The dissent does not dispute that if a state retains primary jurisdiction pursuant to a writ, the prisoner's federal sentence does not commence even though the federal government has physical custody of the prisoner. Dissent at 768-70. Accordingly, the dissent implicitly agrees with us that the federal government's mere physical custody of a prisoner is not always the sort of "custody" that commences a federal sentence under § 3585.
     
      
      The dissent errs in claiming that Free v. Miles , 333 F.3d 550 (5th Cir. 2003) is to the contrary. Dissent at 773-74. In Free , after the state transferred a prisoner to the federal government for prosecution pursuant to a writ, the prisoner was mistakenly incarcerated in a federal prison for six months. 333 F.3d at 551. When the error was discovered, the prisoner was returned to state prison to serve out his state sentence, before being ultimately returned to federal prison to serve out his federal sentence. Id. The government did not appeal the district court's ruling that the prisoner's federal sentence commenced when the prisoner was mistakenly transferred to a federal facility, and so the Fifth Circuit did not address this issue. Id. at 552, 555.
     
      
      Our conclusion, therefore, is consistent with Free , which rejected the defendant's claim that he should receive credit against his federal sentence for all time served after his original mistaken incarceration in federal prison. Id. at 553-55. Instead, the court held that the defendant was entitled to federal credit only for the time actually served in federal prison. It declined to apply the common law rule that "a prisoner is entitled to credit for time served when he is incarcerated discontinuously through no fault of his own," because the prisoner's "total time of incarceration in both federal and state prisons has not been-and will not be-increased by even a single day as a result of his mistakenly serving" time in federal prison. 333 F.3d at 555 (italics in original). We likewise reject Johnson's claim that he is entitled to credit for all time served after his mistaken transfer to the federal government. Because the state gave Johnson credit for all time in federal control, Johnson's sentence likewise will "not be increased by even a single day," and we need not consider the applicability of the common law rule here.
     
      
      Further substantiating this conclusion, a BOP memorandum dated July 14, 2011, records the BOP's view that Texas never "relinquished primary jurisdiction to Federal authorities" through the mistaken transfers.
     
      
      As discussed previously, see supra at 17-18, there is still another reason to reject Johnson's argument: It would undermine the substantive rule against double counting codified at § 3585(b), which prohibits giving a defendant federal credit for time that has "been credited against another sentence." Because Texas already credited all the time Johnson was in custody from August 2009 until he was released in June 2011, if Johnson's federal sentence commenced in August 2009, then all the time he spent in state custody from that date would also be credited to his federal sentence. This result would frustrate Congress's chosen sentencing scheme.
     
      
      The court explained in Strand v. Schmittroth , 251 F.2d 590, 599 (9th Cir. 1957), that the doctrine of in rem jurisdiction is applied in this area and that possession of the res, the body, is dispositive. It stated, "[e]ven though a person has been physically seized, his body must be held in manual custody." Id .
     
      
      The court in Strand suggested that even such authority might not be required, stating, "if the accused by [sic] be brought before a court which has jurisdiction of the subject matter, he may be tried, convicted, sentenced, and imprisoned .... It makes no difference by what means, rightful or wrongful, his body was brought into the court." 251 F.2d at 600.
     