
661 F.3d 682 (2011)
UNITED STATES of America, Appellee,
v.
Howard KELLY, Defendant, Appellant.
No. 09-2607.
United States Court of Appeals, First Circuit.
Heard May 3, 2011.
Decided November 18, 2011.
*683 Robert M. Greenspan for appellant.
Renée M. Bunker, Assistant U.S. Attorney, with whom Thomas E. Delahanty II, United States Attorney, was on brief, for appellee.
Before LYNCH, Chief Judge, BOUNDIN and HOWARD, Circuit Judges.
HOWARD, Circuit Judge.
This case involves assessment of whether an appearance compelled by a writ of habeas corpus ad prosequendum by one federal district court to the custodian of an individual detained in another federal district on the basis of unrelated pending charges triggers the Speedy Trial Act's (STA) 30-day arrest to indictment clock with respect to the charges in the jurisdiction that issued the writ. This appears to be a question of first impression. We hold that the STA was not triggered and affirm the decision of the district court denying the motion to dismiss the indictment for violation of the STA.

I.
On May 17, 2006, a two-count criminal complaint was filed in the U.S. District Court for the District of Maine against Howard Kelly. The complaint alleged that Kelly had committed identity theft and aggravated identity theft in violation of 18 U.S.C. §§ 1028(a)(7) and 1028A(a)(1). An arrest warrant was issued the same day, but was not executed, as Kelly was not in Maine at the time.
Kelly was in federal custody in New York on different charges. On October 21, 2005, a complaint had been filed in the Western District of New York, alleging that Kelly had knowingly and unlawfully escaped from a halfway house in that district earlier that month. Kelly was arrested in New Hampshire on that New York charge on May 9, 2006. The New Hampshire district court held a detention hearing on May 11, and afterwards ordered that Kelly be detained pending trial, and be committed to the custody of the Attorney General "for transport to the Western District of New York" to answer the indictment that issued in the Western District on the same day. Kelly was moved to *684 New York and the New York case moved forward during the summer of 2006.
Back in Maine, on September 28, 2006, the United States moved for a writ of habeas corpus ad prosequendum, requesting Kelly's presence for an initial appearance on October 23, 2006, to respond to the Maine federal criminal complaint. The writ was granted by the Maine district court the next day. Kelly was transported to Maine on October 18, 2006, under the writ, and appeared before the Maine court. He waived his right to a hearing and consented to being detained in the District of Maine. He remained in custody in Maine until Feb. 13, 2007, when he was transported to New York. He was in New York when he was indicted in Maine on the charges in this case on December 19, 2007.
The prosecution and defense filed, in the Maine action, two joint motions to exclude time under the STA, on November 27 and December 26, 2006. These motions represented that "the defendant wishes to seek additional time to reach an alternate resolution to this case that would negate the need for an indictment," and that "the defendant is facing charges in another jurisdiction [New York] and wishes to seek additional time to reach an alternate resolution to those cases." The court allowed the motions and its orders excluded the time between November 22, 2006, and January 24, 2007, from the STA calculation.[1]
Kelly was convicted in New York and sentenced to 54 months imprisonment on May 6, 2008. He was returned to Maine on July 17, 2008, and was arraigned there on July 25, 2008.
Upon his return to Maine, various proceedings took place before the district court. Of particular relevance to this appeal is Kelly's motion, filed on September 8, 2008, for dismissal of the Maine federal indictment based on an alleged STA violation. Kelly argued that his initial Maine appearance took place on October 23, 2006, while the indictment was not issued until December 19, 2007, and that this violated the STA's requirement that the indictment issue within 30 days "from the date on which such individual was arrested or served with a summons in connection with such charges." 18 U.S.C. § 3161(b) (emphasis added). The government opposed the motion and Kelly requested a hearing, which was held on December 4, 2008.
The magistrate judge issued a report and recommendation on December 30, 2008, recommending that Kelly's motion to dismiss the indictment be denied. The magistrate judge first noted that "[f]rom all that appears in the record, this defendant was never arrested or served with a summons in connection with the Maine charge. Thus, at least technically, the Act appears not to apply at all." The magistrate judge further noted that even if the STA did apply, it had not been violated, because the time spent in Maine was "devoted to an attempt to resolve the New York charge along with the Maine charge," and as a result was excludable delay. See 18 U.S.C. § 3161(h)(1) (excluding "[a]ny period of delay resulting from other proceedings concerning the defendant, including but not limited to" eight particular examples). Despite Kelly's objection, the district court adopted the report and recommendation on March 26, 2009, explaining that "the delay in this Maine case resulted from the defendant's attempt to resolve, while here, the New York escape charge."
On May 28, 2009, Kelly entered a conditional guilty plea on the Maine charges, but reserved his right to challenge the *685 March 26 order denying his motion to dismiss the indictment based on the purported STA violation. The district court accepted the plea, and Kelly was sentenced to a term of 70 months on November 24, 2009.
Kelly now appeals, raising a single challenge: that the delay between his appearance in Maine on October 23, 2006, pursuant to the writ of habeas corpus ad prosequendum, and the issuance of the Maine indictment on December 19, 2007, violated the STA and required dismissal of the indictment, pursuant to 18 U.S.C. §§ 3161(b), 3162(a)(1).

