
12 Cal.App.4th 1308 (1993)
15 Cal. Rptr.2d 896
THE PEOPLE, Petitioner,
v.
THE SUPERIOR COURT OF SAN LUIS OBISPO COUNTY, Respondent; CHARLES EDWARD HENRY, Real Party in Interest.
Docket No. B070061.
Court of Appeals of California, Second District, Division Six.
January 28, 1993.
*1310 COUNSEL
Barry T. LaBarbera, District Attorney, and David T. Hurst, Deputy District Attorney, for Petitioner.
No appearance for Respondent.
James B. Maguire III, Public Defender, for Real Party in Interest.
OPINION
GILBERT. J.
Here we hold that where a person has been committed as a mentally disordered sex offender (MDSO), the maximum term of commitment under Welfare and Institutions Code[1] section 6316.1 does not run while the person is on outpatient status. We grant the People's petition for a writ of mandate.

FACTS
Charles Edward Henry was convicted of one count of child molestation (Pen. Code, § 288, subd. (a)), and committed to Atascadero State Hospital as *1311 a mentally disordered sex offender on May 19, 1977. The maximum term of commitment was four years. (§ 6316.1.)
Henry had served all but five months and eighteen days of the maximum term in actual custody, when he was released from Atascadero as an outpatient on July 17, 1980, on the conditional release program. (Pen. Code, § 1600 et seq.) Since that date there have been annual review hearings at which Henry's outpatient status had been renewed. (Pen. Code, § 1606.) The last annual review hearing was held in February of 1992.
A progress report hearing was held on September 1 and 10 of 1992. At that hearing Henry made a motion to terminate his commitment on the ground that the court had lost jurisdiction. Henry's theory was that the four-year maximum term of commitment had long since run (former § 6316.1), and the People had failed to petition the court to extend the commitment pursuant to section 6316.2.
The trial court granted the motion to terminate the commitment. The court stated its view that the maximum period of incarceration runs while the MDSO is on outpatient status as well as while he is incarcerated. The court also noted the substantial difference between a renewal of outpatient status pursuant to Penal Code section 1606 and an extension of the MDSO commitment pursuant to section 6316.2.
The People seek review by writ of mandate or prohibition.

DISCUSSION
Section 6316.1 subdivision (a) provides in part: "In the case of any person found to be a mentally disordered sex offender ... the court shall state in the commitment order the maximum term of commitment, and the person may not be kept in actual custody longer than the maximum term of commitment, except as provided in section 6316.2. For the purposes of this section, `maximum term of commitment' shall mean the longest term of imprisonment which could have been imposed for the offense or offenses of which the defendant was convicted...."
Section 6316.2 provides a procedure for extending the commitment if the MDSO is predisposed to commit sexual offenses such that he presents a substantial danger of bodily harm to others. (Subd. (a).) A petition to extend the commitment must be filed no later than 90 days before the expiration of the original commitment. (Subd. (b).) The MDSO has the right to a jury trial (subd. (d)) and to all other rights guaranteed under the federal and state Constitutions for criminal proceedings. (Subd. (e).)
*1312 (1) Here no petition to extend the commitment under section 6316.2 was filed. The People contend, however, that no such petition was necessary because the original commitment does not expire until the MDSO serves the maximum term in actual custody.
We agree. Our Supreme Court in In re Moye (1978) 22 Cal.3d 457, 464 [149 Cal. Rptr. 491, 584 P.2d 1097] stated "... the term `actual custody' in section 6316.1 does not include any periods of outpatient supervision in determining the maximum period of confinement." There would have been no need for the "actual custody" provision of section 6316.1, if the Legislature had intended the maximum term of commitment to run while the MDSO was an outpatient.
Our recent decision in People v. Gunderson (1991) 228 Cal. App.3d 1292 [279 Cal. Rptr. 494], does not apply. There the MDSO had served the maximum term in actual custody as provided for in section 6316.1. The only question was whether a two-year extension period provided for in section 6316.2 ran while the MDSO was on outpatient status. We held it did. Our holding was based on the theory that, unlike section 6316.1, section 6316.2 did not contain an "actual custody" provision. (228 Cal. App.3d at p. 1297.)
(2) Henry contends he has been denied due process of law. The contention is based on the different requirements for continuing an MDSO on outpatient status pursuant to Penal Code section 1606 and extending an MDSO commitment under section 6316.2.
Henry points out that to extend the MDSO commitment in an action under section 6316.2 the patient has all the due process accorded a criminal defendant. These rights include trial by jury, and proof beyond a reasonable doubt that the MDSO remains a substantial risk of physical harm to others.
In contrast, Penal Code section 1606 requires only an annual report by the community program director and a hearing by the court on whether outpatient status should be renewed for another year. A person may remain an outpatient as long as he will not be a danger to others and will benefit from an outpatient program. (See Pen. Code, § 1602, subd. (a).)
It is true that an MDSO who has not served the maximum term in actual custody may remain an outpatient indefinitely. It is also true that such an outpatient may remain under MDSO commitment indefinitely with no right to a former section 6316.2 hearing. But nothing in the record shows Henry was forced to accept or remain on the conditional release program. Henry *1313 can end the indefinite suspension of the running of his MDSO term simply by renouncing participation in the outpatient program and returning to actual custody. Because it is within Henry's power to end the indefiniteness of his initial MDSO commitment, we do not see why due process should require a hearing to extend the commitment.
(3) Henry also complains he has been denied equal protection of the law. The argument is based on the theory that persons who serve their maximum term in actual custody are entitled to a section 6316.2 hearing to extend their commitment; whereas persons on outpatient status may suffer an extended commitment without such a hearing.
The equal protection clause of the Fourteenth Amendment merely requires that persons similarly situated receive equal treatment. (8 Witkin, Summary of Cal. Law (9th ed. 1988) Constitutional Law, § 593, p. 44.) An MDSO who serves his full term in actual custody and an MDSO who accepts outpatient status are not similarly situated. Although an MDSO who is on outpatient status may suffer some restraint on his freedom, the MDSO who has served his full term in custody suffers a much greater restraint on his freedom. There is no violation of equal protection.
Let a writ of mandate issue directing the superior court to vacate its order dismissing Henry's MDSO commitment and to reinstate Henry to outpatient status.
Stone (S.J.), P.J., and Yegan, J., concurred.
NOTES
[1]  All statutory references are to the Welfare and Institutions Code unless otherwise stated. MDSO laws were repealed by Statutes 1981, chapter 928, section 2, page 3485; however, they remain applicable to persons previously committed and subject to recommitment. (People v. Lamport (1985) 165 Cal. App.3d 716, 718, fn. 2 [211 Cal. Rptr. 665].)
