
133 Cal.Rptr.2d 544 (2003)
108 Cal.App.4th 556
MARTHA C., Petitioner,
v.
The SUPERIOR COURT OF SAN DIEGO COUNTY, Respondent;
The People, Real Party in Interest.
No. D041101.
Court of Appeal, Fourth District, Division One.
May 6, 2003.
Steven J. Carroll, Public Defender, and Jo Pastore, Deputy Public Defender, for Petitioner Martha C.
No appearance for Respondent.
Paul J. Pfingst and Bonnie M. Dumanis, District Attorneys, Anthony Lovett and Genaro C. Ramirez, Deputy District Attorneys, for Real Party in Interest.
BENKE, J.
A Welfare and Institutions Code[1] section 602 petition alleged that Martha C. possessed marijuana for sale and transported marijuana. Martha was eligible for deferred entry of judgment (DEJ) pursuant to section 790 et seq.[2] She admitted the allegations of the petition but the trial court refused to proceed pursuant to that procedure. Martha seeks a writ of mandate requiring the trial court grant her DEJ.

BACKGROUND

A. Deferred Entry of Judgment

The DEJ provisions of sections 790 et seq. were enacted as part of Proposition 21, The Gang Violence and Juvenile Crime Prevention Act of 1998, in March 2000. The sections provide that in lieu of jurisdictional and dispositional hearings, a minor may admit the allegations contained in a section 602 petition and waive time for the pronouncement of judgment. Entry of judgment is deferred. After the successful completion of a term of probation, on the motion of the prosecution and with a positive recommendation from the probation department, the court is required to dismiss the charges. The arrest upon which judgment was deferred is deemed never to have occurred, and any records of *545 the juvenile court proceeding are sealed. (§§ 791, subd. (a)(3); 793, subd. (c).)
Section 790 makes a minor eligible for DEJ if all the following circumstances exist:
"(1) The minor has not previously been declared to be a ward of the court for the commission of a felony offense.
"(2) The offense charged is not one of the offenses enumerated in subdivision (b) of Section 707.
"(3) The minor has not previously been committed to the custody of the Youth Authority.
"(4) The minor's record does not indicate that probation has ever been revoked without being completed.
"(5) The minor is at least 14 years of age at the time of the hearing.
"(6) The minor is eligible for probation pursuant to Section 1203.06 of the Penal Code." (§ 790, subd. (a)(1)-(6).)
If the minor waives the right to a speedy jurisdictional hearing, admits the charges in the petition and waives time for pronouncement of judgment, the court may summarily grant DEJ or refer the matter to the probation department for further investigation. The department is required to take into consideration "the defendant's age, maturity, educational background, family relationship, demonstrable motivation, treatment history, if any, and other mitigating and aggravating factors in determining whether the minor is a person who would be benefited by education, treatment, or rehabilitation." (§ 791, subd. (b).) The trial court makes "the final determination regarding education, treatment, and rehabilitation of the minor." (Ibid.)
If the entry of judgment is deferred, the court is required to make submission to a warrantless search a condition of probation and consider the imposition of drug testing and other stated conditions, and it may impose any condition of probation authorized by the code that the court believes would assist in the education, treatment and rehabilitation of the minor and prevent criminal activity. (§ 794.)

B. Procedural Background

Customs officers searched the vehicle in which 17-year-old Martha and another individual entered the United States from Mexico. In the gas tank the officers found 26.64 pounds of marijuana. An additional 28.30 pounds were found in the rear seat. A section 602 petition alleged Martha transported and possessed marijuana for sale.
At the readiness conference Martha admitted both allegations of the petition. The court found she was eligible for the DEJ procedure and the probation department was directed to submit a report concerning Martha's suitability for disposition under that procedure. The court stated if it was determined Martha was not suitable, she would be allowed to withdraw her admissions.
The probation report stated the facts of the alleged offense. It noted Martha had no juvenile record, her behavior at home was compliant, her home was stable and nurturing, and while she had been habitually truant from school in the past, she was in a new alternative education program and was doing well. The probation officer concluded Martha would benefit by education, treatment and rehabilitation pursuant to the DEJ procedure and that she would be acceptable to all appropriate programs.
The trial court denied application of the deferred judgment procedure. The court stated: "Because of the nature of the offense and the social policy implications to *546 granting people who engage in these kind of offenses with 790, so that there is no deterrent effect of the community when kids are employed to do this and then come into court and have no significant consequences that they feel are of a lasting effect."
The court later expanded on its reasoning: "This is a sophisticatedthe record reflects that there was a sophisticated process of transporting marijuana across the border. This was packaged inside a gas tank and it was close to 50over 50 pounds, apparently. Some in the gas tank and some in the rear seat of the vehicle. It is the impression or the understanding and belief of the judges in this court, and probably in the community, that there are many young people who are engaged by others in the process of bringing drugs across the border. It is not an appropriate message to send to the kids who get engaged in this undertaking, or to the people who hire them, that they can simply come into court and be granted deferred entry of judgment and have no record whatsoever, and in order to deter this kind of use of young people, and particularly this young woman, who's clearly talented and smart, from violating the law in this way, I feel that the social policy concerns mitigate against granting the DEJ."
Martha petitioned for a writ of mandate, this court issued an order to show cause.