II.
Because this case involves interaction between the STA and writs of habeas corpus ad prosequendum, some context for each may be of use.

A. The Speedy Trial Act

Enacted in 1974 and amended in 1979, the STA imposes a variety of time limitations designed to ensure a speedy trial. First, the STA has a 30-day arrest to indictment requirement, which requires "[a]ny information or indictment charging an individual with the commission of an offense" to "be filed within thirty days from the date on which such individual was arrested or served with a summons in connection with such charges." 18 U.S.C. § 3161(b). The purpose of this requirement "is to ensure that the defendant is not held under an arrest warrant for an excessive period without receiving formal notice of the charge against which he must prepare to defend himself." United States v. Spagnuolo, 469 F.3d 39, 43 (1st Cir. 2006) (quoting United States v. Meade, 110 F.3d 190, 200 (1st Cir. 1997)) (internal quotation marks omitted).
Second, the Act imposes a separate 70-day indictment to trial requirement, requiring that a trial "commence within seventy days from the filing date (and making public) of the information or indictment, or from the date the defendant has appeared before a judicial officer of the court in which such charge is pending, whichever date last occurs." 18 U.S.C. § 3161(c)(1).
Not every calendar day constitutes a "day" for purposes of the STA, however; certain "periods of delay shall be excluded in computing the time" under both the arrest to indictment and indictment to trial sections. Id. § 3161(h). For example, delay "resulting from other proceedings concerning the defendant," such as that resulting from the filing of pretrial motions or the court's consideration of plea agreements, is excluded. Id. § 3161(h)(1). The parties may request continuances, which the court may grant if consideration of several factors supports granting such a continuance. Id. § 3161(h)(7).
If an indictment or information is not filed within the 30-day limit, the court must dismiss the charges, either with or without prejudice, based upon consideration of several factors. Id. § 3162(a)(1). A similar provision requires dismissal if the 70-day indictment to trial limit is violated. Id. § 3162(a)(2).
The Act also addresses individuals charged with federal crimes who are already serving a term of imprisonment. Section 3161(j) provides that "[i]f the attorney for the Government knows that a person charged with an offense is serving a term of imprisonment in any penal institution, he shall promptly (A) undertake to obtain the presence of the prisoner for trial; or (B) cause a detainer to be filed" regarding the prisoner. Id. § 3161(j)(1). "When the person having custody of the prisoner receives ... a properly supported request for temporary custody of such prisoner for trial, the prisoner shall be *686 made available to that attorney for the Government ...." Id. § 3161(j)(4).

B. Habeas Corpus Ad Prosequendum

