
    Leiticia CASTANEDA, Petitioner, Appellee, v. Steve SOUZA, Superintendent, Bristol County House of Corrections, in his official capacity and his successors and assigns, Respondent, Appellant, Bruce E. Chadbourne, Field Office Director, Boston Field Office, Office of Detention and Removal, U.S. Immigrations and Customs Enforcement, U.S. Department of Homeland Security, in his official capacity and his successors and assigns; John T. Morton, Director, U.S. Immigration and Customs Enforcement, U.S. Department of Homeland Security, in his official capacity and his successors and assigns; Jeh Johnson, Secretary, U.S. Department of Homeland Security, in his official capacity and his successors and assigns; Eric H. Holder, Jr., Attorney General, U.S. Department of Justice, in his official capacity and his successors and assigns, Respondents. Clayton Richard Gordon, on behalf of himself and others similarly situated, Petitioner, Appellee, Preciosa Antunes; Gustavo Ribeiro Ferreira; Valbourn Sahidd Lawes; Nhan Phung Vu, Petitioners, v. Eric H. Holder, Jr., United States Attorney General; John Sandweg, Acting Director; Sean Gallagher, Acting Field Office Director; Christopher J. Donelan; Michael G. Belotti, Sheriff; Steven W. Tompkins, Sheriff; Thomas M. Hodgson, Sheriff; Joseph D. McDonald, Jr., Sheriff; Rand Beers, Acting Secretary of Homeland Security, Respondents, Appellants.
    Nos. 13-1994, 13-2509.
    United States Court of Appeals, First Circuit.
    Oct. 6, 2014.
    
      Elianis N. Pérez, Senior Litigation Counsel, United States Department of Justice, Civil Division, Office of Immigration Litigation, with whom Sarah B. Fabian, Trial Attorney, District Court Section, Stuart F. Delery, Assistant Attorney General, Civil Division, Colin A. Kisor, Director, Office of Immigration Litigation, and Elizabeth J.' Stevens, Assistant Director, were on brief, for respondents-appellants Steve Souza, Eric H. Holder, Jr., John Sandweg, Sean Gallagher, Christopher J. Donelan, Michael G. Bellotti, Steven W. Tompkins, Thomas M. Hodgson, Joseph D. McDonald, Jr., and Jeh C. Johnson.
    Gregory Romanovsky, with whom Livia Lungulescu and Romanovsky Law Offices were on brief, for appellee Castañeda.
    Matthew R. Segal, with whom Adriana Lafaille, American Civil Liberties Union of Massachusetts, Judy Rabinovitz, Eunice Lee, Michael Tan, ACLU Foundation Immigrants’ Rights Project, Elizabeth Badger, and Lutheran Social Services were on brief, for appellee Gordon.
    Alina Das, Sean McMahon, Legal Intern, Etan Newman, Legal Intern, and Washington Square Legal Services, Inc., Immigrant Rights Clinic, on brief for Detention Watch Network, Families for Freedom, Greater Boston Legal Services, Harvard Immigration and Refugee Clinical Program, Immigrant Defense Project, Immigrant Rights Clinic, Maine People’s Alliance, National Immigrant Justice Center, Political Asylum/ Immigration Representation (PAIR) Project, University of Maine School of Law Immigrant and Refugee Rights Clinic, as-amici curiae in support of petitioners-appellees Castañeda & Gordon.
    Prasant D. Desai and Iandoli & Desai, P.C., on brief for American Civil Liberties Union Foundation, American Civil Liberties Union Foundation of Massachusetts, American Immigration Lawyers Association, and the National Immigration Project of the National Lawyers Guild, as amici curiae in support of petitioner-appellee Castañeda.
    Before TORRUELLA, DYK, and THOMPSON, Circuit Judges.
    
      
       Of the Federal Circuit, sitting by designation.
    
   DYK, Circuit Judge.

In these consolidated habeas cases, we must determine whether the petitioners, two aliens, are subject to the mandatory-detention provision of the Immigration and Nationality Act, 8 U.S.C. § 1226(c). Subsection 1226(c) provides that the Attorney General “shall take into custody any alien,” who has committed certain predicate crimes, “when the alien is released.” Unlike other aliens facing the possibility of removal from the United States, aliens subject to mandatory detention are generally ineligible for bail even if they show to the Attorney General’s satisfaction that they are not dangerous and are likely to appear at removal hearings.

Each of the petitioners here committed a predicate crime listed in § 1226(c) but was not taken into custody by the Attorney General until years after being released from state custody. Because § 1226(c) only applies to aliens detained “when ... released” from criminal custody, and because the petitioners were not timely detained under any reasonable interpretation of the statute, we conclude that the petitioners are not subject to mandatory detention under § 1226(c) and are entitled to an individualized bail hearing under § 1226(a). We therefore affirm the district court’s grant of habeas corpus relief in each case.

I.

A.

The mandatory detention provision of section 1226, subsection (c), is part of a section of the Immigration and Nationality Act which governs the arrest and detention of aliens subject to removal from the United States. See generally 8 U.S.C. § 1226. The general rule under that section is that aliens arrested and charged with removal may be released on bond pending removal proceedings:

(a) Arrest, detention, and release
On a warrant issued by the Attorney General, an alien may be arrested and detained pending a decision on whether the alien is to be removed from the United States. Except as provided in subsection (c) [the mandatory detention provision] of this section and pending such decision, the Attorney General—
(1) may continue to detain the arrested alien; and'
(2) may release the alien on—
(A) bond of at least $1,500 ...; or
(B) conditional parole....

Id. § 1226(a) (emphasis added). The statute thus provides that after an alien’s arrest the Attorney General “may continue to detain the arrested alien” or “may release the alien” on bond or parole. Id. § 1226(a)(1), (2). We refer to this provision, subsection (a), as the general detention provision. The general detention provision does not require the Attorney General to release an alien under any particular circumstances, nor does it limit the factors that the Attorney General may consider in deciding whether to detain or release an alien. See id.

