
51 Cal.App.3d 329 (1975)
124 Cal. Rptr. 273
THE PEOPLE, Plaintiff and Respondent,
v.
BRUCE ROBERT PRUETT, Defendant and Appellant.
Docket No. 14657.
Court of Appeals of California, First District, Division Two.
September 12, 1975.
*330 COUNSEL
Martin & Martin and Leo M. Pruett for Defendant and Appellant.
D. Lowell Jensen, District Attorney, Harry Murphy and T.W. Condit, Deputy District Attorneys, for Plaintiff and Respondent.
OPINION
KANE, J.
Upon certification by the superior court, we ordered transfer of the appeal in this case, pursuant to Code of Civil Procedure section 911, in order to settle an important question of law, to wit, whether section 851.7 of the Penal Code, to the extent that it prohibits the sealing of arrest records of narcotics offenses charged as misdemeanors, is unconstitutional as a denial of equal protection of the laws.
Defendant, while a minor, was arrested and charged in the Justice Court for the Pleasanton Judicial District with two misdemeanor violations, (1) a violation of section 11530 of the Health and Safety Code (possession of marijuana), and (2) a violation of section 11556 (being in a place where marijuana was being used). Two days later, upon motion of the prosecuting attorney, the charges were withdrawn and the case dismissed. Defendant thereafter petitioned for an order sealing the records in the case, including any records of arrest and detention, pursuant to section 851.7 of the Penal Code. The petition was denied because the violations charged were crimes defined in Division 10 of the Health and Safety Code within the meaning of subdivision (e)(2) of section 851.7 of the Penal Code. On appeal, the superior court, relying on the authority of People v. Ryser (1974) 40 Cal. App.3d 1 [114 Cal. Rptr. *331 668], reversed the order denying the petition and ordered defendant's arrest record sealed.[1]
(1) We agree with the superior court that People v. Ryser is controlling authority. Defendant here, as in Ryser, was charged with misdemeanor offenses under the option granted to the prosecuting attorney in Penal Code section 17, subdivision (b)(4). When so charged, under the circumstances shown here, the crimes charged became misdemeanors "for all purposes." (Pen. Code, § 17, subd. (b); People v. Ryser, supra, p. 9.)
The court in Ryser was concerned with a petition by a minor to seal a record of conviction and other official records in his case, made pursuant to section 1203.45 of the Penal Code, after the minor had received the relief provided by section 1203.4 of the Penal Code. Ryser held section 1203.45 of the Penal Code to be unconstitutional to the extent that it excepted from the sealing privilege Division 10 offenses processed as misdemeanors. (But see People v. Sharman (1971) 17 Cal. App.3d 550, 552-553 [95 Cal. Rptr. 134], which did not reach the equal protection argument, discussed in Ryser, supra, at p. 8, fn. 4.)
Defendant here proceeded under subdivision (a)(2) of section 851.7 of the Penal Code, which permits a minor who has been arrested for a misdemeanor to petition for an order sealing the records in the event proceedings against him are dismissed, or he is discharged, without a conviction. Subdivision (e)(2) of section 851.7 provides that the section does not apply to arrests for, and any further proceedings relating to, "Offenses under Division 10 (commencing with Section 11000) of the Health and Safety Code."
A comparison of the provision in section 1203.45 of the Penal Code at issue in Ryser and the provision in section 851.7 at issue here reveals that the provisions are almost identical. We see no justification for including within the sealing privilege the record of a minor who has suffered a conviction and who has received the relief provided by section 1203.4 of the Penal Code and excluding from the sealing privilege the record of a minor who has suffered an arrest but who has been fortunate enough to have the charges against him dismissed. In either case, "Defendant's exclusion from the sealing privilege effectively shackles him to a lifetime *332 in the rogue's gallery." (People v. Ryser, supra, p. 7.) We therefore adopt the reasoning of Ryser and hold that to the extent that section 851.7 of the Penal Code prohibits the sealing of arrest records of narcotics offenses charged as misdemeanors, and to that extent only, it is unconstitutional as a denial of equal protection of the laws.
The order of the Justice Court for the Pleasanton Judicial District denying petition to seal records is reversed.
Taylor, P.J., and Rouse, J., concurred.
On December 11, 1975, the judgment was modified to read as printed above.
NOTES
[1]  The order denying the petition to seal arrest records was an order made after judgment affecting defendant's substantial rights and was appealable pursuant to subdivision 2(b) of section 1466 of the Penal Code.
