
130 Cal.Rptr.2d 554 (2003)
105 Cal.App.4th 1394
In re Allen Raymond TAYLOR On Habeas Corpus.
No. B161535.
Court of Appeal, Second District, Division Eight.
February 4, 2003.
Rehearing Denied February 21, 2003.
Review Denied May 21, 2003.
Michael P. Judge, Public Defender, Albert J. Menaster, Alice McVicker and Alex Ricciardulli, Deputy Public Defenders, for Petitioner.
No appearance for Respondent.
Steve Cooley, District Attorney, Brentford J. Ferreira and Patricia Martinez, Deputy District Attorneys, for Real Parties in Interest.
RUBIN, J.
Petitioner Allen Raymond Taylor seeks a writ of habeas corpus directing the trial court to reverse its order incarcerating him for failing to report to his probation officer for a drug test. We shall issue the writ.


*555 PROCEDURAL AND FACTUAL BACKGROUND
In May 2001, Allen Raymond Taylor pleaded guilty to felony possession of cocaine (Health & Saf.Code, § 11350, subd. (a)). The court sentenced him to three years of formal probation. As part of probation, the court ordered Taylor to "cooperate with the probation officer in a plan for substance abuse counseling" and to "submit to periodic anti-narcotic tests as directed by the probation officer."
In July 2001, Proposition 36 (Pen.Code, § 1210.1)[1] took effect. Known as the Substance Abuse and Crime Prevention Act of 2000, its purpose is to direct non-violent drug abusers away from incarceration and toward community-based drug treatment programs. It applies both to future offenders and to past offenders, such as Taylor, who were already on probation for nonviolent drug possession offenses. (§ 1210.1, subd. (e)(3)(D); People v. Davis (2003) 104 Cal.App.4th 1443, 1446, 129 Cal. Rptr.2d 48.)
In the months following enactment of Proposition 36, Taylor twice violated probation: the first time in the fall of 2001 by failing to appear for several drug tests, and the second time in the spring of 2002 by twice testing positive for cocaine and by failing to report to his probation officer for a drug test. For his first violation, the court reinstated him to probation on the same terms and conditions as before. For his second violation, however, the court concluded Taylor's failure to report to his probation officer for a test did not involve a drug-related condition of probation under Proposition 36's provisions barring incarceration for nonviolent drug possession offenses. Accordingly, the court reinstated probation on the same terms and conditions, but also ordered Taylor to serve 180 days in jail.
Taylor filed a petition for writ of habeas corpus, and we stayed the order confining him to jail.[2]