The process by which the Attorney General determines whether an alien will be released on bond pursuant to subsection (a) is governed by administrative regulations. See generally 8 C.F.R. § 1236.1. The first step in the' process is a bond determination by an immigration enforcement officer. See id. § 1236.1(c)(8). To be released, an alien must prove “to the satisfaction of the officer” that his release would not endanger other persons or property and that he is likely to appear for any future proceedings. Id. Release may be revoked (if it is granted at all) “at any time in the discretion of’ the immigration enforcement officer. Id. § 1236.1(c)(9).

An alien dissatisfied with his initial bond determination may request a redetermination of bond by an administrative immigration judge. Id. § 1236.1(d)(1). The immigration judge applies the same standard as the enforcement officials and reaches an independent judgment about the alien’s eligibility for release. See id. If the alien is still dissatisfied with his bond decision, he may take a further appeal to the Board of Immigration Appeals (BIA). Id. § 1236.1(d)(3).

No judicial review is available for an alien’s bond determination. The statute provides:

The Attorney General’s discretionary judgment regarding the application of this section shall not be subject to review. No court may set aside any action or decision by the Attorney General under this section regarding the detention or release of any alien or the grant, revocation, or denial of bond or parole.

8 U.S.C. § 1226(e). Thus, the exclusive authority to make and review bond determinations lies with the executive branch, whose discretionary decisions are generally immune from review in Article III courts.

B.

The mandatory detention provision, § 1226(c), is framed as an exception to § 1226(a)’s general detention provision. See id. § 1226(a) (“Except as provided in subsection (c).... ”). Under this exception, aliens who have committed one or more predicate crimes are to be detained by the Attorney General “when ... released” from criminal custody, and may not be released on bond except in rare circumstances not present here. The sole procedural safeguard for such aliens is a “Joseph” hearing at which the alien “may avoid mandatory detention by demonstrating that he is not an alien, was not convicted of the predicate crime, or that the INS [now ICE] is otherwise substantially unlikely to establish that he is in fact subject to mandatory detention.” Demore v. Kim, 538 U.S. 510, 514 n. 3, 123 S.Ct. 1708, 155 L.Ed.2d 724 (2003); see also 8 C.F.R. § 3.19(h)(2)(h); In re Joseph, 22 I. & N. Dec. 799 (BIA 1999).

The predicate crimes for mandatory detention include aggravated felonies, crimes of moral turpitude, human trafficking, certain firearm offenses, treason, espionage, terrorism, and various others. See id. § 1226(c)(1)(A)-(D). Of relevance here, they also include violations of state, federal, or foreign laws relating to controlled substances, from drug trafficking to simple possession. See id. §§ 1226(c)(1)(A), 1182(a)(2). As this court held in Saysana v. Gillen, 590 F.3d 7, 15-17 (1st Cir.2009), mandatory detention is limited to situations in which the alien is released from custody related to one of the predicate crimes.

The relevant text of subsection (c) reads as follows:

(c) Detention of criminal aliens
(1) Custody
The Attorney General shall take into custody any alien who—
(A) is inadmissible by reason of having committed any offense covered in section 1182(a)(2) of this title,
(B) is deportable by reason of having committed any offense covered in section 1227(a)(2)(A)(ii), (A)(iii), (B), (C), or (D) of this title,
(C) is deportable under section 1227(a)(2)(A)(i) of this title on the basis of an offense for which the alien has been sentence[d] to a term of imprisonment of at least 1 year, or
(D) is inadmissible under section 1182(a)(3)(B) of this title or deportable under section 1227(a)(4)(B) of this title,
when the alien is released, without regard to whether the alien is released on parole, supervised release, or probation, and without regard to whether the alien may be arrested or imprisoned again for the same offense.
(2) Release
The Attorney General may release an alien described in paragraph (1) only if the Attorney General decides pursuant to [18 U.S.C. § 3521] that release of the alien from custody is necessary [for witness protection in a major criminal case], and the alien satisfies the Attorney General that the alien will not pose a danger to the safety of other persons or of property and is likely to appear for any scheduled proceeding. A decision relating to such release shall take place in accordance with a procedure that considers the severity of the offense committed by the alien.

8 U.S.C. § 1226(c) (emphasis added). Thus, the effect of § 1226(c) is to deny individualized bond hearings during which the Attorney General has the discretion to determine whether to detain the individual. The central issue in this case relates to the phrase “when the alien is released.”

C.

In Demore v. Kim, 538 U.S. 510, 123 S.Ct. 1708, 155 L.Ed.2d 724, the Supreme Court held that § 1226(c)’s mandatory detention scheme is not facially unconstitutional. The alien in Demore had been detained the day after his release from state custody. Kim v. Ziglar, 276 F.3d 523, 526 (9th Cir.2002). He argued that § 1226(c) violates due process because it allows the Attorney General to detain an alien indefinitely without a finding that the alien is dangerous or a flight risk. Demore, 538 U.S. at 514, 123 S.Ct. 1708. The Supreme Court rejected that argument, .concluding that aliens falling under § 1226(c) may constitutionally be detained “for the brief period necessary for their removal proceedings.” Id. at 513, 123 S.Ct. 1708. The Court distinguished an earlier case, Zadvydas v. Davis, 533 U.S. 678, 121 S.Ct. 2491, 150 L.Ed.2d 653 (2001), which held that aliens whose deportation is unfeasible (e.g., because no country will accept them) cannot be held indefinitely unless the government demonstrates a continued need for their detention. Demore, 538 U.S. at 528, 123 S.Ct. 1708. “While the period of detention at issue in Zadvydas [after the statutory deadline for an alien’s removal has passed] was ‘indefinite’ and ‘potentially permanent,’ the detention [under § 1226(c)] is of a much shorter duration.” Id. (citation omitted). Statistics cited by the Court showed that most removal cases were completed in a few months and the remainder, on average, were completed in just four months more. Id. at 529, 123 S.Ct. 1708.

