OPINION OF THE COURT
I. INTRODUCTION
This matter comes before this court on an appeal from an order granting a petition for a writ of habeas corpus. Petition *260 er Francisco Rios filed his petition under 28 U.S.C. § 2241 against respondent Ron Wiley, the warden of the Federal Prison Camp at Allenwood, Pennsylvania (“FPC-Allenwood”). 1 The sole issue on appeal is whether the district court erroneously determined that Rios was entitled to credit on his federal sentence for a period of 22 months that he was in federal detention pursuant to a writ of habeas corpus ad prosequendum prior to the imposition of his federal sentence for narcotics violations. We will affirm the order of the district court granting Rios’s habeas corpus petition and thus allowing him the relief he seeks, but we reach our result on different grounds than those on which the district court relied.
II. FACTS and PROCEEDINGS
State authorities arrested Rios on or about August 6, 1991, in New York and charged him with possession of cocaine. He was found guilty of the state charges and on November 7, 1991, the state court sentenced him to five to ten years imprisonment. On November 6, 1991, a federal grand jury in the Southern District of New York indicted him for narcotics offenses unrelated to the state charges. 2 On November 21, 1991, federal authorities, pursuant to a writ of habeas corpus ad prose-quendum, took custody of Rios for one day. On March 20, 1992, the federal authorities, pursuant to a second writ of ha-beas corpus ad prosequendum, took custody of Rios again for a period which proved to be extended and included the 22 months at issue.
At a trial on the federal charges, the jury found Rios guilty on June 17, 1992, of conspiracy to distribute heroin and cocaine and distribution of and possession of heroin with intent to distribute. The court scheduled sentencing for September 15, 1992, but it was delayed until January 31, 1994. Prior to the sentencing hearing the government sent a letter dated January 31, 1994, to the court discussing the application of U.S.S.G. § 5G1.3(c), p.s. 3 to Rios’s case. We will refer to that provision simply as “section 5G1.3(c).” In its opening remarks at the sentencing hearing, the court acknowledged receipt of the letter and stated that its contents were “duly noted.”
In the colloquy between counsel and the court during the sentencing hearing, Rios’s attorney asked the court to consider, among other things, the fact that Rios had been in federal custody pursuant to the second writ since March 1992. Specifically, he asked the court to “sentence Rios to the minimum guideline applicable which is 84 months, and to have that run coneur- *261 rent with the time he is serving on the state case.” When the assistant United States attorney stated that the “state conduct was not counted in calculating the offense level in this case,” Rios’s attorney interjected that he did not mean to imply that it had been. Immediately thereafter, the court asked the government attorney whether Rios, if given credit for time served, would receive credit back to March 1992, the time of the execution of the second writ by the federal authorities. The government attorney answered that crediting was a technical matter, and that he could not respond to the question at that time. The court replied that the answer was not material and it proceeded to sentence Rios.
The sentencing court sentenced Rios “to a term of 90 months on both counts to run concurrently with each other and concurrently with the state sentence and that you receive credit for time served.” The court, however, did not indicate what period of “time served” should be applied to the federal sentence. Moreover, the judgment entered merely recited: “Defendant to receive credit for time served.” The government did not seek clarification or modification of the sentence, nor did it appeal from it.
The federal authorities returned Rios to New York state custody on February 18, 1994. Thus, it is undisputed that Rios remained in the control of the federal authorities from the time of the execution of the second writ on March 20, 1992, until February 18, 1994. It is also undisputed that he previously had been sentenced in state court on November 7, 1991, and that he was serving his state sentence while in the federal custody pursuant to the second writ.
Shortly after the federal authorities returned Rios to state custody, the Bureau of Prisons (“BOP”) designated the New York State Department of Correctional Services for service of his federal sentence. It made this designation nunc pro tunc as of January 31,1994, the date of the federal sentencing. By specifying the federal sentence to have commenced on January 31, 1994, the BOP did not credit Rios for the 22-month time period he spent under federal control pursuant to the second writ before January 31, 1994, despite the sentencing court’s statement at the sentencing and its direction in the judgment of conviction and sentence that credit be awarded for “time served.”
New York released Rios on parole from his state sentence on August 2, 1996, and the BOP received Rios for service of the remainder of his federal sentence. Upon his transfer to federal custody, Rios learned that the BOP had not credited the time between March 20, 1992, the date he was detained by federal authorities by virtue of the second writ, and January 31, 1994, the date of his federal sentencing. Rios filed an administrative remedy request at his place of incarceration at the time, the Federal Corrections Institution at Ray Brook, New York (“FCI Ray Brook”), challenging the BOP’s failure to credit that 22-month period against his federal sentence.
Warden W.S. Keller of FCI Ray Brook denied Rios’s request on November 25, 1996. Rios exhausted his administrative remedies and subsequently filed his habeas corpus petition. The petition reiterated Rios’s challenge of the BOP’s refusal to credit his federal sentence for time served while in federal detention pursuant to the second writ. At the time Rios filed his habeas corpus petition, applying the BOP’s crediting calculations, his projected release date was August 12, 2000. 4 Rios contend *262 ed that his release date should have been September 30,1998.
The district court granted Rios’s habeas corpus petition in a memorandum and order entered December 9, 1998.
See Rios v. Wiley,
The BOP subsequently filed a motion for reconsideration, which the district court denied by memorandum and order entered February 3, 1999.
See Rios v. Wiley,
The BOP filed a timely notice of appeal. While the notice of appeal recites that it is from the February 3, 1999 order, effectively the appeal is from the order granting the habeas corpus petition as well and we are deciding the case on that basis.
III. JURISDICTION and STANDARD OF REVIEW
The district court exercised jurisdiction over this matter pursuant to 28 U.S.C. §§ 1331 and 2241. We have jurisdiction over this appeal pursuant to 28 U.S.C. §§ 1291 and 2253(a), as the BOP filed a timely notice of appeal from the final judgment of the district court entered February 3,1999. 5
In a federal habeas corpus proceeding, we exercise plenary review over the district court’s legal conclusions and apply a clearly erroneous standard to the court’s factual findings.
See Lambert v. Blackwell,
*263 IV. DISCUSSION
A.
The BOP argues that the district court erred in granting Rios’s habeas corpus petition, as it failed to recognize that the general principles governing the computation of a federal sentence prohibit an inmate from receiving credit on a federal sentence for pre-sentence detention where the same time was credited against a previously imposed state sentence. Br. at 13-17. In particular, the BOP points to section 3585(b) as the governing statute in this appeal, and contends that its plain language states that a defendant may receive credit for prior custody “that has not been credited against another sentence.” Id. at 17.
This appeal requires us to explore once again the interplay between the roles of the sentencing court in determining the length of a sentence of incarceration to be served and the BOP in calculating when the sentence imposed will have been satisfied.
See, e.g., Dorsey,
We will begin our analysis by setting forth the relevant statutory provisions and guidelines governing the sentencing court’s determination of the length of the sentence to be imposed where the defendant is subject to an undischarged term of imprisonment. 18 U.S.C. § 3584 states in pertinent part:
Multiple sentences of imprisonment.
(a) Imposition of concurrent or consecutive terms.- — If multiple terms of imprisonment are imposed on a defendant at the same time, or if a term of imprisonment is imposed on a defendant who is already subject to an undischarged term of imprisonment, the terms may run concurrently or consecutively, except that the terms may not run consecutively for an attempt and for another offense that was the sole objective of the attempt. Multiple terms of imprisonment imposed at the same time run concurrently unless the court orders or the statute mandates that the terms are to run consecutively. Multiple terms of imprisonment imposed at different times run consecutively unless the court orders that the terms are to run concurrently.
(b) Factors to be considered in imposing concurrent or consecutive terms. — The court, in determining whether the terms imposed are to be ordered to run concurrently or consecutively, shall consider, as to each offense for which a term of imprisonment is being imposed, the factors set forth in [18 U.S.C. §] 3553(a).
Id.
While section 3584 enables the sentencing court to award a concurrent sentence, that discretion is subject to the applicable guidelines section, namely U.S.S.G. § 5G1.3.
See Dorsey,
The version of U.S.S.G. § 5G1.3 in effect at the time of Rios’s sentencing on January 31, 1994, contains three subsections. See U.S.S.G. § 5G1.3 (Nov.1993). 6 *264 Subsection (a) of the guideline describes circumstances in which imposition of a consecutive sentence is mandatory:
If the instant offense was committed while the defendant was serving a term of imprisonment (including work release, furlough, or escape status) or after sentencing for, but before commencing service of, such term of imprisonment, the sentence for the instant offense shall be imposed to run consecutively to the undischarged term of imprisonment.
U.S.S.G. § 5G1.3(a). Subsection (b) provides the circumstances in which a concurrent sentence is mandatory:
If subsection (a) does not apply, and the undischarged term of imprisonment resulted from offense(s) that have been fully taken into account in the determination of the offense level for the instant offense, the sentence for the instant offense shall be imposed to run concurrently to the undischarged term of imprisonment.
U.S.S.G. § 5G1.3(b). For cases in which neither (a) nor (b) applies, the Sentencing Commission has issued section 5G1.3(c), which is a policy statement to guide the courts:
(Policy Statement) In any other case, the sentence for the instant offense shall be imposed to run consecutively to the prior undischarged term of imprisonment to the extent necessary to achieve a reasonable incremental punishment for the instant offense.
See also United States v. Brannan,
■ The Act also addressed the related but distinct issue of the award of credit on a federal sentence for pre-sentence incarceration. Pursuant to the Act, Congress rewrote 18 U.S.C. § 3568 (“section 3568”), the prior statute governing the award of credit for pre-federal sentence incarceration, and recodified it as section 3585(b). Section 3585(b) (emphasis added) provides in relevant part:
Calculation of a term of imprisonment (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.
As the district court and the parties have framed the legal issue presented in this case, the controversy concerns the correct interpretation of the last clause of section 3585(b) and its application to the 22-month period of Rios’s detention by federal authorities pursuant to the second writ. We do not view the issue that narrowly. Rather, in exercising plenary review of the issues of law Rios’s petition raised under 28 U.S.C. § 2241, we find that the appropriate starting point is to ascertain the meaning that we should ascribe to the sentencing court’s directives that the federal and state sentences be served concurrently and that Rios be given credit for time served. Indeed, it is apparent to us that the district court’s disposition of the matter as though governed by section 3585(b) overlooked the possibility that the sentencing court’s directives related to its power to impose a sentence in accordance with the applicable guidelines provision, section 5G1.3(c) that we quoted above. 7
*265 We reiterate that section 5G1.3(c) provides that the federal sentence should “be imposed to run consecutively to the prior undischarged term of imprisonment to the extent necessary to achieve a reasonable incremental punishment for the crime.” Application Note 3 sets forth a methodology for the court to follow in determining what amounts to a “reasonable incremental punishment” for the crime. It provides that:
To the extent practicable, the court should consider a reasonable incremental penalty to be a sentence for the instant offense that results in a combined sentence of imprisonment that approximates the total punishment that would have been imposed under § 5G1.2 (Sentencing on Multiple Counts of Conviction) had all of the offenses been federal offenses for which sentences were being imposed at the same time.
Section 5G1.3(c) comment, (n.3). This methodology “is meant to assist the court in determining the appropriate sentence
(e.g.,
the appropriate point within the applicable guideline range, whether to order the sentence to run concurrently or consecutively to the undischarged term of imprisonment, or whether a departure is warranted).”
Id.
comment, (n.3). Once the court applies the methodology set forth in Application Note 3 and approaches the sentencing as if sentences on both offenses were being imposed at once, the court must determine what incremental punishment is appropriate in view of the sentence that would have resulted under U.S.S.G. § 5G1.2.
See
Brannan,
Upon inspection of the sentencing transcript as well as the judgment the sentencing court entered on January 31, 1994, we are convinced that the sentencing court applied section 5G1.3(c) in its form as of the date of Rios’s sentencing to impose a reduced federal sentence that, in its view, achieved “a reasonable incremental punishment” for the federal narcotics of *266 fenses, given the circumstance that Rios already had served 22 months on an unrelated state conviction at a time that he was in federal custody. See section 5G1.3(c). In other words, we understand the sentencing court to have exercised its discretion to impose a federal sentence under section 5G1.3(c) which took into consideration the 22 months that Rios had spent in federal custody as of the date of the federal sentencing proceeding, January 31, 1994, so that the actual sentence imposed was 90 months, less 22 months, or 68 months total. The sentencing court also indicated that the sentence imposed was to run concurrently with the state sentence, with the balance, if any, of the federal sentence to be served thereafter. From that initial conclusion, we hold that the BOP was required to effectuate the sentence imposed by the sentencing court, and consequently that Rios is entitled to relief under 28 U.S.C. § 2241 so that his sentence reflects an adjustment for the 22-month period in issue.
A review of the result produced in this case by the use of the methodology set forth in Application Note 3 supports our conclusion that the sentencing court applied section 5G1.3(c) in imposing the period of imprisonment on the federal conviction. First, the court would have considered the guideline range for the federal offenses and the guideline range that would have resulted if the sentences for the state and federal offenses were being imposed at the same time in the same federal sentencing proceeding. Here, as the government’s January 31, 1994 letter to the sentencing court indicates, Rios’s actual offense level was 18, and the combined offense level would have been 18 had the state conduct been considered part of the federal offense conduct. Thus, because of the small quantity of narcotics involved in the state offense, consideration of that quantity in the hypothetical federal sentencing under U.S.S.G. § 5G1.2 would not have changed the offense level. App. at 79; see also U.S.S.G. §§ 5G1.2; 2Dl.l(a)(3), (e)(13); 3D1.1; 3D1.2; 3D1.3; 3D1.4. Accordingly, the sentencing court was faced with a rather anomalous situation because if the hypothetical sentencing had been the real sentencing, the guideline range, 84 to 105 months, insofar as it was dependent on the quantity of narcotics involved, would have been the same as the actual range used by the sentencing court. See U.S.S.G. Sentencing Table, Level 22, Category VI; app. at 53. 9
Therefore, if the sentences on the federal and state offenses had been imposed at the same time and in the same proceeding, absent a departure Rios would have been subject to a combined sentence within the same guidelines range as was actually applicable at the sentencing. In that event, if punishment for the state and federal offenses had been imposed as one sentence in the same federal sentencing proceeding, Rios could have received the same period of incarceration, and obviously that single sentence would have commenced as of the date of sentencing (or at least as of the date that the BOP transported Rios to a federal institution to commence service of his sentence).
In other words, if a single sentence for the two offenses had been imposed at the same time and in the same federal sentencing proceeding, there would have been no need to consider whether to award “credit,” as the sentencing court used that term, because Rios would not have been serving an undischarged term of imprisonment as of the date of the federal sentencing proceeding. Inasmuch as Application Note 3 specifically states that the methodology is “meant to assist the court in determining the appropriate sentence,” from a review of all the circumstances of the case we have reached the conclusion that the sentencing court viewed Rios’s particular history as requiring an adjustment of the federal sentence to account for the
*267
disparity caused by the timing of the imposition of two separate sentences.
See Witte v. United States,
We believe that the sentencing court intended to correct the disparity that resulted from the happenstance of the dates of the federal and state sentencing proceedings by sentencing Rios to 90 months, less 22 months, to reach an adjusted sentence of 68 months, which would then be served concurrently with the remainder of the state sentence. Indeed, it appears to us that the sentencing court expressed its intention to depart from the guideline range, 84 to 105 months, and award the 22-month reduction in the federal sentence by indicating that Rios was to receive “credit for time served.”
We note that the colloquy between the court and counsel at sentencing confirms our understanding of the sentencing court’s intention in using the words “credit for time served” in conjunction with the statement of the term of imprisonment as “90 months.” Specifically, Rios’s attorney pointed out that he had “suffered to a tremendous degree” by virtue of the time he already had spent incarcerated and asked the court to “consider that in determining his sentence.” App. at 44-45. Almost immediately after these statements, the court asked the government about the time that Rios spent in pre-sentence detention. The following exchange occurred:
THE COURT: So that if Mr. Rios is given credit for time served he would get credit from March ’92 to date?
MR. CLEVELAND: That is a technical matter that I may not be able to offer guidance on, as to how the crediting is done. I can make an inquiry if it would be helpful.
THE COURT: It won’t be material. I just thought—
App. at 47. At this point, the court pronounced its sentence of 90 months on both federal counts to run concurrently with each other and concurrently with the state sentence, and ordered that Rios receive “credit for time served.” App. at 47-48.
The juxtaposition of the actual words used in pronouncing the sentence and the discussion between the attorneys on the one hand and the court on the other demonstrates that the sentencing court was cognizant of the time Rios had spent in pre-sentence incarceration, and further that Rios sought consideration for that time from the court in its determination of the sentence to be imposed. Thus, the sentencing court had before it sufficient information upon which it could have concluded that section 5G1.3(c) applied and permitted it to impose the sentence that it did.
Moreover, inasmuch as the sentencing court “duly noted” the contents of the government’s January 31, 1994 letter during the sentencing hearing, app. at 43, it cannot be disputed that the court was aware of the applicability of section 5G1.3(c). Indeed, the government’s letter contained its calculation of the combined offense level for the total amount of narcotics involved in the state and federal offenses, which is a significant aspect of the calculation required by the methodology prescribed in Application Note 3 to section 5G1.3(c). See section 5G1.3(c) comment. (n.3) (directing the court to calculate *268 hypothetical sentence as if it were sentencing under U.S.S.G. § 5G1.2; section 5G1.2 then directs court to calculate combined sentence under Chapter 3, Part D and Part C of Chapter 5).
We reach our conclusion concerning the meaning of the sentencing court’s words used to describe the components of its sentence despite the fact that it did not cite expressly section 5G1.3(c) or Application Note 3 at the sentencing hearing. After all, the Court of Appeals for the Second Circuit has held that a district court need not refer explicitly to section 5G1.3(c) in sentencing a defendant, provided that the circumstances indicate that the court considered “the basic principle that a consecutive sentence should be imposed to the extent that it will result in a reasonable incremental penalty.”
See United States v. Margiotti,
As the Court of Appeals for the First Circuit observed in similar circumstances,
District judges normally deliver their •decisions on sentencing from the bench, just after, and sometimes in the course of, the presentation of numerous arguments and even evidence as to the permissible range and proper sentence. These often spontaneous remarks are addressed primarily to the case at hand and are unlikely to be a perfect or complete statement of all of the surrounding law. What the district judge said here was entirely adequate as directed to the present case.
United States v. Saldana,
In reaching our conclusion, we have considered but rejected the BOP’s arguments on this point. It contends first that the sentencing court’s reference to the award of “credit for time served” should be considered as nothing more than a direction or non-binding recommendation to the BOP to award pre-sentence credit that it deemed appropriate. Br. at 22-23; app. at
*269
48, 51;
see United States v. Pineyro,
As to the first contention, we believe that we must view the sentencing court’s language in the context of the overall proceeding. Given the fact that the government raised the concept of a concurrent sentence in the January 31, 1994 letter, and that Rios’s attorney at the sentencing hearing did so as well, the court’s reference to “credit for time served,” while ambiguous, was not, as the government suggests, merely a non-binding direction or recommendation to the BOP to award credit under section 3585(b) that the BOP deemed appropriate. We recognize that the term “credit” is used in Chapter 227 of Title 18 as a “term of art” to describe a potential benefit allowed a defendant by the BOP in its role as the agency charged with determining when the federal sentence imposed by the sentencing court is satisfied.
See Dorsey,
It cannot be argued successfully that the use of the phrase “credit for time served” by the sentencing judge only can be interpreted to mean that the court directed the BOP to do what it is statutorily required to do, nor can it be viewed in this context as a non-binding recommendation. This is especially so in view of the fact that under the plain language of section 3585(b), which we will explore in greater detail below in Part B of this section, the BOP would not be required to award Rios with credit on his federal sentence for the 22-month period at issue. In these circumstances, if we adopted the BOP’s interpretation, the sentencing court’s direction or non-binding recommendation would have been of little significance or more likely would have been totally meaningless.
We find equally without merit the BOP’s alternative argument that we should disregard the sentencing court’s provision for “credit for time served” as mere “surplusage and ineffective.” Reply Br. at 7 n.2; app. at 51. The BOP premises its assertion in this regard on its belief that the sentencing court’s use of that phrase was an attempt to award sentencing credit under section 3585(b) in violation of the Supreme Court’s holding in
United States v. Wilson,
The problem with the BOP’s interpretation, however, is that it does not account for our alternative interpretation of the district court’s imposition of a 90-month sentence in conjunction with its use of the phrase “credit for time served.” As we explained above, the use of the two phrases in combination expresses the sentencing court’s intention to impose an adjusted federal sentence under section 5G1.3(c) that was to be served concurrently with *270 the remainder of the unexpired state sentence. As is evident from our prior discussion, we find that the sentencing court interpreted section 5G1.3(c) and Application Note 3 as permitting it to impose such a sentence, and that the language it used effectuated the court’s intent in that regard. Thus, because the BOP’s argument hinges on its interpretation of the language as an award of credit under section 3585(b), rather than an application of section 5G1.3(c) and Application Note 3, we reject its argument that the credit for time served language is “surplusage and ineffective.”
Moreover, the BOP’s argument fails in light of our opinion in
Dorsey
which recognized that neither the enactment of section 3585(b) nor the Supreme Court’s ruling in
Wilson
limited the sentencing court’s authority to apply section 5G1.3 and impose a concurrent sentence to the extent appropriate.
See Dorsey,
While
Dorsey
involved a challenge to the validity of Application Note 2 and section 5G1.3(b), the same rationale applies to the court’s exercise of discretion to impose a concurrent sentence under section 5G1.3(c) and Application Note 3. To be sure, an application of section 5G1.3(b) or (c) and the commentary by the sentencing court, and the award of sentencing credit by the BOP under section 3585(b), may result in the same benefit to the defendant. Nevertheless, that the same outcome may be obtained either way does not alter the fact that the two benefits bestowed are distinct, and the Supreme Court’s opinion in
Wilson
only meant to refer to the award of sentencing credit under section 3585(b) when it determined that the power to award that credit was entrusted exclusively to the BOP.
See Dorsey,
We therefore reject the BOP’s argument that we should view the “credit for time served” portion of the judgment as “sur-plusage and ineffective” because the argument rests on the faulty premise that the sentencing court intended to award credit under section 3585(b). Because we have determined that the language “credit for time served” demonstrates the sentencing court’s intention to fashion an appropriate sentence under section 5G1.3(c) and Application Note 3 by considering the 22 months served as part of the federal sentence, which we consider distinct from credit under section 3585(b), we conclude that the BOP’s position is incorrect.
See United States v. Drake,
We hold that the BOP’s failure to implement the sentence imposed by the sentencing court mandates habeas corpus relief under section 2241. See United States v. Williams,
B.
Notwithstanding our affirmance of the district court’s orders granting Rios habeas corpus relief, inasmuch as it appears that the district court’s application of section 3585(b) raises an issue of first impression in this circuit, we will address its interpretation of that provision. In both of its opinions, the district court essentially carved an exception to the plain language of section 3585(b) so as to award Rios a 22-month credit against his federal sentence, so that his sentence was, in effect 68 months. In its original memorandum and order, the district court relied on the Court of Appeals for the First Circuit’s decision in
Benefield
as espousing the correct approach in determining if pre-sentence credit under section 3585(b) is warranted even in circumstances indicating that credit already had been awarded against another sentence.
See Rios
I,
The district court nonetheless found that under the Court of Appeals for the Tenth Circuit’s reasoning in
Brown
II, the length of Rios’s pre-sentence custody required a departure from the general rule prohibiting credit on a federal sentence for time spent serving a state sentence.
See id.
at 269-70 (citing
Brown
II,
The BOP’s position is premised on the plain language of the last clause of section 3585(b). As we previously mentioned, section 3585(b) (emphasis added) provides:
(b) Credit for prior custody. — A defendant shall be given credit toward the service of a term of imprisonment for any time 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.
*272
The courts have construed the last clause of section 3585(b) as limiting an award of credit for time served prior to the imposition of a federal sentence under section 3585(b) to instances where the time period was not spent in service of a previously imposed sentence and thus had not been credited against that earlier sentence. In other words, the majority of courts addressing this issue have determined that section 3585(b) generally prohibits an award of “double credit.”
See, e.g., Chambers v. Holland,
We agree with this body of case law interpreting the plain language of section 3585(b), and find that in the circumstances presented here, the section does not authorize the award of credit for the 22 months that Rios spent in federal control under the second writ. 13 It is undisputed that the 22-month time period was credited against his state sentence, as Rios already had been sentenced on the state offense and thus was serving that sentence during the relevant time period. We therefore *273 conclude that the district court applied section 3585(b) incorrectly.
Specifically, in its memorandum and order denying the BOP’s motion for reconsideration, the district court held that a departure from the general rule prohibiting double credit was warranted because of the length of time that Rios was held in federal detention pursuant to the second writ. In reaching its conclusion, it relied on
Brown
II where the court reached a similar result under factually analogous circumstances.
See Rios
II,
The defendant in
Brown
sought a credit against his federal sentence for time spent in a federal prison pursuant to writ of habeas corpus ad prosequendum while awaiting trial and sentence on a federal narcotics charge.
See Brown
I,
In the original panel opinion in
Brown
I and in its supplemental opinion in
Brown
II, the Court of Appeals for the Tenth Circuit held that the defendant was entitled to credit on his federal sentence for the time he was detained pursuant to the writ, which was approximately 19 months. The supplemental opinion recognized that pursuant to the writ, the defendant was in effect “on loan” to the federal authorities. Nevertheless, the court concluded that the “loan” effectuated by the writ at some point “transmuted” into federal “custody” for purposes of section 3568 such that credit against the federal sentence should have been given to the defendant.
See Brown
II,
While the district court stated that the rule enunciated in
Brown,
II was persuasive and thus applied it in this case, we find its reliance on
Brown
II misplaced. First, as the district court correctly pointed out (but did not find dispositive),
Brown
was decided under section 3585(b)’s predecessor statute, section 3568. Section 3568 did not contain the explicit prohibition on double credit found in section 3585(b).
See Wilson,
We do not share the district court’s view that the change in language is immaterial. Assuming that the district court is correct in its supposition that Congress added the last clause of section 3585(b) to codify then-existing case law interpreting section 3568, it does not follow that we may ignore the plain language in section 3585(b) to achieve what may be perceived as an equitable result.
14
Because the court in
Brown
*274
obviously did not address the plain language of the last clause of section 3585(b), we believe that the district court erred in relying on the rule of law announced in that case.
See Brown
I,
More fundamentally, however, we respectfully disagree with the reasoning employed by the court in
Brown.
We understand the court’s conclusion that the prolonged detention transmuted into federal custody as an attempt to fit the case within the plain language of section 3568. Indeed, the court’s reference to the federal detention as being transmuted into custody for purposes of the crediting statute tracks the pertinent language of section 3568.
15
Nevertheless, as the BOP correctly argues, the law on this point is clear: a prisoner detained pursuant to a writ of habeas corpus ad prosequendum remains in the primary custody of the first jurisdiction unless and until the first sovereign relinquishes jurisdiction over the prisoner.
See,
e.g.,
Jake v. Herschberger,
We are not aware of any principle of law which supports the conclusion that the length of time in federal detention effee-tively abrogates the doctrine of primary jurisdiction- — predicated on principles of comity — and “transmutes” the inmate into a federal prisoner for crediting purposes under section 3585(b) or its predecessor statute, section 3568. Moreover, we are unable to ascertain the point at which the prisoner would be deemed to have become a federal prisoner for credit purposes. In this regard, we point out that it is ironical that the longer the federal pretrial detention lasted, the better off the prisoner would be from a crediting standpoint, because a short detention might not result in the prisoner’s being regarded as being in federal custody at all, in which case he would not be entitled to credit for that period against the federal sentence ultimately imposed.
Thus, we agree with those courts which have determined that the general rule prohibiting double credit articulated in section 3585(b) applies equally to situations where, as here, the prisoner was in federal control pursuant to a writ of habeas corpus ad prosequendum during the time period for which a pre-sentence credit is sought.
See Chambers,
The principal rationale for disallowing double credit in this circumstance is that the prisoner is not in custody solely because of the pending federal charges, but instead is serving the prior state sentence.
See Sinito,
Applying these principles to the circumstances of Rios’s detention on the federal writ, it is clear that he remained throughout the 22-month time period in the primary custodial jurisdiction of the State of New York, and that as a result, he received credit against his state sentence for the entire 22 months. Indeed, it would appear that the situation presented in this case is the quintessential example of when section 3585(b)’s prohibition of double credit should apply. Moreover, this position is consistent with the BOP’s Program Statement interpreting section 3585(b) which is entitled to deference. 16 See Dept, of Justice, Bureau of Prisons’ Program Statement No. 5880.28(e)(1)(a)(2) (Feb. 14, 1997) (“Credit will not be given for any portion of [pre-federal sentence] time spent serving another sentence regardless of whether the sentence is federal, state or foreign.”); id. at No. 5880.28(c)(6) (July 29, 1994) (“Time spent in custody under a writ of habeas corpus from non-federal custody will not in and of itself be considered for the purpose of crediting pre-sentence time. The primary reason for ‘writ’ custody is not the federal charge. The federal court merely ‘borrows’ the prisoner under the provisions of the writ for secondary custody.”).
As we have indicated, in addition to its reliance on
Brown
II, the district court originally premised its result on the opinion in
Benefield,
but then retreated from its position in deciding the BOP’s reconsideration motion. On reconsideration, the district court read the outcome in
Bene-field
as grounded on the fact that the federal charges arose out of the same conduct as the state conviction, and determined that the state and federal charges in this case were not based on the same conduct. It reached its conclusion in this
*276
connection apparently because the record submitted on reconsideration demonstrated that the sentencing court did not apply U.S.S.G. § 5G1.3(b) at sentencing.
See Rios
II,
Rios argues in his brief that the holding in Benefield provides an alternative basis for affirming the district court’s grant of habeas corpus relief. We, however, disagree with Rios to the extent that he contends that Benefield compels the conclusion that he is entitled to a 22-month credit against his federal sentence under section 3585(b).
To be sure, the court of appeals in
Bene-field
permitted an award of pre-sentence credit on a federal sentence for time credited toward service of the state sentence. Nevertheless, we cannot determine from the opinion which period of incarceration was at issue, i.e., whether the defendant served the time prior to the imposition of the state sentence, after the imposition of the state sentence but prior to the commencement of the federal sentence, or both.
See Benefield,
In our view, the construction of the last phrase'of section 3585(b) and its application to the facts of this case is relatively straightforward. If the sentencing court had not applied section 5G1.3(c) and Application Note 3 in pronouncing Rios’s sentence such that the issue presented on appeal was in fact a crediting matter governed by section 3585(b), under that statute Rios would not be entitled to the 22-month credit for the time spent in federal control pursuant to the writ. Indeed, the district court recognized that section 3585(b) generally prohibits an award of double credit.
Rios
II,
For each of these reasons, we find that the district court interpreted section 3585(b) incorrectly so as to permit the court to require the BOP to award Rios double credit for the 22-month time period at issue. We thus expressly reject the alternative rule enunciated by Broum II and followed by the district court in this case. Nevertheless, despite the district court’s error in this regard, we will affirm on the alternative ground that the sentencing court applied section 5G1.3(c) and Application Note 3 in sentencing Rios such that the BOP is required to calculate his federal sentence in the manner he requested in his petition.
V. CONCLUSION
For the foregoing reasons, we will affirm the order granting Rios’s petition for a writ of habeas corpus entered December 8, 1998, and the order denying reconsideration entered on February 3,1999.
Notes
. Rios was incarcerated at FPC Allenwood at the time the court decided this case. He originally filed the petition in the Northern District of New York, but because of his place of incarceration the court transferred the petition to the Middle District of Pennsylvania.
While the named respondent in this matter is Ron Wiley, the warden at FPC-Allenwood, the parties refer throughout their submissions to the appellant as the Bureau of Prisons because the appeal involves a sentencing calculation matter. We will adopt that designation of the appellant for ease of reference.
. In the district court’s second opinion in this case, it indicated that the charges were unrelated,
see Rios v. Wiley,
."Section 5G1.3(c) is labeled a 'Policy Statement'; we note that '[t]he policy statements and commentary contained in the guidelines are binding on the federal courts.' ”
United States v. Brannan,
. We note that the district court originally stated that the projected release date was February 12, 2000,
see Rios v. Wiley,
. Because the government has taken the appeal in this proceeding, a certificate of ap-pealability is not required as a prerequisite to our exercise of appellate jurisdiction.
See
Fed. R.App. P. 22;
Lambert v. Blackwell,
. We will apply the version of section 5 G 1.3(c) and Application Note 3 in effect on the date of Rios's sentencing.
See
U.S.S.G. § 1B1.11;
Braman,
. There can be no dispute that sections 5G1.3(a) and (b) do not apply to this case. We repeat that section 5G 1.3(a) sets forth the situations in which a consecutive sentence is mandatory, and the BOP does not contend on appeal that that provision applies. Moreover,
*265
the government and Rios’s attorney at the time of the sentencing believed that section 5G1.3(b) did not apply, as the conduct involved in the state charge was not considered "relevant conduct” for purposes of determining Rios’s federal offense level. App. at 46-47;
see United States v. Oser,
. We understand section 5G1.3(c) to permit a district court to exercise its discretion and award a concurrent sentence in a manner that would ensure that the federal sentence, while imposed at a later time, took into account prior time served on an unrelated state sentence.
See Brannan,
. By reason of adjustments Rios’s total offense level was 22.
. Again, we note that the government did not appeal from the sentence, nor did it seek its reconsideration or clarification.
. We held in
Holifield
that the district court must calculate the reasonable incremental punishment according to the methodology in Application Note 3 to section 5G13(c), but that the imposition of that penalty is within the court’s discretion.
See Holifield,
. Rios asserts that they were related. See note 2, supra.
. Although the issue is not squarely before us, we recognize that the BOP permits the award of what amounts to a form of "double credit” in certain limited circumstances despite the plain language of section 3585(b). The BOP does not contest this point on appeal. Indeed, throughout the adjudication of Rios's administrative appeals of the BOP's denial of credit, the BOP referred to the possibility of an award of "double credit” pursuant to the
“Willis/Kayfez
line of cases.” App. at 62, 68. These statements refer to
Willis v. United States,
To the extent that the district court relied on the fact that the BOP permits a credit under Willis and Kayfez which seemingly conflicts with the plain language of section 3585(b), we believe that it read too much into those opinions. Both Willis and Kayfez involved different crediting issues not presented on the facts of this case, as the 22-month time period at issue here occurred after the state sentence was imposed but before the federal sentence was pronounced. See U.S. Dept, of Justice, Fed. Bureau of Prisons Program Statement 5880.28(c)(2)(c) & (d) (Feb. 14, 1997) (providing formulas for calculation of Willis and Kayfez credits). Moreover, it is clear from the administrative appeals that occurred in this case that the BOP considered the possibility of additional credit under the Willis/Kayfez line of cases, but rejected it. Thus, nothing in this opinion should be construed as suggesting that in other cases, the BOP’s award of Willis and/or Kayfez credits is improper. The BOP's position with respect to the grant of Willis and Kayfez credits simply has no application to the facts of this case, and does not affect our conclusion that the award of double credit in Rios's case is prohibited by section 3585(b).
. Our research reveals that the majority of the courts addressing the meaning of section 3568 interpreted that statute to prohibit the award of "double credit” despite the fact that
*274
ihe language of the statute did not explicitly limit its application in that manner.
See, e.g. Sinito v. Kindt,
. Section 3568, which was repealed in 1984, provided in relevant part (emphasis added):
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.
. A Program Statement is an internal agency guideline, which is akin to an interpretive rule.
See Reno v. Koray,
