
    Cassie Cordell TRUEBLOOD, next friend of Ara Badayos, an incapacitated person; A.B., by and through her next friend Cassie Cordell Trueblood; K.R., by and through his next friend Marilyn Roberts; D.D., by and through his next friend Andrea Crumpler; Disability Rights Washington, Plaintiffs-Appellees, v. WASHINGTON STATE DEPARTMENT OF SOCIAL AND HEALTH SERVICES; Western State Hospital; Eastern State Hospital; Kevin W. Quigley, Secretary of the Department of Social and Health Services, in his official capacity; Ron Adler, CEO of Western State Hospital; Dorothy Sawyer, Chief Executive Officer of Eastern State Hospital in her Official Capacity, Defendants-Appellants.
    No. 15-35462.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Dec. 7, 2015.
    Filed May 6, 2016.
    
      Noah G. Purcell (argued), Robert W. Ferguson, Anne E. Egeler, Amber L. Leaders, and Nicholas Williamson, Washington State Office of the Attorney General, Olympia, WA, for Defendants-Appellants.
    Anita Khandelwal (argued), Public Defender Association, Seattle, WA; La Rond Baker and Margaret Chen, ACLU of Washington Foundation, Seattle, WA; David R. Carlson and Emily Cooper, Disability Rights Washington, Seattle, WA; Christopher Carney, Sean Gillespie, and Kenan Isitt, Carney Gillespie Isitt PLLP, Seattle, WA, for Plaintiffs-Appellees.
    Harry Williams IV, Law Office of Harry Williams, Seattle, WA, for Amicus Curiae Disability Rights Network.
    Before: MICHAEL DALY HAWKINS and M. MARGARET McKEOWN, Circuit Judges and SHARON L. GLEASON, District Judge.
    
      
       The Honorable Sharon L. Gleason, District Judge for the U.S. District Court for the District of Alaska, sitting by designation.
    
   OPINION

Opinion by

Judge M. MARGARET McKEOWN, Circuit Judge:

Washington State, through its Department of Social and Health Services (“DSHS”), has faced considerable challenges — both legal and practical — in administering timely competency evaluation and restoration services to pretrial detainees in city and county facilities. It is well recognized that detention in a jail is no substitute for mentally ill detainees who need therapeutic evaluation and treatment. Long-standing Supreme Court precedent requires that “a person whose mental condition is such that he lacks the capacity to understand the nature and object of the proceedings against him, to consult with counsel, and to assist in preparing his defense may not be subjected to a trial.” Drope v. Missouri, 420 U.S. 162, 171, 95 S.Ct. 896, 43 L.Ed.2d 103 (1975). To hon- or its constitutional obligations, Washington law provides that when “there is reason to doubt [the] competency” of a person facing criminal charges, the defense counsel or prosecutor may request an evaluation or a court may sua sponte order an evaluation to ensure that only those persons competent to stand trial are prosecuted. Wash. Rev.Code § 10.77.060.

Following a bench trial, the district court detailed Washington’s shortcomings in providing competency evaluation and restoration services, the insufficient number of beds and personnel as a result of inadequate funding and planning, and the deleterious effects of prolonged incarceration without evaluation and treatment for mentally ill detainees. The court addressed both initial competency evaluations and the mental health restoration services that follow a determination of incompetency to stand trial and concluded that the Due Process Clause of the Fourteenth Amendment requires that services for both categories must be provided within seven days of a court order, absent an individualized determination of clinical good caused The court entered a permanent injunction to this effect, although Washington appeals only that portion related to initial competency evaluations. Thus, the question we address is a narrow one, focused on the timeliness of the evaluation — does the Due Process Clause compel the state to perform a competency evaluation of pretrial detainees within seven days of a court order requiring evaluation?

We agree with the district court that DSHS must conduct competency evaluations within a reasonable time following a court’s order. The district court’s seven-day mandate, however, imposes a temporal obligation beyond what the Constitution requires. Therefore, we vacate the injunction with respect to the seven-day requirement for in-jail competency evaluations and remand to the district court to amend the injunction in a manner consistent with this opinion.