Habeas corpus ad prosequendum, a writ derived from English common law, has historically been "issue[d] when it [wa]s necessary to remove a prisoner, in order to prosecute ... in any court, or to be tried in the proper jurisdiction wherein the fact was committed."[2] 3 William Blackstone, Commentaries *130. In the United States, this writ has "a long history, dating back to the First Judiciary Act." United States v. Mauro, 436 U.S. 340, 360, 98 S.Ct. 1834, 56 L.Ed.2d 329 (1978). Its issuance is currently authorized by 28 U.S.C. § 2241(c)(5), which allows for a writ of habeas corpus to extend to a prisoner when "[i]t is necessary to bring him into court ... for trial."
The writ is "issued directly by a court of the jurisdiction where an indictment, information, or complaint has been lodged against the prisoner." Stewart v. Bailey, 7 F.3d 384, 389 (4th Cir.1993). It operates as "a court order requesting the prisoner's appearance to answer charges in the summoning jurisdiction." Id. The writ of habeas corpus ad prosequendum, like other writs of habeas corpus, is issued to the custodian of the detained individual.[3]
The writ allows the issuing court[4] to "obtain temporary custody of the prisoner." Mauro, 436 U.S. at 362, 98 S.Ct. 1834. The nature of the writ is such that "the sending state retains full jurisdiction over the prisoner since the prisoner is only `on loan' to the prosecuting jurisdiction."[5]Flick v. Blevins, 887 F.2d 778, 781 (7th Cir.1989); Stewart, 7 F.3d at 389 ("A prisoner is not even `in custody' [of the summoning jurisdiction] when he appears in [that] jurisdiction's court pursuant to an ad prosequendum writ; he is merely `on loan' to that jurisdiction's authorities."); Crawford v. Jackson, 589 F.2d 693, 695-96 (D.C.Cir.1978) ("When an accused is transferred pursuant to a writ of habeas corpus ad prosequendum he is considered to be `on loan' to the federal authorities so that the sending state's jurisdiction over the accused continues uninterruptedly," even when the writ is "arguably expired").