While the Court’s opinion in Demore did not articulate limits on the permissibility of mandatory detention, Justice Kennedy in joining the majority opinion made clear that in his view § 1226(c) should be construed in light of constitutional concerns if an alien’s detention became unreasonable or unjustified. Demore, 538 U.S. at 532, 123 S.Ct. 1708 (Kennedy, J., concurring). Since Justice Kennedy’s vote was necessary to the majority, his limiting rationale is binding on us.

Justice Kennedy began his concurrence by noting that, since mandatory detention under § 1226(c) is “premised upon the alien’s deportability,” due process requires “individualized procedures” such as a Joseph hearing to ensure that the alien is in fact deportable. Id. at 531-32, 123 S.Ct. 1708 (Kennedy, J., concurring). “For similar reasons,” he continued, “since the Due Process Clause prohibits arbitrary deprivations of liberty, a lawful permanent resident alien such as respondent could be entitled to an individualized determination as to his risk of flight and dangerousness if the continued detention became unreasonable or unjustified.” Id. at 532, 123 S.Ct. 1708. “Were there to be an unreasonable delay by [ICE] in pursuing and completing deportation proceedings, it could become necessary then to inquire whether the detention is not to facilitate deportation, or to protect against risk of flight or dangerousness, but to incarcerate for other reasons.” Id. at 532-33, 123 S.Ct. 1708 (emphasis added).

Justice Kennedy’s concurrence thus suggests that an “unreasonable delay by [ICE] in pursuing ... deportation proceedings” could make mandatory detention under subsection (c) constitutionally suspect and requires a limiting construction. We must determine here whether the government’s years-long delay means that the petitioners are entitled to an individualized bond hearing under § 1226(a), or if they are subject to mandatory detention under § 1226(c).

ÍL

A.

Leiticia Castaneda is a native and citizen of Brazil. Castaneda entered the United States without inspection (illegally, that is) in 2000. Castaneda was seventeen years old at the time. In 2008, Castaneda was arrested for possession of cocaine, a misdemeanor under Massachusetts law and listed predicate for mandatory detention under § 1226(c). See Mass. Gen. Laws Ch. 94C, § 34; 8 U.S.C. §§ 1226(c)(1)(A), 1182(a)(2)(A)(i)(II) (listing as a predicate for mandatory detention “a[ny] violation of ... any law or regulation ... relating to a controlled substance.... ”). It is unclear whether Castaneda remained in police custody or pretrial detention after her arrest. On October 6, 2008, Castaneda was convicted and released on probation, from which she was discharged in February 2010. Since her release, according to the Detention Watch Network Amici Br. at 16-18, Castaneda has begun living with her son, has been working as a night cleaner, has cooperated with police in an effort to prosecute a man who had abused her, and has applied for a U Visa (a type of visa set aside for victims of certain crimes).

In March 2013, four and a half years after her conviction and release in 2008, Castaneda was arrested, detained, and charged with removal by ICE agents. The stated ground for removal was Castaneda’s inadmissibility due to her cocaine possession conviction. Castaneda appears not to have disputed her criminal status or removability. She did, however, seek release on bond for the duration of her removal proceedings under § 1226(a). An immigration judge denied her request for release, finding that she was subject to mandatory detention under § 1226(c).

Castaneda then filed a petition for writ of habeas corpus in the District of Massachusetts. The petition alleged that Castaneda’s detention without opportunity for release on bond was unauthorized by law because she was not detained “when ... released” from criminal custody as required by § 1226(c). The petition requested that the district court order an individualized bond hearing and bond re-determination before an immigration judge.

After a hearing, the district court granted Castaneda’s petition and issued a writ of habeas corpus ordering the government to release Castaneda unless it provided her a bond hearing within ten days. The court reasoned that the most natural reading of “when released” was “immediately upon release,” and therefore, in light of the statutory context, statutory structure, the rule of lenity, and the absence of congressional intent to the contrary, section 1226(c) applies only to criminal aliens who have been detained immediately upon release from criminal custody or within a reasonable time thereafter. A few days later, prior to the scheduled hearing, the government released Castaneda on her own recognizance.

B.

Clayton Gordon is a native and citizen of Jamaica. Gordon arrived in the United States as a lawful permanent resident in 1982, at the age of six. Between 1994 and 1999, Gordon served in the National Guard and on active duty with the U.S. Army. He received an honorable discharge in 1999.

Gordon was arrested in 2008 after police found cocaine in his home. He was released from custody later that day. He subsequently pled guilty to possession of narcotics with intent to sell, a violation of Connecticut law. See Conn. Gen.Stat. § 21a-277(a). On September 30, 2009, Gordon was sentenced to seven years imprisonment, execution suspended, with a three-year probationary term. He completed his probation in October 2012. Since 2008, he has developed significant ties to the community — in 2008, he met the woman who has since become his fiance; they have a child together, born in 2010; they own a home in Bloomfield, Connecticut; he has developed a successful business; and he has worked on a project to open a halfway house for women released from incarceration.

Gordon was arrested and detained by ICE on June 20, 2013, more than four years after his release from state custody. The stated basis for removal was 8 U.S.C. § 1227(a)(2)(A)(iii), which states than an alien shall be deportable if he is convicted of any aggravated felony after being admitted to the United States. Gordon challenged his deportability, but was denied relief after an immigration judge agreed that Gordon’s cocaine conviction was an aggravated felony under § 1227(a)(2)(A)(iii). Thereafter, Gordon was held pursuant to the mandatory detention provision without opportunity for a bond hearing to establish whether he may be released during the removal proceedings.

On August 8, 2013, Gordon filed a petition for writ of habeas corpus in the District of Massachusetts. The petition' argued that he was not subject to the mandatory detention provision because he was not taken into immigration custody “when ... released” from state criminal custody. Gordon sought an individualized bond hearing at which he could establish his entitlement to release on bond.