Background

I. Competency Evaluations

Consistent with its constitutional obligation, Washington law provides that “[n]o incompetent person shall be tried, convicted, or sentenced for the commission of an offense so long as such incapacity continues.” Wash. Rev.Code § 10.77.050. Once a judge, defense counsel, or prosecutor raises doubt about a criminal defendant’s legal competency, the court must order an evaluation. Id. § 10.77.060(l)(a).

DSHS is responsible for overseeing both competency evaluations and any following restorative services. See id. §§ 10.77.010(5); 10.77.088. The evaluation must be conducted by a trained evaluator and includes a face-to-face interview with the individual whose competency is in doubt, which can occur in one of three settings: a jail, a state hospital, or in the community. Id. § 10.77.060(1). Individuals who are in jail (because they have been denied bail or have not posted bail) generally remain in jail awaiting performance of the competency evaluation. The court may order evaluations to take place at a state hospital if “necessary for the health, safety, or welfare of the defendant.” Id. § 10.77.060(l)(d). Nearly ninety percent of the evaluations occur in a jail or community setting. Detainees retain the right against self-incrimination during competency evaluations, have a right to counsel during the interview process, and may be permitted to have a defense expert for questions of competency. Id. § 10.77.020(4).

Once the requisite information has been gathered, the evaluator’s report and recommendations are presented to the court. Id. § 10.77.065. If an individual is found competent, the criminal prosecution may continue, but if a person is found incompetent to stand trial, criminal prosecution is stayed. Id. § 10.77.084(l)(a). At that point, the court may order restorative services or, if the defendant is charged with a nonfelony- crime that is not a serious offense as defined in § 10.77.092, the court may dismiss the case or refer the defendant for civil commitment. Id. § 10.77.088.

Washington law, effective July 24, 2015, sets a performance target of seven days or less for competency evaluations, but imposes a fourteen-day maximum time limit, with, the possibility of a seven-day extension for clinical reasons. Id. § 10.77.068(l)(a). The target and time limit were to be phased in over a one-year period beginning July 1, 2015. Id. The law provides a number of defenses for failing to meet the deadline, including the inability to obtain necessary information regarding the defendant’s history, insufficient private space in the detention facility to conduct the evaluation, and “lack of availability or participation by counsel, jail or court personnel; interpreters, or the defendant,” any of which, if proven by a preponderance of the evidence, relieve the state of its duty to perform the evaluation within the time allotted. Id. § 10.77.068(l)(c). This provision explicitly “does not create any new entitlement or cause of action” to enforce these deadlines. Id. § 10.77.068(5).

II. District Court Proceedings

This appeal arises out of a 42 U.S.C. § 1983 action filed in federal district court against DSHS by Cassie Trueblood, on behalf of a single plaintiff, Ara Badayos. Badayos had been found legally incompetent to stand trial and was detained in solitary confinement in the. Snohomish County Jail awaiting transfer to a hospital for restorative treatment. The complaint was then amended to include a class of individuals who were either awaiting a competency evaluation or had been found incompetent and were awaiting restorative services. The district court certified the class as:

All persons who are now, or will be in the future, charged with a crime in the State of Washington and: (a) who are ordered by a court to receive competency evaluation or restoration services through DSHS; (b) who are waiting in jad for those services; and (c) for whom DSHS receives the court order.

The district court granted the plaintiffs’ motion for summary judgment on the question of “whether current in-jail waiting times for court-ordered competency evaluation and restoration services violate the Due Process Clause of the Fourteenth Amendment,” finding that “current in-jail wait time[s] experienced by Plaintiffs and class members [are] far beyond any constitutional boundary_” Relying substantially on this court’s reasoning in Oregon Advocacy Center v. Mink, 322 F.3d 1101 (9th Cir.2003), the district court found that substantive due process analysis applied to the plaintiffs’ liberty interest in freedom from incarceration, and concluded that “wait times of less than seven days comport with due process, and that anything beyond seven days is suspect.”

