OPINION
Opinion by
This case involves a claim of selective prosecution based on gender. Appellant, Amber Lovill, argues that the Nueces County District Attorney’s Office selectively prosecuted her, seeking to revoke her probation and to incarcerate her in a drug-treatment facility because she was using drugs during her pregnancy. In cause number 13-07-529-CR, Lovill appeals the trial court’s order modifying her probation and imposing sanctions for violating the terms of her probation. In cause number 13-07-668-CR, Lovill appeals the denial of her petition for writ of habeas corpus based on the same order. We have consolidated the two appeals and consider them together. We dismiss Lovill’s direct appeal from the order modifying her probation for lack of jurisdiction. We reverse the trial court’s order denying her petition for writ of habeas corpus and remand for further proceedings consistent with this opinion.
I. Background
A. Underlying Offense and Probated Sentence
On November 15, 2001, Lovill was indicted on two counts of felony forgery resulting from checks she forged. 1 See Tex. Penal Code Ann. § 32.21 (Vernon 2003 & Supp.2008). On January 10, 2005, Lovill entered into a plea bargain with the State and pleaded guilty. In accordance with the plea agreement, the trial court assessed a punishment of two years in state jail, a $1,000 fine, $700 in restitution, and costs; however, the court suspended the prison term and placed Lovill on community supervision for three years. See Tex.Code Crim. Proc. Ann. art. 42.12, § 3 (Vernon 2006 & Supp.2008). As one of the conditions of Lovill’s probation, she was required to “[ajvoid injurious or vicious habits and|7]or, avoid the use of alcoholic beverages, narcotics or any other controlled substances and submit to testing/blood analysis/urinalysis as directed for alcohol or controlled substances.... ” See id. art. 42.12, § 11(a)(2), (14) (Vernon Supp.2008). Lovill was also ordered to participate in a substance abuse program, report weekly to her probation officer, and to “satisfactorily participate in a screening/assessment for substance abuse and submit to any counseling, urinalysis, and/or diversionary program as determine [sic] within the [Community Supervision and Corrections Department (“CSCD”) ] TREATMENT ALTERNATIVE TO INCARCERATION PROGRAM....” See id. art. 42.12, § 13(f) (Vernon Supp.2008).
B. First Motion to Revoke
On September 16, 2005, the State filed a motion to revoke Lovill’s probation. CSCD filed with an “Adult Probation Violation Report” with the district attorney’s office. The reports alleges several violations of Lovill’s probation: (1) On April 15, 2005 and May 19, 2005, Lovill’s urinalysis tested positive for amphetamine; (2) Lovill *70 did not report to her CSCD officer weekly during months of May, June, July, and August 2005; (3) Lovill failed to pay costs, fines, restitution, and fees; and (4) Lovill failed to participate in a screening or assessment for substance abuse because on May 31, 2005, she was discharged from Coastal Bend Outpatient Services due to non-attendance.
On February 2, 2006, Lovill entered another plea bargain with the State and pleaded true to several of the counts in the motion to revoke. The trial court found that Lovill violated her probation on the counts she admitted, and on February 13, 2006, the trial court issued an “Order Imposing Sanctions on Defendant And Continuing or Modifying Probation.” This order required Lovill to serve a term of confinement and treatment in the Nueces County Substance Abuse Treatment Facility (“SATF”) for an indeterminate term of six to twelve months, and after release, to participate in drug or alcohol abuse continuum of care treatment plan. Lovill then went to SATF and remained there until February 8, 2007.
C. Second Motion to Revoke
On July 17, 2007, the State filed a second motion to revoke Lovill’s probation, The motion alleged that Lovill: (1) submitted a urine sample that was positive for amphetamines on July 10, 2007; (2) failed to report for an office visit in June 2007; (3) failed to attend her SATF after-care classes; and (4) failed to pay fines, restitution, costs, and fees. On August 6 and 7, 2007, at a hearing on the motion to revoke, Lovill admitted the violations alleged, and the court accepted her pleas of true.
The State called Sandra Garza to testify. Garza is a CSCD officer for Nueces County who was assigned to supervise Lovill a “couple of weeks” prior to the hearing. Garza recommended to the court that Lo-vill be sanctioned to the Substance Abuse Felony Punishment Facility (“SAFPF”) special needs unit. When asked why, Garza answered, “Ms. Lovill has relapsed. She has continued using drugs. On her last [urinalysis], she was positive. She is positive almost three times. The cutoff is a thousand, and she scored at 3,695 for amphetamine.” The following exchange then occurred between Garza and the prosecutor:
Q: You say special needs. Special needs unit of S.A.F.P.F. Why special needs?
A: Ms. Lovill is pregnant.
Q: She is currently pregnant?
A: Yes.
On cross-examination, Lovill’s counsel explored the reason that CSCD sought to revoke Lovill’s probation:
Q: Ms. Garza, if Ms. Lovill wasn’t pregnant, would the probation, as a probation, would you have considered revoking her at all?
A: We would need to have staffed her had she not been pregnant, but her being pregnant was a very high concern of ours.
Q: So basically it wasn’t so much her doing drugs, it was the fact that since she was pregnant that you filed this motion to revoke, is that correct?
A: On some cases we have worked with individuals who have submitted positive UAs.
Q: How come you weren’t willing to work with Ms. Lovill?
A: She’s pregnant....
Q: So basically, if she had been given the opportunity to make up those [after-care] classes, there wouldn’t have been a violation? *71 A: No. The main — I think what drove this violation report was the positive [urinalysis] and her being pregnant.
The State then rested, and Lovill took the stand. She testified that she would like to go to CASA, which is an outpatient drug treatment facility. She requested that the court continue her on probation with a sanction of CASA or additional jail time added to the probated sentence. She claimed that she wanted to go to outpatient treatment so she could keep the baby with her. Her attorney then argued:
It is obvious the probation would have worked with her, but for the fact that she was pregnant and they decide to revoke her and then send her off to SAFP without even giving Ms. Lovill an opportunity to maybe work with probation even though she is pregnant. She is willing to go to CASA or some other treatment facility that is local; so she can have her baby and not have to go to prison, Your Honor. She had like a year left or so on her probation, so she would like to try and finish out her probation and put this case behind her. She understands that that was poor judgment in her case with the testing positive for amphetamines. In the alternative, if the Court sees fit to revoke her, she would like to do one year and not have to go to SAFP at all.
Counsel for the State argued that Lovill had a serious drug problem. Specifically, the State argued that:
not only is her problem with drugs continuing to be a danger to her, now it is a danger to her unborn child. She needs proper drug treatment in a secure environment and S.A.F.P.F. is a program that will provide that for her.... And also to give her time to address her drug problem and ensure that she is not going to be using drugs during the term of her pregnancy.
Lovill’s counsel then argued that the State “would not even have revoked her, even with the positive UA, but for the fact that she was pregnant; they would have continued to work with her.” Lovill’s counsel asked that the probation department continue to work with her and “give her a chance,” reiterating that “the probation would have worked with her, but for the fact that she is pregnant, they would have kept her on probation.” 2
The trial court disagreed with Lovill’s counsel that the State sought to revoke her probation because she was pregnant: “Well, I think the fact that she tested positive is the reason we are all here, right, not for the fact that she is pregnant.” On August 13, 2007, the trial court issued an “Order Imposing Sanctions on Defendant and Continuing or Modifying Probation.” The court extended Lovill’s probation by one year so that it now expires on January 10, 2009. The court further ordered Lovill to serve an indeterminate term of three to twelve months confinement and treatment in SAFPF.
D. Lovill’s Motion for New Trial
On August 30, 2007, Lovill filed a motion for new trial, which she amended on September 5, 2007. Lovill asserted that the motion to revoke probation should have been dismissed because she was selectively prosecuted based on her gender and in violation of her right to privacy. She argued that the prosecution of the motion to revoke violated her rights under the Due Process and Equal Protection Clauses of the Fourteenth Amendment of the United States Constitution; the Equal Rights *72 Amendment of article I section 3a of the Texas Constitution; and the Due Process Clause of article I section 19 of the Texas Constitution. See U.S. Const, amend. XIV; Tex. Const, art. I, §§ 3a, 19.
On October 4, 2007, the trial court held a hearing on the motion for new trial. First, Lovill called Sandra Garza back to the stand. Garza testified that when a violation of probation occurs, the Nueces County CSCD determines whether to proceed with a probation review or to file a “violation report” with the district attorney’s office. Garza testified that in a probation review, CSCD schedules an appointment with the judge overseeing the case to discuss the problems with a judge. In contrast, if CSCD sends a “violation report” to the district attorney’s office, “it turns into a motion to revoke.” Garza testified that the district attorney’s office typically relies on CSCD to report probation violations — it does not conduct its own investigation.
Garza stated that CSCD has discretion to send, or not to send, a violation report to the district attorney’s office: “It is usually on a case-by-case basis. If a problem arises, we staff the case with our supervisor. At that time, we determine whether to proceed with a probation review or a violation report.” Garza admitted that the department has discretion to refuse to send a violation report to the district attorney’s office even if the person on probation fails a urinalysis. She testified that CSCD considers “how the person is currently doing at the time that the problem is occurring; whether it is a positive [urinalysis] or failure to report. We take into consideration how they have done in the past, any extenuating circumstances like a pregnancy, stuff like that; whether there are any new arrests, stuff like that.”
Garza then discussed Lovill’s pregnancy:
Q: Why was her being pregnant a high concern?
A: Because of the positive urinalysis that she provided on July 10th. It was three times over the — it was close to three times over the cutoff limit.
Q: In light of her pregnancy, what made the high urinalysis result a concern to you?
A: Well, we were concerned for the baby. We were concerned that she would continue using.
When questioned further about the reasons for seeking to revoke Lovill’s probation, Garza testified as follows:
Q: And what was said during that discussion about reasons for terminating or requesting revocation of probation?
A: [Garza’s supervisors] took into consideration the levels on your positive urinalysis. It was more than three times the cutoff and that she was pregnant.
Q: Would that, according to what [the supervisors] said to you, would that violation report have been sent to the DA’s office if she were not pregnant?
A: I don’t know. We would have to take into consideration how she was doing. If she wasn’t pregnant, it is probable that a review would have been scheduled, I’m not certain.
Q: From your review of the case file on August 6th, do you belive [sic] that her pregnancy was a factor that caused a motion to revoke to be filed?
A: Yes.
Q: Do you belive [sic], based on the review that you did in preparation for the August 6th hearing, that a motion to revoke would have been filed if she had not been pregnant?
*73 A: I can’t — I don’t know whether a violation report would have been filed; in all likelihood maybe we would have proceeded with a review.
J.D. Vargas, a probation officer at Nueces County CSCD, also testified. He was assigned to Lovill’s case from May 29, 2007 until the violation report was filed. He testified that he worked on the case with his supervisor, Tom Lavers. Vargas testified that when he met with Lovill, she told him she was pregnant and was very upset. Vargas claimed that Lovill was so upset that he could not calm her down himself, so he recruited Garza to work on the case. He claimed that he was concerned that she was emotionally unstable.
Vargas admitted that Lovill’s pregnancy was a factor that entered into the decision to revoke Lovill’s probation:
Q: Was pregnancy a factor that entered into the termination here?
A: First and foremost the concern was her use of methamphetamine. It was a very high level. Secondly, yes, there is a concern, coupled with that, there is a concern for the overall health of herself, as well as the unborn child.
Q: What options did you have at your disposal, other than sending a violation report to the DA’s office?
A: I didn’t feel I had any other options.
Q: Why?
A: Because of her overall well being, as well as the health and well being of her unborn child.
Q: If she were not pregnant, what options would you have had?
A: If she was not pregnant, there is the possibility that we would have allowed the warrant to either go through the normal channels. There is a possibility that we may have conducted a review before the Court to discuss where to go from there.
[[Image here]]
Q: When somebody has a positive urinalysis for methamphetamine, is that something that automatically results in a violation report going to the D.A.’s office?
A: Every case differs from case to case. Methamphetamine, from what I understand, is a very powerful drug. It is a strong addiction. There is definitely a need to get assistance for that person immediately. The cases vary from case to case. So I can’t speak — you know, I can’t specifically state that everything is going to be the same with what we would do. We may have a person report, in my case, the following week to see how that [urinalysis] comes out, see if the levels are coming down. If not, then it is very apparent that this person is not going to stop using, so we definitely have to file a violation report.
Defense counsel questioned Vargas about a document created by CSCD entitled, “Chronological Record of Contacts for Lovill, Amber.” On July 17, 2007, there is an entry that x*eads: “Phoned and spoke to Lieutenant Ashley at Warrants and asked to see if he may be able to have an officer attempt to have defendant ari’ested since she is consuming methamphetamines and is 5 months pregnant. J.D. Vargas.” Vargas admitted that he wrote the entry. Defense counsel asked Vargas if he would have called Lieutenant Ashley had Lovill not been pregnant. Vargas stated, “In all likely, no.”
The trial court denied Lovill’s motion for new trial on October 4, 2007. On October 11, 2007, Lovill filed a motion to amend the conditions of Lovill’s probation. The trial *74 court denied this motion on October 12, 2007. Lovill then appealed the order revoking her probation and imposing sanctions for violating the terms of her probation. That appeal has been docketed as appellate cause number 13-07-529-CR.
E. LovilPs Petition for Habeas Corpus
Lovill then filed a petition for writ of habeas corpus with the trial court seeking relief from the trial court’s order increasing the term of probation and sentencing Lovill to a term of confinement in SAFPF. 3 Lovill asked the court to take judicial notice of the prior hearings, and she argued that she was selectively prosecuted. On October 18, 2007, without holding a hearing, the trial court denied the petition. The trial court made a single finding of fact: “The prosecution of the motion to revoke probation that was filed on or about July 17, 2007, in Cause No. 01-CR-3725-A did not occur because of Amber Lovill’s pregnancy.” The trial court also made a single conclusion of law: “Amber Lovill’s selective prosecution defense required proof that the prosecution of the motion to revoke probation occurred because of her pregnancy.” Lovill appealed the denial of her petition for writ of habeas corpus, which has been docketed as appellate cause number 13-07-668-CR. We have consolidated the two appeals and decide them both herein.
II. Appellate Jurisdiction
The State urges the Court to dismiss Lovill’s appeal from the order modifying the conditions of her community supervision. The State argues that there is no legislative authority for entertaining a direct appeal from an order modifying the conditions of community supervision.
See Davis v. State,
III. Waiver of Complaints
Before we reach the merits, we must address two waiver arguments raised by the State. First, the State argues that by pleading true to the allegations in the motion to revoke, Lovill waived her selective prosecution claim. Second, the State argues that Lovill waived her selective prosecution claim by failing to timely object at the August 6, 2007 hearing on the State’s *75 motion to revoke. We disagree with both arguments.
A. No Waiver by Plea of True
The State argues that a plea of “true” to a motion to revoke probation waives any non-jurisdictional defects that occurred before the plea was entered, when “the judgment of guilt was rendered independent of, and is not supported by, the error.”
See Young v. State,
The State misunderstands the meaning of
Young
and its application in the present context. In
Young,
the defendant pleaded guilty after the trial court denied a motion to suppress evidence.
The court of criminal appeals reviewed the history of the Helms rule, and it determined that over time, the rule had been distorted from its original justifications. Id. at 657, 666. The court explained that the original basis for the Helms rule was that a defendant’s guilty plea is conclusive as to a defendant’s guilt. Id. at 660-61. As the court explained, given this rationale for the rule, “the rule would not justify forfeiture of claims of error that do not go to the question of guilt, such as denials of motions to dismiss because the penal statute was invalid or the period of limitation had expired.” Id.
After reviewing the rule’s history, the court concluded that in order to remain true to the rule’s original justification, a plea of guilty should only waive errors that are independent of the guilty plea— “[wjhether entered with or without an agreed recommendation of punishment by the State, a valid plea of guilty or nolo contendere ‘waives’ or forfeits the right to appeal a claim of error only when the judgment of guilt was rendered independent of, and is not supported by, the error.” Id. at 666-67.
As in
Young,
the suppression of evidence can relate directly to the defendant’s guilt, and a guilty plea may not be independent of a trial court’s ruling on the motion to suppress depending on the type of evidence and the crime alleged.
See id.
at 667 (“In this case the judgment of guilt is not independent of the trial court’s ruling on the motion to suppress the evidence of the offense, and the judgment would not be supported without that evidence.”);
Jordan,
However, contrary to the State’s argument, the fact that a selective prosecution claim does not involve the defendant’s guilt or innocence does not end the inquiry and require a finding of waiver in the State’s favor. A selective prosecution claim is more akin to a denial of a motion to dismiss because the penal statute is invalid or the period of limitation had expired, which as the court of criminal appeals recognized, would not be waived by a guilty plea even though the claimed error does not go to the question of guilt.
Young,
The State has not cited any Texas case that has refused to consider a selective prosecution claim because of a guilty plea or a plea of “true” in a revocation proceeding. There are none. However, logic requires the conclusion that Lovill’s plea of true was not independent of the State’s alleged selective prosecution. Obviously, there would have been no reason for Lovill to plead “true” if the motion to revoke had never been filed. And according to Lovill, if it were not for the CSCD’s selective prosecution of her based on her pregnancy, no motion to revoke would have been filed. Thus, her plea of “true” was not independent of the alleged selective prosecution, and the plea of “true” did not waive the error.
Cf. Jordan,
B. Timeliness of objection
Second, the State argues that Lo-vill did not timely present her selective prosecution claim because she did not object during the August 6, 2007 revocation hearing. We disagree.
At the August 6 hearing, Lovill’s counsel repeatedly told the court that the State was prosecuting Lovill because she was pregnant and asked that Lovill be treated the same as a non-pregnant offender. The State responded to this argument. The court understood the argument and stated on the record its disagreement: “Well, I think the fact that she tested positive is the reason we are all here, right, not for the fact that she is pregnant.” Because everyone at the hearing understood the substance of Lo-vill’s complaint, including the trial court, we conclude that the issue was preserved.
Winkfield v. State,
Moreover, a selective prosecution claim can be raised at various times during a criminal proceeding. For example, it may be raised in a motion to quash the indictment.
See Covalt v. State,
After the trial court sanctioned Lovill to SAFPF, Lovill moved for a new trial, alleging selective prosecution. The trial court held a hearing, and the issue was extensively litigated. Moreover, Lovill moved to modify the conditions of her probation and then filed her petition for writ of habeas corpus, making the same arguments.
See
Tex.Code Crim. Proc. Ann. art. 11.072, § 3(b). Lovill took every opportunity to make her complaints known to the trial court, and the court clearly understood and ruled on the issue. Lovill’s issue is pi-eserved for our review.
Satterwhite,
As a corollary, and without citing any authority, the State argues that Lovill waived her complaints because she asked to be sanctioned by being placed in the CASA program or by additional jail time. The State reasons that “at best, Lovill simply failed to object, and, at worst, she affirmatively asked to be sanctioned and her conditions to be modified, though she was not ultimately sanctioned in the exact manner she desired.” We disagree that Lovill’s request to be sent to an outpatient treatment facility or to add time to the probated sentence affirmatively waived her right to assert a claim of selective prosecution. “A waiver is ordinarily an intentional relinquishment or abandonment of a known right or privilege.”
Leday v. State,
IY. Equal PROTECTION
Lovill argues that the State selectively prosecuted her based on her gender in violation of the Equal Protection Clause of the United States Constitution and the Equal Rights Amendment to the Texas Constitution (“ERA”).
See
U.S. Const. amend. Y, XIV; Tex. Const, art. I, § 3a (“Equality under the law shall not be denied or abridged because of sex, race, col- or, creed, or national origin. This amendment is self-operative.”). The State disputes nearly every facet of Lo-vill’s claims. First, the State argues that Lovill failed to demonstrate that the violation report was filed and that the conditions of Lovill’s probation were modified because of her pregnancy. Second, the State argues that even if pregnancy was a factor, it did not amount to gender-based discrimination. Finally, even if it discriminated based on gender, the State argues that such discrimination was justified. The parties agree that Lovill’s federal constitutional claim is subject to intermediate scrutiny, which requires that the State demonstrate that the discriminatory classification is substantially related to an important governmental interest.
Casarez v. State,
*78 A. Standard of Review in Habeas Corpus Appeals
In this case, the trial court ruled on the merits of Lovill’s petition for writ of habeas corpus.
See
Tex.Code Crim. Proc. art. 11.072, § 7(a). We review the trial court’s decision to grant or deny ha-beas relief for abuse of discretion.
Ex parte Wilson,
B. Selective Prosecution Generally
Prosecutors enjoy significant discretion in their prosecutorial decisions.
United States v. Armstrong,
Prosecutorial discretion, however, is not absolute — prosecutors are constrained by the constitution.
Armstrong,
Ordinary standards for equal protection claims apply in the context of selective prosecution;
4
Armstrong,
517
*79
U.S. at 465,
C. Discriminatory Effect and Purpose
Lovill contends that the trial court erred by finding that the prosecution of the motion to revoke “did not occur because of Amber Lovill’s pregnancy.” Lo-vill argues that the probation officers’ testimony established that CSCD initiates the prosecution of pregnant women for probation violations in situations where the CSCD would not make the same recommendation if the defendant were male or a nonpregnant female. Lovill also asserts that the CSCD officers admitted that her pregnancy was a motivating factor in the decision to prosecute her.
The State argues that Lovill was prosecuted because she violated the terms of her probation and because she appeared emotionally unstable when she reported to her probation officers, not because she was pregnant. In other words, the State argues that Lovill’s claim must fail because she was guilty of violating her probation. However, the guilt or innocence of the defendant is irrelevant to the claim of selective prosecution.
Armstrong,
The trial court’s sole conclusion of law was that Lovill’s selective prosecution claim required proof that she was prosecuted “because of’ her pregnancy. It found as a matter of fact that Lovill was not prosecuted “because of’ her pregnancy. It appears that the trial court failed to recognize that in a selective prosecution claim, the discriminatory purpose need not be the
only
purpose for the prosecution. Rather, the discriminatory purpose must merely be a “motivating factor” for the decision to prosecute.
See Wayte,
The State argues that the CSCD officers’ testimony at the hearing was purely speculative and merely showed a possibility that the department would not have filed a violation report if Lovill had not been pregnant. As Lovill points out, we must defer to the trial court’s findings of historical facts when they are supported by the record and when they depend on determinations of credibility and demeanor.
Ex parte Wilson,
The only evidence came from the State’s witnesses, who admitted that they were not “willing to work with” Lovill to try alternative measures because of her pregnancy. Garza explained that CSCD has discretion whether to file a violation report with the district attorney’s office. As she stated, once CSCD makes that decision and sends the report, it “turns into a motion to revoke.” The district attorney’s office relies on CSCD’s determination and does not typically conduct its own investigation. She explained that there are alternatives to filing a violation report, such as proceeding with a probation review before a judge.
Garza testified that a violation report is not automatic when a person tests positive for drugs — she admitted that the department has discretion to refuse to send a violation report to the district attorney’s office even if the probationer fails a urinalysis. She testified that the department considers the probationer’s past and extenuating circumstances, such as pregnancy.
Garza testified that on some cases, CSCD has worked with individuals who tested positive for drugs. But CSCD was not willing to work with Lovill because she was pregnant. Garza testified that “what drove this violation report was the positive [urinalysis] and her being pregnant.” Garza explained that her supervisors made the decision to revoke Lovill’s probation, and that the supervisors “took into consideration the levels on your positive urinalysis. It was more than three times the cutoff and that she was pregnant.” 6 From her review of the case file, she testified that pregnancy was a factor that caused the motion to revoke to be filed.
*81 Garza stated that had Lovill not been pregnant, a probation review may have been scheduled instead of a violation report being filed. Vargas admitted that absent the pregnancy, he “might have attempted a review and scheduled weekly visits to see how she is doing” and “more random [urinalysis] to see if the levels are coming down to see if she can do it on her own.” Vargas admitted that the pregnancy “eliminated any doubt” about the decision he had to make. Contrary to the State’s arguments, there is nothing speculative about any of this testimony.
Although a trial court has discretion to disregard uncontradicted testimony that it finds incredible and unworthy of belief,
see Ex parte Peterson,
Nevertheless, the State argues that the evidence showed that even if Lovill had not been pregnant, the State probably would have filed a probation review and taken her before a judge, which could have produced the same result. We disagree that this is a proper consideration. Courts cannot speculate whether the same outcome would have occurred absent the selective prosecution.
See Vasquez v. Hillery,
[j]ust as a conviction is void under the Equal Protection Clause if the prosecutor deliberately charged the defendant on account of his race, a conviction cannot be understood to cure the taint attributable to a charging body selected on the basis of race. Once having found discrimination in the selection of a grand jury, we simply cannot know that the need to indict would have been assessed in the same way by a grand jury properly constituted.
Id.
Finally, the State argues that even if pregnancy was a factor in the decision to prosecute, it did not discriminate against Lovill based on her gender. It argues that pregnancy causes added stress, anxiety, and physical sickness to the expectant mother, which makes it difficult to comply with conditions of probation and to maintain the willpower necessary to overcome a drug addiction. The State argues that Lovill asks the State to do the impossible — to disregard the biological and psychological symptoms of pregnancy even though those symptoms may effect her rehabilitation. The State cites no authority for its argument, which we believe is based on archaic and outdated views of pregnancy and of women. Even if the State acts with the intent of protecting a pregnant woman’s health, it still may over
*82
step the boundaries of the constitution when its actions result in discriminatory treatment based on pregnancy.
See, e.g., Cleveland Bd. of Educ. v. LaFleur,
D. Justification
Lovill and the State both concede that under the United States Constitution, gender-based discrimination claims are evaluated under an intermediate scrutiny analysis.
See Clark v. Jeter,
Our analysis of these arguments is hindered by the fact that the trial court never reached this issue. The trial court, in a habeas corpus proceeding, may review the applicant’s petition without requesting a response from the State. Tex.Code Crim. Proc. art. 11.072, § 5(b). If the State does not file an answer, all allegations in the application are deemed denied.
Id.
art. 11.072, § 5(e). As is apparent from its finding of fact and conclusion of law, the trial court determined that Lovill did not meet her burden to establish an Equal Protection violation. Had the trial court correctly determined that Lovill met her burden, the burden would have then shifted to the State to justify its conduct under the appropriate level of scrutiny.
See Johnson,
The record on this issue is wholly undeveloped and requires a hearing by the trial court. We are not in the position to decide these issues in the first instance. Accordingly, we reverse the trial court’s denial of Lovill’s petition for writ of habeas corpus and remand to the trial court.
See Ex parte Cherry,
Y. Conclusion
We dismiss Lovill’s appeal from the order modifying the conditions of her probation for lack of jurisdiction. Because the trial coui’t erred in finding that Lovill did not sustain her burden of showing an Equal Protection violation, we reverse the trial court’s order denying Lovill’s petition for writ of habeas corpus and remand to the trial court for further proceedings con *83 sistent with this opinion. 7
Notes
. The indictment was entered as trial court cause number 01-CR-3725-A, in the 28th District Court of Nueces County, Texas.
. In the reporter's record, this statement is incorrectly attributed to the prosecutor. Both parties agree that the statement was made by Lovill’s counsel, not the State.
. This petition was filed as trial court cause no. 07-5690-A in the 28th District Court of Nueces County, Texas.
. The State argues that Lovill's claim is really one for “selective enforcement,'' rather than for “selective prosecution,” because Lovill was prosecuted and found guilty long before the present revocation proceeding. It argues that a community supervision revocation proceeding is neither a criminal nor a civil trial, but rather, an administrative proceeding, citing
Cobb v. State,
. As the Supreme Court recognized,
[r]arely can it be said that a legislature or administrative body operating under a broad mandate made a decision motivated solely by a single concern, or even that a particular purpose was the "dominant” or "primary” one. In fact, it is because legislators and administrators are properly concerned with balancing numerous competing considerations that courts refrain from reviewing the merits of their decisions, absent a showing of arbitrariness or irrationality. But racial discrimination is not just another competing consideration. When there is a proof that a discriminatory purpose has been a motivating factor in the decision, this judicial deference is no longer justified.
Vill. of Arlington Heights v. Metro. Hous. Dev. Corp.,
. The State argues that this testimony is speculative because the defense never called Lav-ers, Garza's and Vargas’s supervisor, to testify. The State does not cite any legal authority to support its argument that Lavers's testimony was required. Moreover, the State did not object to Garza's testimony at the hearing as speculative, as not based on her own personal knowledge, or as hearsay.
. We do not reach Lovill's argument that the State's selective prosecution of her based on her pregnancy also impinged on her right to privacy in making child-bearing decisions. Tex.R.App. P. 47.1. The trial court did not reach this issue and should consider it on remand.