After a hearing, the district court granted Gordon’s petition for writ of habeas corpus, instructing the government to provide Gordon with a bond hearing. The court held that “when released” should be interpreted to mean “at the time of release,” plus a reasonable time thereafter. The court rejected the idea that a five year gap was reasonable and rejected the government’s argument that “when released” indicated the time at which it can begin to act as “flatly implausible.” Gordon was given a bond hearing and was released on bond of $25,000 on November 18, 2013.

C.

The government appeals, and we have jurisdiction under 28 U.S.C. § 1291. We note that subsection 1226(e) prohibits judicial review of “[t]he Attorney General’s discretionary judgment regarding the application of [§ 1226],” including “any action or decision ... regarding the detention or release of any alien or the grant, revocation, or denial of bond or parole.” 8 U.S.C. § 1226(e). But subsection (e) does not bar our review of this case because Castaneda and Gordon do not challenge any “discretionary judgment” of the Attorney General; rather, they challenge the statutory basis for their detention. Habe-as petitions bringing legal or constitutional challenges to an alien’s detention under § 1226 are not subject to subsection (e)’s prohibition of judicial review. Sylvain v. Attorney General, 714 F.3d 150, 155 n. 4 (3d Cir.2013); Singh v. Holder, 638 F.3d 1196, 1200-01 (9th Cir.2011); Al-Siddiqi v. Achim, 531 F.3d 490, 494 (7th Cir.2008); Demore, 538 U.S. at 517, 123 S.Ct. 1708.

III.

In these appeals the government asks for reversal of the grant of habeas corpus to Castaneda and Gordon and a determination that they are subject to mandatory detention. In the government’s view, § 1226(c) subjects an alien to detention without bail at any time after release, including years later, and detention can continue years after release while the alien fights removal. We think the government’s view of § 1226(c) is incorrect, and that in Justice Kennedy’s phrase the government in these cases has “unreaso-nabl[y] delay[ed] ... in pursuing ... deportation proceedings.” Demore, 538 U.S. at 532, 123 S.Ct. 1708.

A.

We first address the meaning of the “when ... released” clause in § 1226(c). The government admits that this language could mean immediately after release, but contends that this language is ambiguous because it could also mean any time after, but not before, release. According to the government, ‘when released’ can plausible be read to “signiffy] that Congress did not want DHS to preempt state and federal law enforcement officials by trying to take criminal aliens into immigration custody before they [completed their term of non-DHS criminal custody....” Gov’t Gordon Br. 24. The government argues that Chevron deference requires adopting this construction. The petitioners contend that it unambiguously means “immediately” and no later than 48 hours. We think neither interpretation is correct.

The government’s proposed interpretation — “at any time after release,” but not before release — is simply inconsistent with the plain meaning of the term “when” in this context. To be sure, the term “when” can be used in different ways. The Random House Dictionary of the English Language lists three potentially relevant senses: “at the time or in the event that,” “at any time that; whenever,” and “upon or after which; and then.” Random House Dictionary of the English Language 1626 (1981 ed.). See also Webster’s Third New International Dictionary 2602 (1993 ed.) (listing four: “at or during the time that,” “just after the moment that,” “at any and every time that,” and “in the event that”); American Heritage Dictionary 2032 (3d ed.1992) (listing four: “at the time that,” “as soon as,” “whenever,” and “during the time which; while”); 20 Oxford English Dictionary (“OED”) 209 (2d ed.1989) (listing two principal senses: “[a]t the (or a) time at which; on the (or an) occasion on which”).

The government is correct in its assertion that one sense of “when” is similar in meaning to the word “after,” that is, not before. The government contends that it is in this conditional sense that the word “when” is used in this statute. The government relies on dictionary definitions and cases pertaining to the use of “when” in the conditional sense — meaning, roughly, “if” or “in the event that.” See Random House, supra, at 1626 (“at any time; whenever”); 20 OED, supra, at 209 (“[i]n-definitely or generally: [a]t any time, or at the several times, at which; on any occasion that”); Webster’s Third, supra, at 2602 (“in the event that: on condition that”); American Heritage, supra, at 2032 (“[w]henever”); Random House, supra, at 1626 (“upon or after which”).

The Supreme Court’s decision in United States v. Willings demonstrates both that the word “when” is not used in § 1226(c) in the conditional sense and that, even if it were, the statute would require detention within a reasonable period of time after' release. There, a federal maritime statute provided that “when any ship or vessel ... registered pursuant to this act ... shall in whole or in part be sold or transferred to a citizen, or citizens of the United States ..., in every such ease the said ship or vessel shall be registered anew.” 8 U.S. (4 Cranch) 48, 49, 2 L.Ed. 546 (1807) (quoting Act of Dec. 31, 1792, § 14). In subsequent sentences, the statute used the phrase “in every such case” or “in every case” repeatedly. See id. Chief Justice Marshall explained that the correct understanding of the word “when” in that statute was “that it describes the occurrence which shall render [re-registration] necessary,” rather than “designating] the precise time when [re-registration] must be performed.” Id. at 55-56.

In contrast to the statute at issue here, the statute in Willings repeatedly employed the phrase “in every such case,” strongly suggesting that “when” was intended in the conditional sense, rather than the temporal sense. We think it clear that § 1226(c) does not use the word “when” in the conditional sense, as if to distinguish between a case where the alien is released from state custody and a case where he is not. The detention and deportation of an alien under § 1226(c) is prem-' ised on the notion that the alien has been released from state custody; there is no need for § 1226(c) to specify it. There was no congressional concern in connection with subsection 1226(c) that the Attorney General might detain the alien before release from state custody. Indeed, Congress has already provided in 8 U.S.C. § 1231(a)(4)(A) that an alien typically could not be detained before release from state or federal custody.

Writings, moreover, makes clear that “when,” used in the conditional sense, means that the specified action must be taken within a reasonable period of time after the triggering event or condition. Id. at 56 (rejecting that “when” means the “precise time,” and explaining that a ship must be allowed “a reasonable interval” of time after transfer or sale in which to register, “depending] on the nature of the case”). There is no textual support for the government’s argument that “when ... released” means “at any time after release.”