The court held a bench trial to determine the “precise outer boundary permitted by the Constitution” based on the specific conditions present in Washington State. During the trial, the district court heard testimony on three main issues: the current state of competency evaluations and restorative services in Washington; the effects of prolonged detention in jail, .rather than a hospital, for mentally ill individuals; and the feasibility of providing competency evaluation and restorative services within seven days.

Between 2001 and 2011, demand for competency evaluations in Washington increased by eighty-two percent. The district court found that evaluation services were delayed due to staffing shortages, high evaluator turnover, lack of accurate data and timely reporting, inadequate planning, unwillingness to use electronic court records, and long travel times between jails and evaluators’ offices. Trial testimony also revealed that class members had suffered serious mental health consequences as a result of prolonged detention — often in solitary confinement— pending evaluation or services, including suicidal behavior, self-harm, and refusal to take medications. It was no surprise, therefore, that the district court found “[pjunitive settings and isolation for twenty-three hours each day exacerbate mental illness and increase the likelihood that the individual will never recover.”

The district court concluded that “the foundational liberty interest under the due process clause is freedom from incarceration.” See Oviatt ex rel. Waugh v. Pearce, 954 F.2d 1470, 1474 (9th Cir.1992). Because the state defendants had a “long history of failing to adequately protect the constitutional rights” of the class and had “demonstrated a consistent pattern of intentionally disregarding court orders,” the district court ordered a permanent injunction requiring (in relevant part):.

1) In-jail competency evaluations within seven days of the signing of a court order calling for an evaluation. If such an evaluation cannot be completed within seven days, then DSHS must either transfer the individual to a state hospital pending completion of the evaluation or obtain a court-ordered extension for “clinical good cause.”

2) Admission of individuals whose competency evaluations have been ordered to occur in a state hospital to that hospital within seven days of the signing of the court order.

3) Admission of individuals ordered to receive restoration services to a state hospital within seven days of the signing of the court order.

DSHS appeals only the first part of the permanent injunction: the requirement that competency evaluations for jailed defendants be conducted within seven days, absent a court-ordered extension for clinical good cause. It does not appeal the injunction as it applies to individuals ordered to be evaluated in a state hospital or who have already been found incompetent and are awaiting restorative services.

Analysis

We first address the applicable constitutional standard and then turn to the injunction’s remedial scope. Because “[a] permanent injunction involves factual, legal, and discretionary components, ... [w]e'review legal conclusions ... de novo, factual findings for clear error, and the scope of the injunction for abuse of discretion.” Vietnam Veterans of Am. v. C.I. A., 811 F.3d 1068, 1075 (9th Cir.2016) (citations omitted) (internal quotation marks omitted).

I. Due Process Reasonableness Governs the Timing of Competency Evaluations

We begin with the premise that due process analysis governs pretrial detention: “Freedom from imprisonment— from government custody, detention, or other forms of physical restraint — lies at the heart of the liberty that [the Due Process] Clause protects.” Zadvydas v. Davis, 533 U.S. 678, 690, 121 S.Ct. 2491, 150 L.Ed.2d 653 (2001) (setting presumptively reasonable time limits on immigration detention); see also Lopez-Valenzuela v. Arpaio, 770 F.3d 772, 777-80 (9th Cir.2014) (en banc) (summarizing case law applying substantive due process to the fundamental liberty interests of pretrial detainees).