DISCUSSION
Discretion
Martha contends that when a minor meets the eligibility requirements of section 790, subdivision (a), the court may deny DEJ only if it determines the minor would not benefit from the education, treatment or rehabilitation available through the program. Martha argues the trial court abused its discretion in denying her DEJ since it did so not because she was unamenable to education, treatment or rehabilitation but because the court wished to deter other minors who might engage in sophisticated drug smuggling schemes. We agree with Martha.
To be admitted to the DEJ program, a minor must be eligible under section 790, subdivision (a). While such eligibility is a necessary condition for DEJ, it is not alone a sufficient basis. Under proper circumstances the court may refuse DEJ even to minors eligible under section 790, subdivision (a). (In re Sergio R. (2003) 106 Cal.App.4th 597, 603, 131 Cal.Rptr.2d 160.) While section 790 et seq. might be clearer on the matter, we conclude such denial is proper only when the trial court finds the minor would not benefit from education, treatment and rehabilitation.
Proposition 21 contains a non-codified section entitled Findings and Declarations; subdivision (j) of those findings states: "Juvenile court resources are spent disproportionately on violent offenders with little chance to be rehabilitated. If California is going to avoid the predicted wave of juvenile crime in the next decade, greater resources, attention, and accountability must be focused on less serious offenders such as burglars, car thieves, and first time non-violent felons who have potential for rehabilitation. This act must form part of a comprehensive juvenile justice reform package which incorporates major commitments to already commenced `at risk' youth early intervention programs and expanded informal juvenile court alternatives for low-level offenders. These efforts, which emphasize rehabilitative protocols over incarceration, must be expanded as well under the provisions of this act, which requires first time, non-violent juvenile felons to appear in court, admit guilt for their offenses, and be held accountable, but also given a non-custodial *547 opportunity to demonstrate through good conduct and compliance with a court-monitored treatment and supervision program that the record of the juvenile's offense should justly be expunged." (Italics added.)
These findings express not only a strong preference for rehabilitation of first time non-violent juvenile offenders but suggest that under appropriate circumstances DEJ is required. This strong preference for rehabilitation and the limitation on the court's power to deny delayed entry of judgment is reflected in the procedures used in considering DEJ.
Section 791, subdivision (b), provides for an investigation by the probation department to determine whether the minor "is a person who would be benefited by education, treatment, or rehabilitation." The court is charged with making "the final determination regarding education, treatment, and rehabilitation of the minor." (Ibid.) There is nothing in the section suggesting that any consideration other than the minor's nonamenability to rehabilitation is a proper basis for denying deferred entry of judgment. Such a narrow limitation on the bases for denial is consistent with the strong preference for rehabilitation stated in the Declaration and Findings section of Proposition 21.
While the question of the limitation on the bases for the denial of DEJ was not directly addressed in its opinion, the court in In re Sergio R., supra, 106 Cal.App.4th at page 607, 131 Cal.Rptr.2d 160, described the operation of discretion in the denial of deferred entry of judgment in this way: "In accordance with the plain meaning of the statutory language we conclude that the juvenile court has discretion to grant deferred entry of judgment to an eligible minor. Contrary to appellant's suggestion, denial of deferred entry of judgment is not an abuse of discretion merely because the minor has satisfied the eligibility requirements of section 790, subdivision (a), and rule 1495(a). Instead, the court makes an independent determination after consideration of the `suitability' factors specified in rule 1495(d)(3) and section 791, subdivision (b), with the exercise of discretion based upon the standard of whether the minor will derive benefit from `education, treatment, and rehabilitation' rather than a more restrictive commitment. [Citations.]" (Italics added, fn. omitted.)
In this case, the probation department concluded Martha would benefit from education, treatment and rehabilitation. The trial court's remarks suggest it agreed. The court, however, denied DEJ because it wished to send a message to other potential juvenile drug smugglers that there would be permanent consequences flowing from such criminal activity. This was not an appropriate basis for denying DEJ since it had nothing to do with Martha's potential for rehabilitation. While a court might find that the circumstances of a crime indicate a minor is not amenable to rehabilitation (see generally In re Sergio R., supra, 106 Cal.App.4th at p. 607, 131 Cal.Rptr.2d 160), and on that basis deny DEJ, it may not do so as a means of deterring criminal activity by others.

DISPOSITION
The writ of mandate is granted; the trial court is ordered to reconsider DEJ for Martha consistent with the views expressed in this opinion.
WE CONCUR: KREMER, P.J., and McDONALD, J.
NOTES
[1]  All references are to the Welfare and Institutions Code unless otherwise specified.
[2]  See also California Rules of Court, rule 1495.