Nor do the structure, purpose, or legislative history of the statute suggest that Congress contemplated automatic detention’s being imposed years after an alien’s release from custody. The § 1226(c) cases on which the government relies for support merely describe Congress’s generalized intent to detain criminal aliens in order to protect the community and ensure swift deportation. See, e.g., Demore, 538 U.S. at 518-21, 123 S.Ct. 1708; Sylvain, 714 F.3d at 159; Hosh v. Lucero, 680 F.3d 375, 381 (4th Cir.2012). But this court explained in Saysana that such generalized statements of legislative intent “paint[ ] with far too broad a brush” to be given controlling weight in interpreting § 1226. 590 F.3d at 17. “The mandatory detention provision does not reflect a general policy in favor of detention; instead, it outlines specific, serious circumstances under which the ordinary procedures for release on bond at the discretion of the immigration judge should not apply.” Id. at 17. So too here, we cannot adopt the government’s interpretation of the statute just because Congress had a general concern for detaining criminal aliens “when ... released” from custody.

When the government has delayed several years before arresting an alien, the presumption of dangerousness and flight risk is eroded by the years in which the alien lived peaceably in the community. As this court explained in Saysana,

it is counter-intuitive to say that aliens with potentially longstanding community ties are, as a class, poor bail risks. The affected aliens are individuals who committed an offense, and were released from custody for that offense, more than a decade ago. They have continued to live in the United States. By any logic, it stands to reason that the more remote in time a conviction becomes and the more time after a conviction an individual spends in a community, the lower his bail risk is likely to be.

590 F.3d at 17.

Finding no support in the statute’s text, structure, purpose, or legislative history, we reject the government’s argument that “when ... released” could mean “at anytime after release,” but not before release.

This leads us to the petitioner’s interpretation. While we reject the “at any time after” interpretation, we also think that, contrary to the petitioners, “when ... released” does not mean “immediately upon release, without interruption.” Nothing in subsection 1226(c) compels such a reading of the phrase. As the dictionaries show, the temporal sense of “when” typically connotes a degree of immediacy. See American Heritage, supra, at 2032 (defining, “when” as “as soon as” and giving the following example: “I’ll call you when I get there.’’); 20 OED, supra, at 209 (“[s]ometimes implying suddenness: = and just then, and at that moment”); Webster’s Third, supra, at 2602 (“just after the moment that”). This is confirmed by common usage. One would not say “stop writing when the bell rings” to mean “any time after the bell rings, even hours later.” See Webster’s Third, supra, at 2602 Thus, “when” in this context connotes temporal immediacy. See Random House, supra, at 1626; 20 OED, supra, at 209; Webster’s Third, supra, at 2602; American Heritage, supra, at 2032. But, what constitutes immediacy is be determined by context.

It seems quite unlikely that Congress intended § 1226(c) to require the strict immediacy advocated by the petitioners. Practically speaking, the government cannot always detain criminals at the precise moment of their release from state custody. For one thing, such immediate detention requires foreknowledge of an alien’s impending release from custody, for which the government must depend on the cooperation of state and local authorities. This cooperation is often less than perfect. Indeed, at least one state adjacent to this circuit recently passed legislation curtailing its cooperation with ICE in detaining aliens convicted of crimes. See An Act Concerning Civil Immigration Detainers, Pub. Act No. 13-155, § 1 (Conn. 2013) (codified at Conn. GemStat. § 54-192h). The government credibly argues that such action has “great potential to impact ICE’s ability to identify criminal aliens in state and local criminal custody.” Castaneda Reply Br. 9 n. 5. It would make little sense to interpret the statute to strictly require immediate detention in all cases, since that is an impossible task, as Congress recognized.

“Words, like syllables, acquire meaning not in isolation but within their context.” K Mart v. Cartier, 486 U.S. 281, 319, 108 S.Ct. 1811, 100 L.Ed.2d 313 (1988) (Scalia, J., concurring in part and dissenting in part). Based on the textual context, we interpret § 1226(c) as requiring that criminal aliens be detained within a reasonable time after their release from state criminal custody, and that what is a reasonable time must account for the inherent difficulties in identifying and locating an alien upon release from state custody. The statute does not tolerate unreasonable delays, but neither does it require strict immediacy.

As in Witlings, the reasonable time within which the government must detain an alien to satisfy the “when ... released” clause will depend on the practical necessities at hand. Since what is reasonable under the circumstances is not defined in the statute, we think the statute is ambiguous in that respect. As in other cases of statutory ambiguity, the Attorney General therefore has considerable latitude to define what constitutes a reasonable time under the Chevron framework.

Under Chevron, the interpretation must be a reasonable interpretation of the statute. Chevron, U.S.A. v. Natural Res. Def. Council, Inc., 467 U.S. 837, 845, 104 S.Ct. 2778, 81 L.Ed.2d 694 (1984). As discussed above, “when ... released” cannot mean “any time after release.” Nor do we think it would be a reasonable interpretation to view a reasonable period of time as including a delay of several years. As we discuss below, the objectives of the statute are inapplicable in such situations and enforcing such detentions would be arbitrary in the extreme. We think it plain that the petitioners were not detained within a reasonable time after their detention, and that the “when ... released” clause was not satisfied here. Here, as in Saysana, this court is “not persuaded that the legislature was seeking to justify mandatory immigration custody many months or even years after an alien had been released from state custody.” Saysana, 590 F.3d at 16 (quoting Quezada-Bucio v. Ridge, 317 F.Supp.2d 1221, 1230 (W.D.Wash.2004)).