This principle was reinforced in Mink, where we held that “[pjretrial detainees, whether or not they have been declared unfit to proceed, have not been convicted of any crime. Therefore, constitutional questions regarding the ... circumstances of their confinement are properly addressed under the due process clause of the Fourteenth Amendment....” 322 F.3d at 1120. Addressing the circumstance of individuals who had been evaluated and found incompetent, but were awaiting treatment, we held that waiting “in jail for weeks or months violates ... due process rights because the nature and duration of their incarceration bear no reasonable relation to the evaluative and restorative purposes for which courts commit those individuals.” Id. at 1122.

Mink adopted the framework set out in two Supreme Court cases: Jackson v. Indiana, 406 U.S. 715, 92 S.Ct. 1845, 32 L.Ed.2d 435 (1972) and Youngberg v. Romeo, 457 U.S. 307, 102 S.Ct. 2452, 73 L.Ed.2d 28 (1982). In Jackson, the Supreme Court articulated a general “rule of reasonableness” limiting the duration of pretrial detention for incompetent defendants and requiring, at a minimum, “that the nature and duration of commitment bear some reasonable relation to the purpose for which the individual is committed.” 406 U.S. at 733, 738, 92 S.Ct. 1845. Thus, “[wjhether the substantive due process rights of incapacitated criminal defendants have been violated must be determined by balancing their liberty interests in freedom from incarceration and in restorative treatment against the legitimate interests of the state.” Mink, 322 F.3d at 1121 (citing Youngberg, 457 U.S. at 321, 102 S.Ct. 2452).

Although the specifics of the calculus may vary, the framework set out in Jackson, and applied to restorative competency services in Mink, is equally applicable to individuals awaiting competency evaluations. Weighing the parties’ respective interests, there must be a “reasonable relation” between the length of time from the court order to the inception of the competency evaluation.

Essentially for the first time on appeal, DSHS argues that the district court applied the wrong constitutional provision to Trueblood’s claims because the more specific Sixth Amendment speedy trial right supercedes substantive due process analysis where plaintiffs challenge delay, rather than the fact or conditions of confinement. We exercise our “limited discretion to consider purely legal arguments raised for the first time on appeal,” Lahr v. Nat’l Transp. Safety Bd., 569 F.3d 964, 980 (9th Cir.2009) (citations omitted), in order to put to rest the state’s effort to shift the focus of the litigation and because consideration of the legal issue at this stage will not prejudice the class members.

The Sixth Amendment is ill-suited to the claim on appeal. Unlike in Sixth Amendment cases, these class members do not seek relief from prejudicial delays in their criminal prosecutions. Their complaint is that they should receive a timely determination of competency—a go or no-go decision on whether their criminal proceedings will move forward and whether they are eligible for restorative services. Many of them will never be tried, or might not be tried until after a lengthy restorative treatment process. Their focus is not the guarantee of a speedy trial.

To determine whether there has been a speedy trial violation, courts balance the “[l]ength of delay, the reason for the delay, the defendant’s assertion of his right, and prejudice to the defendant.” Barker v. Wingo, 407 U.S. 514, 530, 92 S.Ct. 2182, 33 L.Ed.2d 101 (1972). In United States v. Sutcliffe, we excluded delays due to competency issues from both the statutory and constitutional speedy trial analysis in part because “the delays were all either directly caused by Defendant or ... were deemed necessary in the interests of justice.” 505 F.3d 944, 957 (9th Cir.2007). Our sister circuits are in accord that competency-related delays are not relevant to the speedy trial inquiry. We reject the state’s argument that the Sixth Amendment, not the Due Process Clause, provides the framework for True-blood’s claims.

II. Due Process Reasonableness Does Not Compel Competency Evaluations to be Completed in Seven Days

We recognize the challenges inherent in the district court’s task of setting a reasonable time frame, particularly in light of the state’s history of non-compliance with its own performance targets and with court orders. As the district court found, the state has “demonstrated a consistent pattern of intentionally disregarding court orders ... and [has] established a de facto policy of ignoring court orders which conflict with [its] internal policies.” The state acknowledges that “some of the waiting periods are excessive and indefensible.”

In fashioning a remedy, however, the district court did not ask whether there was some reasonable relation between the timing and the - confinement, nor did it distinguish sufficiently between the pre- and post-evaluation categories at issue. The findings and conclusions elide what is a reasonable delay when providing restorative services with what is a reasonable delay when conducting initial competency evaluations, often assessing both categories together under the rubric of “competency services.” Yet, both the class members and the state have different interests at the pre-evaluation stage than they do once a finding of incompetency has issued. The state, correctly observing that the categories of pre- and post-evaluation class members are distinct, does not challenge the seven-day deadline for providing restorative services.

In Mink, all of the detainees had been found incompetent and had a distinct “liberty interest[ ] in freedom from incarceration” so they could receive restorative treatment. 322 F.3d at 1121. The state had no legitimate interest in keeping them “locked up in county jails for weeks or months” following an incompetency determination. Id. The interests to be weighed before a finding of incompetency bear a similarity to the Mink situation, but are factually distinct. The state argues that it has an interest in accurate evaluations, preventing the stigma of an incorrect determination, avoiding undue separation of a detainee from her counsel and family, and protecting the detainee’s rights to counsel and against self-incrimination. In contrast, Trueblood claims a legitimate interest in mitigating the harm caused to detainees who languish in jail awaiting a competency determination and in reducing the impact of solitary confinement and other conditions often imposed on mentally ill detainees who are awaiting evaluation. The court’s findings neither weigh the interests related to competency evaluations as distinct from other competency services, nor benchmark these interests against a range of constitutionally acceptable time-frames.

With respect to the evaluation deadline, the district court did not articulate a sufficiently strong constitutional foundation to support the mandatory injunction. Indeed, the findings are couched in terms of what is “reasonable and achievable,” not whether the state’s present fourteen-day requirement bears the constitutionally requisite reasonable relationship, or whether the balancing of interests requires a seven-day deadline. Seven days, while perhaps feasible, does not constitute a bright line after which any delay crosses the constitutional Rubicon. Indeed, most jurisdictions in the United States do not require initial competency evaluations to be carried out in seven days. According to the state’s expert report, the national average for competency evaluation deadlines is thirty-one days, while fifteen states have no specific statutory deadline for evaluations, and only six have deadlines under ten days. Federal law allows up to thirty days for federal detainees. 18 U.S.C. § 4247(b). The district court did not consider any less restrictive alternatives, nor did it identify any reason why Washington should be held to such a restrictive rule other than that “[w]ith appropriate planning, coordination, and resources” nothing prevented DSHS from “providing competency services within seven days.” But even if the seven-day time frame is not constitutionally mandated, that does not mean that Washington should let up on achieving its seven-day target.

' The injunction has two other deficiencies. First, it mandates compliance within seven days of the signing of a competency evaluation order, not receipt of an order by DSHS. This requirement goes beyond what Trueblood requested and fails to account for any period from issuance of the court order to receipt. To be sure, neither the court nor the state should dally, but practical impediments, such as intervening weekends or the time necessary to obtain documents, can eat up the time period. Notably, even Trueblood’s expert stated only that the majority of evaluations could be completed within ten days of the receipt of a court order. Second, the permanent injunction currently excludes the possibility of an extension for delays attributable to non-clinieal interests of a detainee awaiting evaluation, including the unavailability of defense counsel or a defense expert. In such cases, after the evaluation deadline has passed, the criminal defendant would automatically be moved to a state psychiatric hospital, often far from his lawyer and family, and then transferred back to jail if he is found competent, all without the detainee’s consent. To honor the state’s interests in accurate and efficient evaluations and the defendant’s' right to counsel, the district court should consider a broader “good cause” exception.

The question then remains: what constitutes a reasonable time in which to conduct the evaluations? We leave the answer to the district court in the first instance, but note that federal courts have often looked to a state’s own policies for guidance because “appropriate consideration must be given to principles of federalism in determining the availability and scope of equitable relief.” Rizzo v. Goode, 423 U.S. 362, 379, 96 S.Ct. 598, 46 L.Ed.2d 561 (1976); see also Lewis v. Casey, 518 U.S. 343, 362, 116 S.Ct. 2174, 135 L.Ed.2d 606 (1996) (concluding that a federal injunction had “failed to give adequate consideration to the views of state [ ] authorities”).

During the course of this litigation, Washington amended its law to set a fourteen-day maximum time limit for competency evaluations, although the legislation incorporated a non-binding seven-day performance goal. Wash. Rev.Code § 10.77.068. The court’s findings and conclusions do not take into consideration this legislative change, nor do they consider whether this time limit would pass constitutional muster. On remand, the district court should evaluate the effects of the revised legislation.

Conclusion

Washington has thus far failed to comply with its own target goals, which is why a permanent injunction remains an appropriate vehicle for monitoring and ensuring that class members’ constitutional rights are protected. In crafting a structural injunction that alters the state-wide processes by which individuals are evaluated for legal competency, however, the district court melded its findings with respect to' competency evaluations and restoration services, did not tailor its findings to the timeliness of initial competency evaluations, and unduly focused its ruling on the timing of services that were attainable as a practical matter rather than the constitutional parameters of the remedy. In light of the Fourteenth Amendment’s due process reasonableness framework, the district court abused its discretion when it concluded that seven days was the “maximum justifiable period” primarily because it was feasible for DSHS to conduct evaluations within seven days in the vast majority of cases. See Katie A., ex rel. Ludin v. Los Angeles Cnty., 481 F.3d 1150, 1155 (9th Cir.2007) (“Where an injunction is issued against state officials, a district court will be deemed to have committed an abuse of discretion ... if its injunction requires any more of state officers than demanded by federal constitutional or statutory law.”) (quoting Clark v. Coye, 60 F.3d 600, 604 (9th Cir.1995) (omission in original) (internal quotation marks omitted)).

We vacate paragraph (1) of the permanent injunction issued on April 2, 2015, with respect to in-jail competency evaluations, and remand this case to the district court to modify the permanent injunction, consistent with this opinion, including considering Washington’s 2015 law and taking into account the balancing of interests related specifically to initial competency evaluations.

Each party shall bear its own costs on appeal.

Reversed and Remanded. 
      
      . Although the defendants-appellants include Washington State Department of Social and Health Services; Western State Hospital; Eastern State Hospital; Kevin Quigley, Secretary of the Department of Social and Health Services, in his official capacity; Ron Adler, CEO of Western State Hospital, in his official capacity; and Dorothy Sawyer, CEO of Eastern State Hospital, in her official capacity, we use "DSHS” or "the state” by way of collective shorthand.
     
      
      . From 2012 to 2015, Washington law provided for a seven-day performance target, but no maximum time limits for evaluations. Former Wash. Rev.Code § 10.77.068(l)(a) (2012).
     
      
      . On February 8, 2016, the district court issued a modified injunction, which, among other things, moved the deadline for compli-anee with the seven-day evaluation requirement to May 1, 2016.
     
      
      . Throughout this litigation, DSHS invoked the Fourteenth Amendment as the basis for its arguments. The district court did not consider the Sixth Amendment either at summary judgment or at the trial. DSHS contends that two references to the Sixth Amendment in its trial brief were sufficient to raise the argument before the district court or, alternatively, that as a pure question of law, we should consider the Sixth Amendment argument on appeal.
     
      
      . See, e.g., United States v. DeGarmo, 450 F.3d 360, 362-63 (8th Cir.2006) (competency delays not considered under statutory or constitutional speedy trial analysis, even where the defendant did not request the competency evaluation and the evaluation took longer than the state statute required); United States v. Cope, 312 F.3d 757, 777 (6th Cir.2002) (sixty-six day competency delay not presumptively prejudicial under the .Sixth Amendment); United States v. Vasquez, 918 F.2d 329, 333, 337-38 (2d Cir.1990) (even unreasonable delays in competency evaluations not considered in determining whether the right to a speedy trial was violated).
     
      
      . At oral argument, Washington proposed that, if there had been a Fourteenth Amendment violation, the best remedy would be to order Washington to comply with its own law.
     