III.
We review issues of law under the STA de novo and review factual determinations *687 for clear error. See United States v. Pakala, 568 F.3d 47, 57 (1st Cir.2009).
The government raises three arguments as to why the STA was not violated. First, it contends that because Kelly's appearance in Maine was procured via a writ of habeas corpus ad prosequendum, there was no "arrest" or "summons" within the meaning of the STA, and thus its requirement that the indictment be issued within 30 days of such an arrest or summons was never triggered. Second, the government asserts that if the Act was triggered, there was no violation because sufficient time was excludable under various § 3161(h) exceptions such that the 30-day limit was not exceeded. Finally, the government argues that even if the 30-day limit was triggered and exceeded, only a portion of the indictment should be dismissed. Because we agree with the government's first argument, we need not consider the latter two.
The STA provides, in relevant part:
Any information or indictment charging an individual with the commission of an offense shall be filed within thirty days from the date on which such individual was arrested or served with a summons in connection with such charges. If an individual has been charged with a felony in a district in which no grand jury has been in session during such thirty-day period, the period of time for filing of the indictment shall be extended an additional thirty days.
18 U.S.C. § 3161(b). The question presented here is whether an appearance under a writ of habeas corpus ad prosequendum constitutes an "arrest" or "summons" under the STA. We conclude that it does not. We also find that Kelly's New Hampshire arrest on the New York charge was not "in connection with" the Maine charges. Accordingly, the Act's 30-day arrest to indictment provision was not triggered with respect to the Maine charges.
We begin our analysis by reviewing the plain language of the STA. The Act, by its terms, applies only where there is an "arrest" or service of a "summons" in connection with the relevant federal charges. 18 U.S.C. § 3161(b). Issuance of a writ of habeas corpus ad prosequendum is neither an arrest nor a summons. Unlike an arrest, where an individual is taken into custody, the writ requires only a temporary physical transfer of an already detained individual. See Black's Law Dictionary 124 (9th ed. 2009) (defining arrest as "[t]he taking ... of a person in custody by legal authority ... the apprehension of someone"). Full custody remains in the jurisdiction of detention; at best, custody under the writ is temporary and limited. Moreover, unlike a summons, the writ is issued not to the individual, but instead to the custodian, directing transfer of the defendant. Thus, the issuance of the writ, by the literal terms of the statute, did not trigger the STA.
Two other interpretive rules reinforce this conclusion. The language of the STA operates against the backdrop of Rule 4 of the Federal Rules of Criminal Procedure, which provides the mechanism for issuing an arrest warrant or a summons: after a complaint establishes probable cause, "the judge must issue an arrest warrant to an officer authorized to execute it," although at the request of the government "the judge must issue a summons ... to a person authorized to serve it." Fed. R.Crim.P. 4(a). Arrest warrants are executed by "arresting the defendant," while summons are issued by "ser[vice] on an individual defendant." Fed.R.Crim.P. 4(c)(3)(A), (B). The rule makes clear that writs ad prosequendum are not arrests or summonses, as such writs involve neither issuance nor execution of an arrest warrant nor service of a summons on an individual defendant.
*688 Moreover, an arrest under the STA is typically the "beginning of continuing restraints on [a] defendant's liberty imposed in connection with the formal charge on which [a] defendant is eventually tried." Acha v. United States, 910 F.2d 28, 30 (1st Cir.1990) (per curiam) (quoting United States v. Stead, 745 F.2d 1170, 1172 (8th Cir.1984)) (emphasis added) (internal quotation mark omitted). Issuance of the writ ad prosequendum is not the beginning point of such restraints; by definition such writs only issue to those already in custody on other charges.
Second, Congress expressly considered the writ in enacting the STA. "[T]he issuance of ad prosequendum writs by federal courts has a long history, dating back to the First Judiciary Act. We can therefore assume that Congress was well aware of the use of such writs by the Federal Government" when it enacted the STA. See Mauro, 436 U.S. at 360, 98 S.Ct. 1834. That background assumption is supported by another provision of the Act which expressly addresses such writs. Section 3161(j)(1) provides that "[i]f the attorney for the Government knows that a person charged with an offense is serving a term of imprisonment in any penal institution, he shall promptly ... undertake to obtain the presence of the prisoner for trial," or file a detainer. 18 U.S.C. § 3161(j)(1). When the person "having custody of the prisoner" receives such a "request for temporary custody of such prisoner," "the prisoner shall be made available" for trial. Id. § 3161(j)(4). This language has been interpreted to authorize issuance of writs of habeas corpus ad prosequendum to procure defendants' attendance at trial. Mauro, 436 U.S. at 362 n. 27, 98 S.Ct. 1834.
Section 3161(j) demonstrates that Congress was acutely aware of the use of such writs, and could easily have drafted § 3161(b) to include their issuance as a trigger of the 30-day indictment clock, but chose not to do so. Similarly, Congress could also have written § 3161(j) to apply to individuals detained awaiting trial, rather than limiting its application to individuals "serving a term of imprisonment," but again chose not to do so. See 18 U.S.C. § 3161(j)(1). The language of § 3161(j) also makes clear that writs of habeas corpus ad prosequendum are merely "requests for temporary custody," rather than an "arrest" or a "summons." Id.
Case law addressing similar situations under the STA supports the conclusion that the Act was not triggered in this case. In a variety of circumstances, courts have held that where an arrest is justified independently, and is based on charges separate from those ultimately brought against the defendant, the Act is not triggered with respect to such ultimate charges. See Acha, 910 F.2d at 30 ("The right to a speedy trial on a charge is triggered by arrest only where the arrest is the beginning of continuing restraints on [a] defendant's liberty imposed in connection with the formal charge on which [a] defendant is eventually tried.") (quoting United States v. Stead, 745 F.2d 1170, 1172 (8th Cir.1984)) (emphasis added) (internal quotation marks omitted). As a result, in Acha, we held that the defendant's arrest was based on and justified by a violation of his original conviction's bail conditions, and at that time he had not yet been charged with the separate offense of failing to appear before a court. Id. at 30. With respect to that separate offense, "[i]t was only upon his [later] indictment that the time periods of the Speedy Trial Act were triggered." Id. at 30-31. We also held that when an escaped prisoner is arrested and later indicted for escape, the "delay between a prisoner's recapture and his subsequent indictment for escape does not violate his right to a speedy trial," because *689 such defendants are subject to recapture based on the original conviction. Id. at 31.
Similarly, we have held that where there is a civil federal arrest, for instance on deportation charges, such an arrest does not trigger the 30-day clock for any criminal charges the government might bring, because such arrests are typically not "in connection with" the later federal charge. United States v. Garcia-Martinez, 254 F.3d 16, 19 (1st Cir.2001).
Where a state arrest takes place and the United States later files a complaint and a detainer seeking to prosecute that individual, there is no federal "arrest" under the Act, as the individual is in custody based on state law violations. See, e.g., United States v. Taylor, 814 F.2d 172, 175 (5th Cir.1987); United States v. Copley, 774 F.2d 728, 730 (6th Cir.1985).
Finally, in the Sixth Amendment speedy trial context, we have addressed the question of when the right to a speedy trial attaches when a defendant has a complaint filed against him, is thereafter taken into custody for an unrelated crime, and is subsequently indicted. Rashad v. Walsh, 300 F.3d 27, 35 (1st Cir.2002). We held that the Sixth Amendment right did not attach until indictment, because the state arrest was "of no consequence unless that detention was related to the charges on which his speedy trial claim is based." Id. at 36.
While none of these decisions are directly on-point, they provide analogues to the situation presented here. Kelly was initially arrested for an entirely separate crime[6] on the basis of a warrant issued by the Western District of New York. That marked the beginning of restraints on Kelly's liberty based on the New York charge. That arrest was not "in connection with" the Maine charges, as they related to entirely separate facts, and the Maine complaint had not even been filed at the time Kelly was arrested. The writ ad prosequendum did not change any of this: Kelly was at all relevant times in custody pursuant to the Western District's authority, as the writ merely loaned him to the District of Maine for appearance. He was subject to detention based on the Western District warrant, not the Maine warrant, and the Western District charges remained the basis of his detention throughout the Maine proceedings. As a result, the STA's 30-day arrest to indictment provision was not triggered in this case,[7] as there was no arrest or issuance of a summons in connection with the Maine charges.
We further note that this holding does not raise the danger of indefinite detention under the writ pending trial, or of prejudicial pre-indictment delay, because a variety of safeguards beyond the STA exist to ensure that the criminal process moves forward expeditiously. The court issuing the writ ad prosequendum has, inter alia, supervisory authority under Rule 48 of the Federal Rules of Criminal Procedure to "dismiss an indictment, information, or complaint if unnecessary delay occurs in: (1) presenting a charge to a grand jury; (2) filing an information against a defendant; or (3) bringing a defendant to trial." Fed.R.Crim.P. 48(b). This rule is a "restatement of the inherent power of the *690 court to dismiss a case for want of prosecution," United States v. Correia, 531 F.2d 1095, 1099 (1st Cir.1976) (internal quotation mark omitted), and can sometimes be exercised in situations where the Sixth Amendment or STA might not apply. See Id. Facts such as these may also raise constitutional restraints.
There was no injustice here. Kelly chose to prolong his detention in Maine under the writ in order to attempt to negotiate plea agreements favorable to him in both Maine and New York.