DISCUSSION
By replacing incarceration with community-based treatment, Proposition 36 works a sea change in California's response to nonviolent drug possession offenses. In its prefatory statement, it states, "... The People of the State of California hereby declare their purpose and intent in enacting this act to be as follows: (a) To divert from incarceration into community-based substance abuse treatment programs nonviolent defendants, probationers and parolees charged with simple drug possession or drug use offenses; [¶] (b) To halt the wasteful expenditure of hundreds of millions of dollars each year on the incarcerationand reincarcerationof nonviolent drug users who would be better served by community-based treatment; and [¶] (c) To enhance public safety by reducing drug-related crime and preserving jails and prison cells for serious and violent offenders, and to improve public health by reducing drug abuse and drug dependence through proven and effective drug treatment strategies."
Anticipating that drug abusers often initially falter in their recovery, Proposition 36 gives offenders several chances at probation before permitting a court to impose jail time. The first time an offender violates a drug-related condition of probation, *556 he is entitled to be returned to probation unless he poses a danger to others. (§ 1210.1, subd. (e)(3)(D).)[3] The second time he violates a drug-related condition of probation, he is entitled to be returned to probation unless he poses a danger to others or is unamenable to treatment. (§ 1210.1, subd. (e)(3)(E).)[4] Only upon a third violation of a drug-related condition of probation does an offender lose the benefit of Proposition 36's directive for treatment instead of incarceration. (§ 1210.1, subd. (e)(3)(F).)[5] Upon such a violation, the court regains its discretion to impose jail or prison time. (People v. Davis, supra, 104 Cal.App.4th at p. 1448, 129 Cal.Rptr.2d 48.) Proposition 36 does not, however, extend the same grace to probationers who violate non-drug-related conditions of probation. The first time a probationer violates such a condition, the court has discretion to incarcerate the person. (§ 1210.1, subd. (e)(2).)[6]
The court here found Taylor's failure to report to his probation officer for a drug test did not involve a drug-related condition of probation. Accordingly, the court imposed as a condition of Taylor's continued probation 180 days in jail. We find the court erred.
Proposition 36 broadly defines drug-related conditions of probation. One such condition includes a "drug treatment regimen." *557 (§ 1210.1, subd. (f) It involves no linguistic or logical stretch to deem a probationer's obligation to take drug tests a part of his treatment regimen, because tests permit authorities to monitor a probationer's compliance with the program by ensuring he is abstaining from illegal drugs. (Accord § 1210.5 [equates "drug testing" with "treatment"].) Because one cannot be tested unless one shows up for the test, it follows that a drug treatment regimen includes appearing for tests. Appearing (or failing to appear) for a drug test thus satisfies the definition of a drug-related condition of probation. (See § 1210.1, subd. (f).)
Respondent defends Taylor's proposed incarceration on several grounds. We find none persuasive. First, respondent notes that reporting to one's probation officer may be a condition of probation for any number of reasons, none of which is necessarily drug-related. Although respondent's observation is generally true, here Taylor's primary, and perhaps only, reason for reporting was for testing; as he stipulated in admitting his probation violation, he failed "to appear for testing." In this case, the failure to report was thus drug-related.[7]
Respondent also contends Proposition 36 does not restrict a court's discretion to impose jail time for nonviolent drug possession or other drug-related offenses. Appellate decisions have rejected this argument. For example, People v. Murillo (2002) 102 Cal.App.4th 1414, 126 Cal. Rptr.2d 358, held that Proposition 36 overrides a sentencing court's traditional discretion, stating "If the trial court maintained the ability to revoke probation ... without regard to the limiting language of section 1210.1, which states the necessary findings to be made for each violation of probation ..., the purpose of Proposition 36, and the will of the voters, would be undermined." (Id. at p. 1421, 126 Cal. Rptr.2d 358; see also Davis at p. 1448,129 Cal.Rptr.2d 48 ["the court does not retain the general discretion to revoke probation ... for those individuals who fall within the protection of Proposition 36"].)
Finally, respondent contends the court implicitly found Taylor was unamenable to further treatment, a circumstance under which Proposition 36 does not apply. (§ 1210.1, subd. (e)(3)(E).) But the record belies respondent's contention. After modifying Taylor's conditions of probation to impose jail time for his second violation, the court otherwise reinstated probation on the same terms and conditions. Among those conditions was Taylor's participating in a drug treatment program. It makes no sense for the court to order continued treatment if the court believed Taylor was unamenable.

DISPOSITION
This court's stay of the trial court's order is vacated and a writ of habeas corpus shall issue directing the trial court to excise that portion of its order imposing *558 180 days in jail for petitioner Allen Raymond Taylor.
We concur: COOPER, P.J., and BOLAND, J.
NOTES
[1]  All further statutory references are to the Penal Code unless otherwise noted.
[2]  Presumably in an abundance of caution to preserve his rights, Taylor also filed a notice of appeal (B163077) but our issuance of a writ makes the appeal moot. By separate order, we have dismissed Taylor's appeal with his consent.
[3]  "If a defendant on probation at the effective date of this act for a nonviolent drug possession offense violates that probation either by being arrested for a nonviolent drug possession offense, or a misdemeanor for simple possession or use of drugs or drug paraphernalia, being present where drugs are used, or failure to register as a drug offender, or any activity similar to those listed in paragraph (1) of subdivision (d) of Section 1210, or by violating a drug-related condition of probation, and the state moves to revoke probation, the court shall conduct a hearing to determine whether probation shall be revoked. The trial court shall revoke probation if the alleged probation violation is proved and the state proves by a preponderance of the evidence that the defendant poses a danger to the safety of others. If the court does not revoke probation, it may modify probation and impose as an additional condition participation in a drug treatment program."
[4]  "If a defendant on probation at the effective date of this act for a nonviolent drug possession offense violates that probation a second time either by being arrested for a nonviolent drug possession offense, or a misdemeanor for simple possession or use of drugs or drug paraphernalia, being present where drugs are used, or failure to register as a drug offender, or any activity similar to those listed in paragraph (1) of subdivision (d) of Section 1210, or by violating a drug-related condition of probation, and the state moves for a second time to revoke probation, the court shall conduct a hearing to determine whether probation shall be revoked. The trial court shall revoke probation if the alleged probation violation is proved and the state proves by a preponderance of the evidence either that the defendant poses a danger to the safety of others or that the defendant is unamenable to drug treatment. If the court does not revoke probation, it may modify probation and impose as an additional condition participation in a drug treatment program."
[5]  "If a defendant on probation at the effective date of this act for a nonviolent drug offense violates that probation a third time either by being arrested for a nonviolent drug possession offense, or by violating a drug-related condition of probation, and the state moves for a third time to revoke probation, the court shall conduct a hearing to determine whether probation shall be revoked. If the alleged probation violation is proved, the defendant is not eligible for continued probation under subdivision (a)."
[6]  "Non-drug-related probation violations[:][¶] If a defendant receives probation under subdivision (a), and violates that probation either by being arrested for an offense that is not a nonviolent drug possession offense, or by violating a non-drug-related condition of probation, and the state moves to revoke probation, the court shall conduct a hearing to determine whether probation shall be revoked. The court may modify or revoke probation if the alleged violation is proved."
[7]  We reiterate our agreement with the People that even for those defendants who have been convicted of drug-related offenses, not every appointment with a probation officer is drug-related. Probation officers may require defendants on probation for drug-related offenses to meet with them for non-drug-related purposes. For example, such appointments might be related to a probationer's obligation to maintain a residence or employment approved by the probation officer, participate in other types of counseling programs, and satisfactorily comply with probation generally. We hold here only that when the probation violation is the failure to appear for an appointment to be tested, then the appointment is a drug-related condition.
