
80 Cal.Rptr.2d 472 (1998)
68 Cal.App.4th 776
LAURA B., Petitioner,
v.
The SUPERIOR COURT of Orange County, Respondent;
Orange County Social Services Agency, Real Party In Interest.
No. G023979.
Court of Appeal, Fourth District, Division Three.
December 15, 1998.
*473 Carl C. Holmes, Public Defender, Jeff Lund, Supervising Deputy Public Defender, Ed Eisler, Supervising Deputy Public Defender, and Paul T. DeQuattro, Deputy Public Defender, for Petitioner.
Laurence M. Watson, County Counsel, and Amy E. Morgan, Deputy County Counsel, for Real Party in Interest.
Harold F. LaFlamme, Santa Ana, and Craig E. Arthur, Newport Beach, for the Minor.

OPINION
BEDSWORTH, J.
Laura B. seeks extraordinary relief from orders of the Orange County Juvenile Court denying reunification services and scheduling a Welfare and Institutions Code[1] section 366.26 permanency hearing for her daughter, Alicia B. She contends the court abused its discretion when it declined to order reunification services pursuant to section 361.5, subdivision (b)(12) based on her history of failed substance abuse rehabilitation. Her argument is that there was insufficient evidence she resisted available treatment programs in the three years immediately preceding the filing of the dependency petition. Having reviewed her petition on the merits, we deny relief. (Cal. Rules of Court, rule 39.1B.)
Alicia was born in May 1998 in the ambulance transporting her and her mother to the hospital for delivery. Tests showed she had been exposed to cocaine in utero, and Laura refused to undergo a drug test at the hospital.
Laura has three other children: Timothy P. (born in November 1985), Bradley W. (born in December 1989), and Jeffrey W. (born in April 1991). All three boys are in their maternal grandmother's custody under a voluntary guardianship. Bradley was also born addicted to cocaine and was declared a dependent child of the Orange County Juvenile Court. Prior to consenting to the guardianship, Laura successfully reunified with Bradley in 1990.
At the time of the adjudication hearing in this case, Laura was 34 years old and admitted an 18 year drug habit. She has participated in numerous rehabilitation programs, completing two 30-day residential programs, and a longer program when she reunified with Bradley. Twice she has failed to complete year-long programs. She most recently attended a program in 1994, which she did not complete. She did, however, continue attending Alcoholics Anonymous and Narcotics Anonymous meetings until about a year before Alicia was born. She quit because she began using drugs again. During the first two months of her pregnancy, she used cocaine at least twice a week. After learning she was pregnant, she cut down to using every other week.
At the time of the hearing, Laura had completed 100 hours of substance abuse instruction and 32 hours of parenting classes *474 while in jail.[2] Upon her release from jail in the middle of the adjudication hearing, Laura entered Foley House, a residential recovery program for women and their children.
Due to her history of substance abuse and failure to rehabilitate, the court declined to order reunification services to Laura. The court felt the requirements of section 361.5, subdivision (b)(12) were satisfied by proof of Laura's use of drugs during her pregnancy. It reasoned such drug use constituted resistance to treatment of her drug problem during the three years prior to the filing of the petition on Alicia. It therefore scheduled a permanency hearing and Laura initiated these writ proceedings.

DISCUSSION
Laura contends the court abused its discretion when it denied services because Orange County Social Services Agency (SSA) failed to prove that rehabilitation programs were available to her during the three years prior to the filing of the petition on Alicia. She argues the fact she used drugs during pregnancy alone is not enough to prove her resistance during the requisite time period. While we agree with the latter contention, we deny Laura extraordinary relief because she oversimplifies the state of the evidence and misconstrues the relevant statutory provision.
Section 361.5, subdivision (b)(12) provides: "Reunification services need not be provided to a parent ... when the court finds, by clear and convincing evidence: ... [¶] (12) That the parent ... of the minor has a history of extensive, abusive, and chronic use of drugs or alcohol and has resisted prior treatment during a three-year period immediately prior to the filing of the petition which brought that minor to the court's attention, or has failed or refused to comply with a program of drug or alcohol treatment described in the case plan required by Section 358.1 on at least two prior occasions, even though the programs identified were available and accessible."[3]
Laura argues that in order for services to be denied under the resistance theory, SSA must prove that the treatment programs were available to her during the relevant three-year period. She correctly notes no such proof was offered in this case. Her argument fails, however, because no such proof is required by the statute.
This provision creates two bases for denying services: either (1) where the parent with a significant substance abuse problem has resisted treatment of that problem during the three years prior to the filing of the petition; or (2) where the parent has twice previously been provided and failed or refused to take advantage of available rehabilitation services while under the supervision of the juvenile court. The first provision does not require proof that the prior treatment occur during the three-year period; it requires proof that the resistance to such treatment occur.
Of course, resistance would be easiest to prove if the facts demonstrated that the parent entered one or more available programs during the relevant period only to drop out repeatedly without completing them. But, as we recently noted in Randi R. v. Superior Court (1998) 64 Cal.App.4th 67, 74 Cal.Rptr.2d 770, the concept of resistance does not require opposition to treatment by direct action. (Id. at p. 73, 74 Cal.Rptr.2d 770.) What SSA is required to show is that a parent has previously undergone or enrolled in substance abuse rehabilitation. Then, during the three years prior to the petition being filed, the parent evidenced behavior that demonstrated resistance to that rehabilitation. Such proof may come in the form of dropping out of programs, but it may also come in the form of resumption of regular *475 drug use after a period of sobriety. That is exactly what was shown here.
Laura had completed at least three programs prior to the relevant three-year period. At the inception of that period, she continued to attend her 12-step programs and maintain the sobriety she had acquired under her last formal rehabilitation program. However, by her own testimony, she "started hanging around with the wrong group of people" and ultimately ended up resuming her drug abuse. Such evidence satisfies the requirements of the statute even though there was no proof she attended any formal rehabilitation programs during the three years prior to Alicia's birth.
We do not mean to imply agreement with the trial court's conclusion the mere fact Laura used drugs while pregnant sufficiently evidenced resistance to treatment. Such is not always the case. A mother who regularly attends her program could experience a brief relapse during pregnancy but immediately resume treatment. That type of behavior would not necessarily prove resistance. But Laura did not just suffer a setback; she did not just fall off the wagon on one or two occasions. She stopped attending Narcotics Anonymous meetings and returned to consistent, habitual, semiweekly and then biweekly substance abuse. Regular use of cocaine throughout pregnancy cannot be considered a simple relapse. It is an abundantly clear demonstration of a determination to maintain a drug habit. The trial court reasonably interpreted this as resistance to treatment.
Substantial evidence supports the juvenile court's finding Laura resisted treatment during the three years prior to the filing of the dependency petition on Alicia. The petition for extraordinary relief is denied.
CROSBY, Acting P.J., and RYLAARSDAM, J., concur.
NOTES
[1]  All statutory references are to the Welfare and Institutions Code unless otherwise noted.
[2]  Laura was arrested on May 19, 1998, on outstanding warrants for being under the influence of a controlled substance and resisting arrest.
[3]  Although Laura failed to complete two substance abuse rehabilitation programs, the juvenile court could not have denied services to Laura on that basis because she voluntarily enrolled in those programs. In order for reunification services to be denied due to a parent's failure or refusal to comply with treatment, the programs must have been components of prior reunification plans recommended pursuant to section 358.1 and subsequently ordered by the juvenile court in formal dependency proceedings.
