
175 Cal.App.4th 859 (2009)
THE PEOPLE, Plaintiff and Respondent,
v.
OSCAR ARMANDO OCHOA, Defendant and Appellant.
No. C059868.
Court of Appeals of California, Third District.
June 15, 2009.
*861 Michele A. Douglass, under appointment by the Court of Appeal, for Defendant and Appellant.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Michael P. Farrell, Assistant Attorney General, Catherine Chatman and Jeffrey A. White, Deputy Attorneys General, for Plaintiff and Respondent.

OPINION
RAYE, J. 
After the trial court denied his motion to defer entry of judgment (Pen. Code, § 1000 et seq.), defendant Oscar Armando Ochoa pled guilty to possessing cocaine (Health & Saf. Code, § 11350, subd. (a)) and using it (Health & Saf. Code, § 11550, subd. (a)). Thereafter, defendant was placed on probation pursuant to Proposition 36. (Pen. Code, § 1210.1.)
On appeal, defendant contends the court erred in finding that his January 2006 conviction under Health and Safety Code section 11357, subdivision (b)occurring more than two years before the current February 2008 offensesrendered him ineligible for deferred entry of judgment under Penal Code section 1000.[1] The People concede the error and we agree.
(1) In contrast to Proposition 36, which applies following conviction and to a slightly different category of cases, Penal Code section 1000 applies at the accusatory pleading stage. It provides that a defendant who has been charged with specified drug offenses and has not committed a crime of violence or threatened violence may undergo a drug education and treatment program in lieu of undergoing a criminal prosecution, and upon satisfactory completion may obtain dismissal of the criminal charges. (See In re Varnell *862 (2003) 30 Cal.4th 1132, 1138-1139 [135 Cal.Rptr.2d 619, 70 P.3d 1037]; People v. Sharp (2003) 112 Cal.App.4th 1336, 1341 [5 Cal.Rptr.3d 771]; Pen. Code, § 1210.1, subds. (a), (b)(5).)
Prior to his guilty plea, defendant asked that he be found eligible for deferred entry of judgment under Penal Code section 1000. The prosecution took the position that defendant's January 2006 marijuana possession conviction (Health & Saf. Code, § 11357) automatically disqualified him from the operation of section 1000, presumably because he was precluded from satisfying the condition that he "ha[ve] no conviction for any offense involving controlled substances prior to the alleged commission of the charged offense" within the meaning of section 1000, subdivision (a)(1). The court apparently accepted the prosecution's position, because it set the matter for trial. Thereafter, defendant entered his guilty pleas.
(2) The parties are correct that the court erred in its implicit determination that defendant's more than two-year-old marijuana possession conviction rendered him ineligible for Penal Code section 1000 deferred entry of judgment.
(3) Health and Safety Code section 11361.5, subdivision (a) provides that records "pertaining to the arrest or conviction of any person for a violation of subdivision (b) ... of [Health and Safety Code] Section 11357 ... shall not be kept beyond two years from the date of the conviction, or from the date of the arrest if there was no conviction ...."
Health and Safety Code section 11361.7, subdivision (a) provides that any document either destroyed pursuant to Health and Safety Code section 11361.5 "or more than two years of age ... shall not be considered to be accurate, relevant, timely, or complete for any purposes by any agency or person." By enacting section 11361.7, the Legislature provided "`in the broadest terms possible that public agencies may not impose any collateral sanctions on individuals on the basis of the possession of marijuana convictions or arrests encompassed by the statute.'" (People v. Boyd (1979) 24 Cal.3d 285, 292-293 [155 Cal.Rptr. 367, 594 P.2d 484] (Boyd), quoting Governing Board v. Mann (1977) 18 Cal.3d 819, 827-828 [135 Cal.Rptr. 526, 558 P.2d 1].)
Together, these statutes provide for "destruction of records as to possession of small amounts of marijuana and thus a person previously convicted of such an offense will no longer be ineligible for diversion" under Penal Code section 1000. (Bosco v. Justice Court (1978) 77 Cal.App.3d 179, 185 [143 Cal.Rptr. 468]; see also Boyd, supra, 24 Cal.3d at p. 290 [defendant cannot *863 be charged with possession of a handgun by a convicted felon where the felony was a marijuana offense coming within the terms of Health & Saf. Code, § 11361.5].)
Accordingly, the record of defendant's January 2006 conviction for marijuana possession should have been destroyed after two years. If it had been destroyed as required by Health and Safety Code section 11361.5, it could not have been considered by the trial court in determining defendant's eligibility for deferred judgment pursuant to Penal Code section 1000; and in any event, neither the prosecutor nor the court should have considered it "for any purposes." (Health & Saf. Code, § 11361.7, subd. (a).)
Because it appears from the record that the only factor affecting defendant's eligibility for Penal Code section 1000 deferral was his January 2006 marijuana possession conviction, we shall order the matter remanded to the trial court for an eligibility determination.

DISPOSITION
The judgment is reversed and the matter remanded to the trial court for an evaluation of defendant's eligibility for deferred judgment under Penal Code section 1000.
Scotland, P. J., and Butz, J., concurred.
NOTES
[1]  A defendant is eligible for diversion under Penal Code section 1000 ifas herehe or she has been charged with violating Health and Safety Code sections 11350 and 11550 and all of the following apply: "(1) The defendant has no conviction for any offense involving controlled substances prior to the alleged commission of the charged offense. [¶] (2) The offense charged did not involve a crime of violence or threatened violence. [¶] (3) There is no evidence of a violation relating to narcotics or restricted dangerous drugs other than a violation of the sections listed in this subdivision. [¶] (4) The defendant's record does not indicate that probation or parole has ever been revoked without thereafter being completed. [¶] (5) The defendant's record does not indicate that he or she has successfully completed or been terminated from diversion or deferred entry of judgment pursuant to this chapter within five years prior to the alleged commission of the charged offense. [¶] (6) The defendant has no prior felony conviction within five years prior to the alleged commission of the charged offense." (Pen. Code, § 1000, subd. (a).)