IV.
Because the 30-day arrest to indictment clock was not triggered, there was no Speedy Trial Act violation and the motion to dismiss was properly denied. We affirm the judgment of the district court.
NOTES
[1]  Other orders were issued in the Western District of New York, excluding various segments of time from the STA period for that case.
[2]  "Habeas corpus" is a "generic term" which includes a variety of "species of that writ." Ex parte Bollman, 8 U.S. 75, 95, 4 Cranch 75, 2 L.Ed. 554 (1807). The most commonly seen form is the "Great Writ" of habeas corpus ad subjiciendum, which allows for an inquiry into the cause of restraint. Carbo v. United States, 364 U.S. 611, 615, 81 S.Ct. 338, 5 L.Ed.2d 329 (1961); Bollman, 8 U.S. at 95. The writ of habeas corpus ad testificandum is used to bring prisoners "into court to testify." 28 U.S.C. § 2241(c)(5); Bollman, 8 U.S. at 98. Other forms exist as well. See Bollman, 8 U.S. at 97-98.
[3]  Here, the writ ordered Kelly's custodian, the Buffalo Federal Detention Facility, as well as the United States Marshal for the district, to produce Kelly at the date and time specified in the writ.
[4]  A court issuing a writ ad prosequendum "suffers no geographical limitations" in use of the writ, Carbo, 364 U.S. at 620, 81 S.Ct. 338, and thus may issue such writs to other districts, in contrast to the Great Writ, which was "issuable only in the district of confinement," id. at 618, 81 S.Ct. 338.
[5]  Based on this reasoning, courts have concluded that where a state prisoner is in federal custody pursuant to such a writ, that time is credited to the state, rather than federal, sentence. See, e.g., Easley v. Stepp, 5 Fed. Appx. 541, 543 (7th Cir.2001); Crawford v. Jackson, 589 F.2d 693, 695-96 (D.C.Cir. 1978). One court has similarly concluded that the issuance of such a writ does not "effect a transfer of custody" for purposes of 18 U.S.C. § 751(a), which makes escape from federal custody a crime. United States v. Evans, 159 F.3d 908, 911-12 (4th Cir.1998).
[6]  We need not address here what rule might apply where "a defendant has not yet been convicted but is arrested on one charge and later indicted for a similar charge" in another jurisdiction, as such facts are not present. Acha v. United States, 910 F.2d 28, 31 (1st Cir.1990) (per curiam). Kelly's New York offense of escape from custody was entirely unrelated to his Maine identity theft charges.
[7]  By contrast, the 70-day indictment to trial requirement of § 3161(c)(1) was triggered when the indictment was filed and made public.
