ORDER AND AMENDED OPINION
PER CURIAM.ORDER
The opinion of this court filed March 8, 2002, 282 F.3d 780, slip op. at 3859, is amended as follows:
On page 3863 of the slip opinion, add the following sentence to the end of the first full paragraph: “The plaintiffs’ claim that the state parole board is categorically denying inmates consideration for parole because of their disability, drug addiction, survives the Defendants’ Rule 12(b)(6) motion.”
On page 3863 of the slip opinion, in the last paragraph delete “primarily due to” and replace with “because of.” On page 3869 of the slip opinion, in the paragraph starting with “Another flaw in the district court’s reasoning ...delete “to determine parole release” and replace with “in the parole context.” In the same paragraph, add “long” after “For example, circuit courts have.” Delete “race is an impermissible criterion in the parole decision-making process” and replace with “parole boards may not exclude an inmate for consideration for parole based on race.” Change “same constitutional promises” to “similar constitutional promises.”
On page 3870 of the slip opinion, in the first full paragraph, change the first sentence to read (and add new footnote 4): “The same holds true in the parole context: since a parole board may not categorically exclude African-Americans from consideration for parole because of their race, and since Congress thinks that discriminating against a disabled person is like discriminating against an African-American, the parole board may not categorically exclude a class of disabled people from consideration for parole because of *894their disabilities.4”
On page 3871, in the last line of the opinion add “AND REMANDED” after “REVERSED.”
OPINION
Charles W. Thompson and Stephen L. Bogovich (collectively, “Plaintiffs”), two California state prisoners, seek prospective injunctive relief against various state officials who have a role in the parole process. For convenience we refer to them as “Defendants.” Plaintiffs allege that Defendants have violated Title II of the Americans with Disabilities Act (“ADA”) by denying them full and fair consideration for parole based on their disability of drug addiction. The district court dismissed the complaint for failure to state a claim on the ground that the ADA does not apply to the substantive decision-making process of parole proceedings. Because we conclude that there is no categorical rule excluding parole decisions from the scope of the ADA, we reverse the ruling of the district court and remand for further proceedings. The plaintiffs’ claim that the state parole board is categorically denying inmates consideration for parole because of their disability, drug addiction, survives the Defendants’ Rule 12(b)(6) motion.
I.
Factual and Procedural Background
Plaintiffs are state prisoners who are serving terms of fifteen years to life for second-degree murder. According to their complaint, Plaintiffs have a history of drug addiction, which substantially limited then-judgment, ability to learn, ability to comprehend the long-range effects of their acts, and ability to maintain stable social relationships and stable employment. Both received treatment for substance abuse while in prison and have been drug-free since 1990 and 1984, respectively. Both became statutorily eligible for parole in 1993 and assert that they have been denied parole release dates because of their substance abuse histories.
Plaintiffs, without the benefit of counsel,2 filed this action in federal court. Plaintiffs assert that the Board of Prison Terms (“Board”), the state parole authority, follows an unwritten policy of automati-*895eally denying parole to prisoners with substance abuse histories in violation of Title II of the ADA. Specifically, the pro se complaint alleges that the Board refused to set a parole release date for Plaintiffs because of their records of drug addiction and/or because the Board regarded them as drug addicts. The complaint further alleges that the Board denied Plaintiffs an individualized assessment of their future dangerousness because of their disability. Plaintiffs seek only prospective injunctive relief from Defendants in their official capacities.
A magistrate judge initially decided that, because the complaint alleges that Plaintiffs were improperly denied parole, their claims might affect their release from prison, and they could proceed only by writ of habeas corpus. The district court dismissed the case on the magistrate judge’s recommendation, but this court reversed on appeal, holding that Plaintiffs’ ADA claim “does not necessarily imply the invalidity of their continuing confinement.” See Bogovich v. Sandoval, 189 F.3d 999, 1004 (9th Cir.1999).
On remand, Defendants filed a Rule 12(b)(1) motion to dismiss, which the magistrate judge interpreted as a Rule 12(b)(6) motion because Rule 12(b)(1) was inapplicable. The magistrate judge concluded that a Rule 12(b)(6) dismissal was not warranted on the grounds stated by Defendants. Instead, sua sponte, the magistrate judge decided that the complaint should be dismissed because “[t]he ADA does not apply to the substantive decision making process in the criminal law context.” The district court adopted the magistrate judge’s findings and recommendations and dismissed the ease. Plaintiffs appeal. We have jurisdiction over the appeal pursuant to 28 U.S.C. § 1291.
II.
Standard of Review
The district court’s dismissal of the complaint under Rule 12(b)(6) is reviewed de novo. Zimmerman v. City of Oakland, 255 F.3d 734, 737 (9th Cir.2001). All allegations of material fact are taken as true and construed in the light most favorable to the nonmoving party. Sprewell v. Golden State Warriors, 266 F.3d 979, 988 (9th t Cir.2001). A complaint should not be dismissed unless it appears beyond doubt that the plaintiff can prove no set of facts in support of the claim that would entitle the plaintiff to relief. Id. In addition, we construe pro se pleadings liberally on a defendant’s motion to dismiss for failure to state a claim. Ortez v. Washington County Oregon, 88 F.3d 804, 807 (9th Cir.1996).
III.
Discussion
A. ADA Frameioork
Title II of the ADA prohibits a public entity from discriminating against a qualified individual with a disability on the basis of disability. 42 U.S.C. § 12132 (1994); Weinreich v. L.A. County Metro. Transp. Auth., 114 F.3d 976, 978 (9th Cir.1997). To state a claim of disability discrimination under Title II, the plaintiff must allege four elements: (1) the plaintiff is an individual with a disability; (2) the plaintiff is otherwise qualified to participate in or receive the benefit of some public entity’s services, programs, or activities; (3) the plaintiff was either excluded from participation in or denied the benefits of the public entity’s services, programs, or activities, or was otherwise discriminated against by the public entity; and (4) such exclusion, denial of benefits, or discrimination was by reason of the plaintiffs disability. Weinreich, 114 F.3d at 978.
*896With respect to the first element, the ADA defines "disability" as:
(A) a physical or mental impairment that substantially limits one or more of the major life activities of such individual;
(B) a record of such an impairment; or
(C) being regarded as having such an impairment.
42 U.S.C. § 12102(2) (1994). Here, Plaintiffs allege that they are disabled based on subsections (B) and (C)-that is, they have a record of drug addiction and/or are regarded as being drug addicts by the Board.
Drug addiction that substantially limits one or more major life activities is a recognized disability under the ADA. 28 C.F.R. § 35.104 (2000) ("The phrase physical or mental impairment includes drug addiction . . ."). While the term "qualified individual with a disability" does not include an individual who is currently engaging in the illegal use of drugs, the ADA does protect individuals who have successfully completed or are participating in a supervised drug rehabilitation program and are no longer using illegal drugs, as well as individuals who are erroneously regarded as using drugs when they are not. See 42 U.S.C. § 12210(a) & (b) (1994); Collings v. Longview Fibre Co., 63 F.3d 828, 831-32 (9th Cir.1995) (acknowledging an analogous provision in Title I). Plaintiffs allege that they have been rehabilitated and no longer use drugs. They also allege that their past drug addiction substantially limited certain major life activities, including their ability to learn and work. See 29 C.F.R. § 1630.2(i) (2000). Since Plaintiffs allege that they have a record of a substantially limiting impairment and that they are regarded by the Board as having a substantially limiting impairment, under § 12102(2)(B) and (C), they have pled that they are disabled within the meaning of the ADA.
With respect to the second element of disability discrimination, Plaintiffs allege that they are statutorily eligible for parole. As a result, Plaintiffs have pled that they are otherwise qualified for the public benefit they seek, consideration for parole.
With respect to the third and fourth elements, Plaintiffs allege that they have been denied the benefit of a public program or activity-consideration for parole-by reason of their disability. Below, we examine whether parole hearings are public programs or activities covered by the ADA. Because we conclude that they are, Plaintiffs' allegations are sufficient to state a Title II claim.3
B. Applicability of the ADA to Parole Decisions
The district court determined that the ADA does not apply to parole decisions because it does not extend "to the substan*897tive decision making process in the criminal law context.” We find no basis for concluding that Title II of the ADA contains such a broad exception.
Although the power to fashion and enforce criminal laws is reserved primarily to the States, many functions traditionally reserved to the states are subject to the ADA, including quarantine laws and, significantly, prison administration. Armstrong v. Wilson, 124 F.3d 1019, 1024-25 (9th Cir.1997) [hereinafter Armstrong I ]. The Supreme Court recently affirmed our holding that the ADA applies to prisons in Pennsylvania Dep’t of Corrections v. Yeskey, 524 U.S. 206, 118 S.Ct. 1952, 141 L.Ed.2d 215 (1998). Nonetheless, Defendants argue that the courts have applied the ADA only to logistical matters of prison administration, including access to parole hearings, but not to substantive decision-making processes. See Armstrong I, 124 F.3d at 1025, and Armstrong v. Davis, 275 F.3d 849, 856 (9th Cir.2001) [hereinafter Armstrong II] (collectively holding that the ADA requires reasonable accommodations to give disabled prisoners access to parole hearings). We are not convinced that a per se rule immunizing the States’ substantive decision-making processes is consistent with the language of the ADA as interpreted in case law and agency law.
First, case law indicates that the ADA applies in contexts that involve substantive criminal law decisions. For example, the Tenth Circuit has held that the ADA applies to arrests, which involve substantive decision making. Gohier v. Enright, 186 F.3d 1216, 1221 (10th Cir.1999) (“[A] broad rule categorically excluding arrests from the scope of Title II ... is not the law.”). Likewise, the EEOC guidelines state that, under the ADA regulations, law enforcement is obligated to modify “policies that result in discriminatory arrests or abuse of individuals with disabilities.” 28 C.F.R. Pt. 35, App. A § 35.130 (2000).
On the other hand, the Fourth Circuit, in Rosen v. Montgomery County Maryland, has indicated that arrests do not come within the ADA’s ambit. 121 F.3d 154 (4th Cir.1997). However, the Rosen decision was not based upon a concern that the ADA would impermissibly interfere with the substantive decisions involved in arrests. Rather, reasoning that the statutory text implied voluntariness on the part of the individual, it held that an arrest was not a “program or activity” of the defendant County. Id. at 157-58. This reasoning has now been discredited by the Supreme Court. Yeskey, 524 U.S. at 211, 118 S.Ct. 1952 (“[T]he words [of § 12132] do not connote voluntariness.”).
The Ninth Circuit has not addressed the question of whether the ADA applies to arrests. However, the weight of authority on the applicability of the ADA to arrests suggests that a state’s substantive decision-making processes in the criminal law context are not immune from the anti-discrimination guarantees of federal statutory law.
Another flaw in the district court’s reasoning is its failure to recognize that state powers in the parole context are already curtailed by federal anti-discrimination guarantees. For example, circuit courts have long held that parole boards may not exclude an inmate from consideration for parole based on race. See, e.g., White v. Bond, 720 F.2d 1002, 1003 (8th Cir.1983); Candelaria v. Griffin, 641 F.2d 868, 870 (10th Cir.1981). Although these cases of racial discrimination were based directly on constitutional violations while this case is based on a violation of the ADA, Congress passed the ADA to enforce similar constitutional promises of equal protection. This court has noted:
*898“If a prison may not exclude blacks from the prison dining hall and force them to eat in their cells, and if Congress thinks that discriminating against a blind person is like discriminating against a black person,” the prison may not exclude the blind person from the dining hall unless allowing him access would unduly burden prison administration.
Armstrong I, 124 F.3d at 1025 (quoting Crawford v. Indiana Dep’t of Corrections, 115 F.3d 481, 486 (7th Cir.1997)). Concluding that Congress did in fact liken disability discrimination to racial discrimination, we held that the ADA applies to state correctional systems. Id.
The same holds true in the parole context: since a parole board may not categorically exclude African-Americans from consideration for parole because of their race, and since Congress thinks that discriminating against a disabled person is like discriminating against an African-American, the parole board may not categorically exclude a class of disabled people from consideration for parole because of their disabilities.4 The fact that considering a prisoner for parole is a substantive, criminal law decision does not license the decision-maker to discriminate on impermissible grounds.
Finally, the plain language of the ADA extends its anti-discrimination guarantees to the parole context. Title II of the ADA provides:
Subject to the provisions of this sub-chapter, no qualified individual with a disability shall, by reason of such disability, be excluded from participation in or be denied the benefits of the services, programs, or activities of a public entity, or be subjected to discrimination by any such entity.
42 U.S.C. § 12132. Like state prisons, state parole boards “fall squarely within the statutory definition of ‘public entity,’ which includes ‘any department, agency, special purpose district, or other instrumentality of a State or States or local government.’” Yeskey, 118 S.Ct. at 1954-55 (quoting 42 U.S.C. § 12131(1)(B)).
Plaintiffs contend that the Board has denied them the benefit of full and fair consideration for parole by reason of their disability. We have found that prison “programs or activities” include such things as parole and disciplinary hearings. See Armstrong I, 124 F.3d at 1024, and Armstrong II, 275 F.3d at 856 (collectively making clear that parole proceedings are *899“programs or activities” within the meaning of the ADA); Duffy v. Riveland, 98 F.3d 447, 455 (9th Cir.1996) (holding the same with respect to prison disciplinary hearings); Bonner v. Lewis, 857 F.2d 559, 562 (9th Cir.1988) (same). In addition, we have interpreted Title II’s “programs” and “activities” to include “ ‘all of the operations of a qualifying local government.” Bay Area Addiction Research and Treatment, Inc. v. City of Antioch, 179 F.3d 725, 731 (9th Cir.1999). In reaching this conclusion, we noted that the legislative history of the ADA “strongly suggests that § 12132 should not be construed to allow the creation of spheres in which public entities may discriminate on the basis of an individuáis disability.” Id. Indeed, we found that Congress specifically rejected an approach that could have left room for exceptions to § 12132’s prohibition on discrimination by public entities. Id. at 732. Given the breadth of the statute’s language, parole proceedings constitute an activity of a public entity that falls within the ADA’s reach.
IV.
Conclusion
We conclude that the district court erred in dismissing Plaintiffs’ claims on the ground recommended by the magistrate judge. In the words of the Tenth Circuit, we hold only that “a broad rule categorically excluding” parole decisions “from the scope of Title II is not the law.” Gohier, 186 F.3d at 1221. Because this case comes to us on a sua sponte pleading ruling, we decline to express an opinion on the merits of Plaintiffs’ claims without further record development.
REVERSED and REMANDED.
. Of course the practical operation of considerations of race and disability in the parole context will be different. Considerations of race, subject to the strictest scrutiny under the Constitution, are impermissible in parole decisions in part because that factor cannot be relevant to the assessment of a person's future dangerousness. Title II does not categorically bar a state parole board from making an individualized assessment of the future dangerousness of an inmate by taking into account the inmate's disability. Title II only prohibits discrimination against “qualified'' people with disabilities. 42 U.S.C. § 12131 (defining a qualified person with a disability as a person who "meets the essential eligibility requirements for the receipt of services''). A person's disability that leads one to a propensity to commit crime may certainly be relevant in assessing whether that individual is qualified for parole. In addition, the parole board might show that legitimate penological interests justify consideration of an inmate's disability status beyond that appropriate in other settings. See Gates v. Rowland, 39 F.3d 1439, 1447 (9th Cir.1994). The parole board claims to have and undeniably does have legitimate penological interests in considering the plaintiffs' substance abuse backgrounds during the individualized inquiry for parole suitability. We hold only that plaintiffs may state a claim under Title II based on their allegations that the parole board failed to perform an individualized assessment of the threat they pose to the community by categorically excluding from consideration for parole all people with substance abuse histories.
. Plaintiffs appeared pro se throughout the district court proceedings but are now represented by counsel.
. Defendants argue that Thompson pled himself out of this case by attaching a copy of a 1999 Board decision to his Opposition to Defendants' Motion to Dismiss, and the decision does not rely on Thompson's history of substance abuse. We reject this argument, first, because we generally are confined to the pleadings when reviewing a 12(b)(6) motion to dismiss. See In re Am. Cont'l Corp./Lincoln Sav. & Loan Sec. Litig., 102 F.3d 1524, 1537 (9th Cir.1996) ("In general, material outside the pleadings cannot be considered in ruling on a motion to dismiss, unless the motion is treated as one for summary judgment and the parties are `given reasonable opportunity to present all material made pertinent to such a motion by Rule 56.' "). Second, while the 1999 Board decision does not disclose the Board's reliance on Thompson's history of substance abuse, the decision does not affirmatively prove that the Board did not act on an unwritten policy to deny all former substance abusers parole.
. Of course the practical operation of considerations of race and disability in the parole context will be different. Considerations of race, subject to the strictest scrutiny under the Constitution, are impermissible in parole decisions in part because that factor cannot be relevant to the assessment of a person's future dangerousness. Title II does not categorically bar a state parole board from making an individualized assessment of the future dangerousness of an inmate by taking into account the inmate's disability. Title II only prohibits discrimination against "qualified” people with disabilities. 42 U.S.C. § 12131 (defining a qualified person with a disability as a person who "meets the essential eligibility requirements for the receipt of services”). A person's disability that leads one to a propensity to commit crime may certainly be relevant in assessing whether that individual is qualified for parole. In addition, the parole board might show that legitimate penological interests justify consideration of an inmate's disability status beyond that appropriate in other settings. See Gates v. Rowland, 39 F.3d 1439, 1447 (9th Cir.1994). The parole board claims to have and undeniably does have legitimate penological interests in considering the plaintiffs' substance abuse backgrounds during the individualized inquiiy for parole suitability. We hold only that plaintiffs may state a claim under Title II based on their allegations that the parole board failed to perform an individualized assessment of the threat they pose to the community by categorically excluding from consideration for parole all people with substance abuse histories.