B.

Notwithstanding our conclusion that the “when ... released” requirement was not met here, the government claims support in a line of Supreme Court cases holding that failure to comply with a statutory deadline did not deprive the government of authority to act. See, e.g., Barnhart v. Peabody Coal Co., 537 U.S. 149, 158-63, 123 S.Ct. 748, 154 L.Ed.2d 653 (2003); United States v. Montalvo-Murillo, 495 U.S. 711, 717-720, 110 S.Ct. 2072, 109 L.Ed.2d 720 (1990). Those so-called “loss of authority” cases do not support the government’s view that aliens are subject to mandatory detention even when the requirements of § 1226(c) are not complied with.

In our view, those loss of authority cases fall into two discrete categories. On the one hand there are cases that involve housekeeping provisions — that is, time limitations that are procedural, horatory, advisory, or precatory, and are designed to regulate the functioning of the government and “spur” the government into action (see Brock v. Pierce Cnty. 476 U.S. 253, 265, 106 S.Ct. 1834, 90 L.Ed.2d 248 (1986)), rather than to confer rights on regulated parties. An example of such a case is Barnhart, where the Court held that the Commissioner of Social Security retained authority to take certain actions under the Coal Industry Retiree Health Benefit Act despite failure to comply with the statutory deadline. 537 U.S. at 158-63, 123 S.Ct. 748. Similarly, in Brock, the Court upheld the Secretary of Labor’s authority to order the repayment of misused grant funds even though the audit that led to the repayment order was not completed within the time given by the statute. 476 U.S. at 266, 106 S.Ct. 1834. The general rule in such cases is that, “if a statute does not specify a consequence for noncompliance with statutory timing provisions, the federal courts will not in the ordinary course impose their own coercive sanction.” United States v. James Daniel Good Real Property, 510 U.S. 43, 63, 114 S.Ct. 492, 126 L.Ed.2d 490 (1993).

On the other hand, there is another category of cases such as Montalvo-Mu-rillo, in which the statute is not a housekeeping provision but is rather designed to protect the rights of individuals. In such circumstances a more nuanced approach is required.

We first address whether this statute falls in the housekeeping category. Two other circuits have concluded that it does, and therefore ruled that aliens such as the petitioners were subject to mandatory detention despite years-long delays by the government. See Sylvain,. 714 F.3d at 159 (“[T]he mandatory-detention statute is intended to protect only the public.... ”); Hosh, 680 F.3d at 382 (“[Section] 1226 was undeniably not written for the benefit of criminal aliens facing deportation like Hosh.” (emphasis removed)). We disagree.

In determining the congressional purpose behind § 1226(c) we must consider not only the provision’s legislative history (which admittedly does not suggest a purpose to benefit alien detainees) but also constitutional considerations. We think the “when ... released” clause must be construed as benefitting aliens detained years after release in order to avoid constitutional doubts. Avoidance of constitutional doubt is a “cardinal principle of statutory interpretation.” Zadvydas, 533 U.S. at 689, 121 S.Ct. 2491 (quoting Crowell v. Benson, 285 U.S. 22, 62, 52 S.Ct. 285, 76 L.Ed. 598, (1932) (internal quotation marks omitted)). As the Supreme Court has explained countless times, “when an Act of Congress raises a serious doubt as to its constitutionality, this Court will first ascertain whether a construction of the statute is fairly possible by which the question may be avoided.” Id. (quoting Crowell, 285 U.S. at 62, 52 S.Ct. 285 (internal quotation marks omitted)). This obligation requires us to attempt to find a constitutional purpose as well as a constitutional construction of the words of the statute. SKF USA, Inc. v. U.S. Customs and Border Protection, 556 F.3d 1337, 1353 (Fed.Cir.2009). We follow that guidance here.

Justice Kennedy cautioned in Demore that, “since the Due Process Clause prohibits arbitrary deprivations of liberty, a lawful permanent resident alien ... could be entitled to an individualized determination as to his risk • of flight and dangerousness if the continued detention became unreasonable or unjustified.” 538 U.S. at 532, 123 S.Ct. 1708 (Kennedy, J., concurring). He continued: “Were there to be an unreasonable delay by [ICE] in pursuing and completing deportation proceedings, it could become necessary then to inquire whether the detention is not to facilitate deportation, or to protect against risk of flight or dangerousness, but to incarcerate for other reasons.” Id. As a constitutional matter, mandatory detention can only be justified by the presumption of dangerousness and flight risk posed by newly released criminal defendants. But those who have resided in the community for years after release cannot reasonably be presumed either to be dangerous or flight risks. This is particularly so given the breadth of offenses to which 1226(c) applies, and the inclusion of offenses such as non-violent drug possession. Mandatory detention of such individuals years after release for such crimes raises serious constitutional questions. The government acknowledged at oral argument the harsh consequences of “uprooting these individuals from the community,” a feature which only underscores the arbitrary nature of the detention.

Despite its years-long delay in bringing removal proceedings after the petitioners’ release from criminal custody, the government has offered no explanation for either the delay or the eventual decision to prosecute in these individual cases or, for that matter, in the other cases where individuals have been detained years after release. Indeed, when the district court ordered that the petitioners be given bond hearings, the government released each one, thereby indicating that the government actually viewed them as neither dangerous nor likely to flee. Castaneda was even released on her own recognizance (i.e., without a monetary bond) and before her bond hearing even took place.

Mandatory detention of individuals such as the petitioners appears arbitrary on its face. We are left to wonder whether the petitioners’ sudden arrest and detention is not “to facilitate deportation, or to protect against risk of flight or dangerousness, but to incarcerate for other reasons,” which would offend due process. Zadvydas, 533 U.S. at 690, 121 S.Ct. 2491. Under these circumstances, we think § 1226(c) must be interpreted as designed to benefit alien detainees who were detained years after release from criminal custody in order to avoid constitutional concerns.

The government argues that even if § 1226(c) is not a housekeeping provision, but instead is read to benefit aliens who were released years earlier, Montalvo-Murillo supports its position. There, the Supreme Court addressed the Bail Reform Act’s requirement that a suspect held in pretrial custody must be given a bail hearing “immediately upon the person’s first appearance,” a provision designed to protect the rights of criminal defendants. 495 U.S. at 714, 110 S.Ct. 2072 (quoting 18 U.S.C. § 3142(f) (1988)). The Supreme Court nevertheless concluded that the failure to provide an immediate bail hearing did not deprive the government of all authority to hold the defendant. The Court expressed concern that, in ordering the suspect’s release, the lower courts had “invented]” a remedy unsupported by the statutory text: “Neither the timing requirements nor any other part of the Act can be read to require, or even suggest, that a timing error must result in release of a person who should otherwise be detained.” Id. at 716-17, 721, 110 S.Ct. 2072. Even if some remedy were required, the Court explained, “[w]e need seek only a practical remedy, not one that strips the Government of all authority to act.” Id. at 719, 110 S.Ct. 2072. “When, as here, there are less drastic remedies available for failure to meet a statutory deadline, courts should not assume that Congress intended the agency to lose its power to act.” Id. at 718, 110 S.Ct. 2072 (quoting Brock, 476 U.S. at 260, 106 S.Ct. 1834 (internal quotation marks omitted)).

The cases before us stand in stark contrast to Montalvo-Murillo, and the absence of the factors the Court found compelling there dictates the opposite result here. First, the district courts here did not “invent” a remedy unsupported by the statute’s text. Rather, the grant of limited habeas relief requiring a bond hearing reflected the structure of the detention provisions as a whole. Mandatory detention under subsection (c) is an exception; general detention under subsection (a) is the default rule. See § 1226(a) (“Except as provided in subsection (c).... ”). If subsection (c) does not apply, it follows naturally that subsection (a) does, and that the petitioners must be given a bond hearing. So unlike in Montalvo-Murillo, the remedy here comports with the text and structure of the statute.

Second, unlike Montalvo-Murillo, the district court decisions here did not strip the Attorney General of authority to detain the petitioners. Under section 1226(a) the Attorney General has broad and unreviewable discretion to determine whether individual aliens should be afforded release on bond. 8 U.S.C. § 1226(a)(1)-(2) (stating that the Attorney General “may continue to detain the arrested alien” and “may release the alien” on bond or parole, but placing no constraints on the Attorney General’s decision); id. § 1226(e) (prohibiting judicial review). In exercising this discretion, the Attorney General may adopt any regulation that “has a ‘reasonable foundation,’ ” meaning that it “rationally pursues a purpose that it is lawful ... to seek.” Reno v. Flores, 507 U.S. 292, 309, 113 S.Ct. 1439, 123 L.Ed.2d 1 (1993) (quoting Carlson v. Landon, 342 U.S. 524, 541, 72 S.Ct. 525, 96 L.Ed. 547 (1952)). The grant of habeas relief in these eases merely forced the Attorney General to consider releasing the petitioners. He retained full authority to decline.

Third, unlike Montalvo-Murillo, the remedy here is not drastic. The lower courts in Montalvo-Murillo “mandated] release of possibly dangerous defendants.” Montalvo-Murillo, 495 U.S. at 720, 110 S.Ct. 2072. The district courts here did no such thing. They did not order the petitioners’ release; they ordered that the petitioners be given a hearing at which the government has discretion to continue their detention if it finds them dangerous .or a flight risk. It was the government itself that determined to release Castaneda and Gordon.

In light of these significant differences, we think that Montalvo-Murillo does not apply here, and that violating the command of the statute for detention “when ... released” is properly enforced by requiring an individualized hearing.

IV.

Section 1226(c) requires detention of aliens such as the petitioners “when ... released.” Because the petitioners were not timely detained under any reasonable interpretation of the statute, we conclude that the petitioners are not subject to mandatory detention under § 1226(c). They are not subject to an irrebuttable presumption of dangerousness and flight risk, but are rather entitled to an individualized determination by the Attorney General of such factors. We therefore affirm the decisions of the district courts granting habe-as relief to the petitioners.

AFFIRMED

Costs to appellees. 
      
      . Predicate crimes under § 1226(c) cover a variety of offenses. Of note in this case, nonviolent drug possession is a predicate act. See 8 U.S.C. §§ 1226(c)(1)(B), 1227(A)(2)(B)(i).
     
      
      . Although the Attorney General now shares these responsibilities with the Secretary of Homeland Security (see Homeland Security Act of 2002, Pub.L. No. 107-296, §§ 402, 441, 116 Stat. 2135 (Nov. 25, 2002)), for convenience, we will refer to this authority as residing in the Attorney General and his assigns.
     
      
      . An alien may be released if the Attorney General concludes that his release is necessary for witness protection purposes related to a major criminal prosecution or investigation. 8 U.S.C. § 1226(c)(2). The alien must also demonstrate that he is not dangerous or a flight risk, as he would under general detention. Id.
      
     
      
      . See Bruno & Stillman, Inc. v. Globe Newspaper Co., 633 F.2d 583, 594-95 (1st Cir.1980) (construing the Supreme Court’s 5-4 decision in Branzburg v. Hayes, 408 U.S. 665, 92 S.Ct. 2646, 33 L.Ed.2d 626 (1972), to be limited by the concurring opinion of Justice Powell); accord, e.g., United States v. Smith, 135 F.3d 963, 968-69 (5th Cir.1998); see also United States v. District of Columbia, 654 F.2d 802, 806-07 (D.C.Cir.1981) (giving similar treatment to National League of Cities v. Usery, 426 U.S. 833, 96 S.Ct. 2465, 49 L.Ed.2d 245 (1976), in light of Justice Blackmun’s necessary concurrence).
     
      
      . The statute provides that Castaneda’s period of probation is not to' be considered in determining her date of release. § 1226(c)(1) ("... when the alien is released, without regard to whether the alien is released on parole, supervised release, or probation_”).
     
      
      . Gordon's petition also sought class-wide relief for all similarly situated individuals, but that claim is not before us. The decision on appeal is the district court’s grant of Gordon's individual petition. The class-wide claims remain pending before the district court.
     
      
      . The government contends that “[u]pon initiation of removal proceedings, however, the threat of removal becomes real, and the likelihood that a criminal alien will flee to evade proceedings only begins at that moment.” Gordon Reply Br. at 10. This theory is speculative and exists with respect to all detainees, not only to detainees who have been convicted of a predicate offense. Congress made no decision to apply mandatory detention to all detainees who become potential flight risks when detained. Rather, Congress focused on the predicate offense.
     
      
      . The government relies on In re Rojas, 23 I. & N. Dec. 117 (BIA 2001) for this construction, claiming that "[t]he BIA [] recognized that ‘when’ could mean ... at or after the specified point in time.” Gov't Gordon Br. 17. We do not read Rojas as interpreting "when” to mean "any time after.” Accord Sylvain v. Attorney Gen., 714 F.3d 150, 157 n. 9 (3d Cir.2013) ("The Board [in Rojas ] did not explicitly interpret the word 'when.' If anything, it suggested that 'when' denotes immediacy.”).
     
      
      . "[Text] should be construed reasonably, to contain all that it fairly means.” Scalia, J., A Matter of Interpretation, (1997).
     
      
      . The government’s briefs focus on the question of whether the "when ... released" clause is satisfied by the detention of an alien years after release from state custody. In the alternative, the government argues that paragraph (2) of subsection (c), bars release of the alien regardless whether the alien was taken into custody pursuant to paragraph (1), See 8 U.S.C. § 1226(c)(2) ("The Attorney General may release an alien described in paragraph (1) only if [narrow conditions are met].”). The government argues that the statute is ambiguous in that respect and that we must therefore defer to the BIA's decision in Rojas that paragraph (2) works independently of paragraph (1). We reject this argument because it is inconsistent with the language of the statute. On its face; paragraph (2) refers to aliens taken into custody pursuant to paragraph (1). If Congress had wanted to include a provision barring release of any alien who had committed a predicate act, Congress could simply have said "Any alien described in paragraphs (A) through (D)....” The fact that Congress did not use the more natural and condensed wording suggests it had another purpose. Congress’ decision to only make 1226(c) apply prospectively to predicate offenses committed after enactment also refutes the government’s construction.
      Moreover, this court already rejected that argument in Saysana. In that case, the issue was "whether the mandatory detention provision applies only when an alien is released from a criminal custody the basis for which is one of the [listed predicate offenses]; or, [] whether it applies whenever [such] an alien ... is released from any criminal custody regardless of the reason for that detention.” 590 F.3d at 11. The court emphasized "[r]es-olution of this issue centers on the ‘when released’ language in § 1226(c).” Id. Saysa-na thus recognized that the "when ... released” language of paragraph (1) is essential to determining whether an alien is subject to mandatory detention. If paragraph (2) operated independently of paragraph (1), as Rojas and the government would have it, there would have been no reason for Saysana to consider the "when ... released” language in its analysis.
     
      
      . We do not read Hosh or Sylvain as coming to a contrary conclusion. Hosh only addressed whether "when” meant immediately, and, as we do today, held that "when,” in this context, does not require strict immediacy. Hosh never stated that "when” is an entirely open-ended time period; indeed, the court acknowledged that the statute "connotes some degree of immediacy”. Hosh, 680 F.3d at 381. Sylvain failed to even address the meaning of "when.” Sylvain, 714 F.3d at 157.
     
      
      . See French v. Edwards, 80 U.S. 506, 511, 13 Wall. 506, 20 L.Ed. 702 (1871), which explained that provisions "designed to secure order, system, and dispatch proceedings" "are not usually regarded as mandatory unless accompanied by negative words,” "[b]ut when the requisitions prescribed are intended for the protection of the citizen,” and that "a disregard of which his rights might be and generally would be injuriously affected,” the provisions "are not directory but mandatory.” Id.
      
     
      
      . While Justice Kennedy’s concerns were limited to the case of "a lawful permanent resident alien,” id. at 532, which Castaneda is not, we do not interpret the mandatory detention provision differently as to her or other unlawful or non-permanent resident aliens. The text of the statute provides no basis for such a distinction.
     
      
      . We also note other circuits have raised significant constitutional concerns associated with arbitrary application of the statute where long-term detention occurs and have construed 1226(c) as not applying in such circumstances. See Casas-Castrillon v. Dept. of Homeland Sec., 535 F.3d 942, 950 (9th Cir. 2008); Ly v. Hansen, 351 F.3d 263, 272 (6th Cir.2003).
     
      
      . We note in conclusion that many district courts across the country have adopted the interpretation of § 1226(c) that we adopt today. See, e.g., Alikhani v. Fasano, 70 F.Supp.2d 1124, 1130 (S.D.Cal.1999); Ortiz v. Holder, No. 2:11-cv-1146 DAK, 2012 WL 893154, at *3-4 (D.Utah Mar. 14 2012); Harris v. Lucero, Civil Action No. 1:11-cv-692, 2012 WL 603949, at *3 (E.D.Va. Feb 23, 2012); Parfait v. Holder, Civil No. 11-4877(DMC), 2011 WL 4829391, at *4-9 (D.N.J. Oct. 11, 2011); Rianto v. Holder, No. CV-11-0137-PHX-FJM, 2011 WL 3489613, at *3 (D.Ariz. Aug. 9, 2011). Indeed, that interpretation appears to be the majority view. See Sylvain, 714 F.3d at 157 (collecting cases).
     