
20 Cal.Rptr.3d 573 (2004)
123 Cal.App.4th 1116
The PEOPLE, Plaintiff and Respondent,
v.
Larry Ray DIAL, Sr., Defendant and Appellant.
No. C045211.
Court of Appeal, Third District.
November 3, 2004.
As Modified November 19, 2004.
Review Denied February 16, 2005.
*575 Eleanor M. Kraft, under appointment by the Court of Appeal, for Defendant and Appellant.
Bill Lockyer, Attorney General, Robert R. Anderson, Chief Assistant Attorney General, Mary Jo Graves, Senior Assistant Attorney General, Carlos A. Martinez, Supervising Deputy Attorney General, Mathew Chan, Deputy Attorney General, for Plaintiff and Respondent.
*574 HULL, J.
The issue presented by this case is whether a defendant awaiting sentencing in California, but incarcerated in another state, was denied equal protection of the laws when he was not returned to California for sentencing upon request. (See U.S. Const., 14th Amend.; Cal. Const., art. I, § 7; id., art. IV, § 16.) We find no constitutional violation and affirm the judgment.

FACTS AND PROCEEDINGS
On May 22, 2000, defendant Larry Ray Dial, Sr., entered a negotiated plea of guilty to transporting methamphetamine during an incident that occurred on February 6, 2000. (Health & Saf.Code, § 11379, subd. (a).) Defendant was not in custody at the time of his plea and he failed to appear for sentencing on June 16. The trial court later learned that, on June 27, defendant was sentenced to prison in the State of Nevada for a maximum of 48 months, with minimum parole eligibility of 19 months. According to court documents, he entered a guilty plea in the Nevada case on January 25, 2000.
On June 22, 2001, defendant filed a pro. per. "Request for Final Disposition" with the trial court, in which he said he wanted to have the instant matter resolved and that he had corresponded with his attorney and the district attorney's office in an effort to do so. On June 29, the court continued the matter to allow defense counsel to obtain defendant's waiver of his right to be present at sentencing. But, at a hearing on August 24, counsel explained: "Your Honor, I've been in communication with [defendant] by phone and also by letter. [Defendant] will not authorize me to proceed in his absence, and I explained to him that the code sections that I've reviewed will not require the Court to bring him back before the Court although the Court did have the power to bring him back if it chose to." The prosecutor said that defendant needed to be present in person at sentencing and they did not have the power to return him from the State of Nevada until he finished his sentence there.
The court ordered the matter taken off calendar pending defendant's release by the State of Nevada. On September 26, 2003, defendant was sentenced upon his release by Nevada authorities. The court imposed a midterm sentence of three years in state prison.

DISCUSSION
On appeal, defendant argues he was denied equal protection of the law *576 when the trial court failed to sentence him within a reasonable time after his request. He claims that, under these circumstances, he should at least have received a sentence that was concurrent with the State of Nevada prison sentence, with credit for time served there.
"`"The concept of the equal protection of the laws compels recognition of the proposition that persons similarly situated with respect to the legitimate purpose of the law receive like treatment."' [Citation.] `The first prerequisite to a meritorious claim under the equal protection clause is a showing that the state has adopted a classification that affects two or more similarly situated groups in an unequal manner.' [Citations.] This initial inquiry is not whether persons are similarly situated for all purposes, but `whether they are similarly situated for purposes of the law challenged.'" (Cooley v. Superior Court (2002) 29 Cal.4th 228, 253, 127 Cal.Rptr.2d 177, 57 P.3d 654.) If this hurdle is overcome, dissimilar treatment of the groups must be justified. "`At a minimum, a statutory classification must be rationally related to a legitimate governmental purpose.'" (People v. Wilkinson (2004) 33 Cal.4th 821, 836, 16 Cal. Rptr.3d 420, 94 P.3d 551.)
Here, defendant attempts to support his equal protection claim by reference to Penal Code sections 1381, 1389, and 1203.2a. (Further unspecified section references are to the Penal Code.) In his brief, defendant "acknowledges that no California statute applies directly to his situation and no California case has extended the benefits of sections 1381, 1389, or 1203.2a to a person in his situation. However, he contends that this court should reform the statutes as necessary, as did the court in Hayes [v. Superior Court (1971) 6 Cal.3d 216], [98 Cal.Rptr. 449, 490 P.2d 1137], to avoid an equal protection violation."

I

Section 1389
Section 1389 is the California codification of the Interstate Agreement on Detainers (IAD). "The IAD establishes a procedure by which a prisoner against whom a detainer has been lodged may demand trial within 180 days of a written request for final disposition properly delivered to the prosecutor and appropriate court of the prosecutor's jurisdiction. (§ 1389, art. III, subd. (a).) The failure of the state receiving the request to act in compliance with the IAD and the 180-day limit results in dismissal of the pending criminal charges with prejudice. (§ 1389, art. V, subd. (c); see, e.g., Marshall v. Superior Court (1986) 183 Cal.App.3d 662, 228 Cal.Rptr. 364.)" (People v. Brooks (1987) 189 Cal.App.3d 866, 872, 234 Cal. Rptr. 573.)
California long ago decided that the IAD does not apply to those who have been found guilty and are awaiting sentencing. (People v. Mahan (1980) 111 Cal. App.3d 28, 33-34, 168 Cal.Rptr. 428 (Mahan); People v. Castoe (1978) 86 Cal. App.3d 484, 487-489, 150 Cal.Rptr. 237.) As we shall explain, the distinction between the two classes of prisoners does not deny those awaiting sentencing equal protection of the law.
Defendants who are awaiting sentencing and those who are awaiting trial are not similarly situated for purposes of the IAD because, as to the former, their guilt of the charges that are the subject of the detainer has been determined. This determination is significant because one of the principal purposes of the IAD is to ensure prompt disposition of the charges that are the subject of the detainer so that unsubstantiated detainers do not adversely affect the treatment and rehabilitation of *577 the prisoner while incarcerated in the sister state. (See Carchman v. Nash (1985) 473 U.S. 716, 105 S.Ct. 3401, 87 L.Ed.2d 516.) Once found guilty of the subject charges, there is no concern that the detainer is without grounds since the adjudication of guilt is proof of the detainer's legitimacy. And evidentiary concerns such as the danger of fading memories and the loss of witnesses or evidence that may arise from a delay in the proceedings are significantly diminished.
But even if we were to conclude that, for purposes of the equal protection analysis, those awaiting trial and those awaiting sentencing were similarly situated, dissimilar treatment of the two groups is justified because it is rationally related to a legitimate government purpose. There are significant expenses involved in bringing an inmate to California and returning him to the state in which he has been incarcerated. There are safety and administrative concerns as well. Avoiding those costs and risks if they are avoidable is a legitimate government purpose, and a classification that excludes from the reach of the IAD those who have absconded after they have been found guilty but before they have been sentenced is rationally related to that purpose, particularly in light of the diminished urgency of sentencing. Defendant's equal protection claim, insofar as it relies on section 1389, necessarily fails.

II

Section 1381
Section 1381 requires sentencing within 90 days upon request by a defendant but it is inapplicable to persons incarcerated out of state. (See People v. Johnson (1987) 195 Cal.App.3d 510, 514-515, 240 Cal.Rptr. 748, disapproved on another ground in In re Hoddinott (1996) 12 Cal.4th 992, 1005, 50 Cal.Rptr.2d 706, 911 P.2d 1381; Mahan, supra, 111 Cal.App.3d at p. 33, 168 Cal.Rptr. 428.)
This distinction does not violate equal protection. We note first of all that defendant directed his "Request for Final Disposition" to the court and not to the district attorney as section 1381 required him to do. Even though addressed to the court, the request shows that defendant sent a copy of it to the "District Attorney Office [sic]." We will give defendant the benefit of the doubt and assume, without deciding, that his effort was sufficient to comply with the statute. In any event, this brings the matter squarely within our holding in Mahan and we need only repeat our discussion there. "Defendant in effect requests that on equal protection principles we excise the language of [section] 1381 limiting its application to in-state prisoners. We decline to do so on these facts. Defendant directed his demand to the superior court, and not the district attorney, as the statute requires. [Citation.] Moreover, even were we to hold that the notice was sufficient to trigger the 90-day period for bringing defendant to sentencing under section 1381, we cannot ignore the fact that the statute contemplates a situation in which it is entirely within the state's power to produce the defendant. The state has an obvious compelling interest in distinguishing between in-state and out-of-state prisoners where, as here, it lacks the means of compelling the attendance of an out-of-state inmate." (Mahan, supra, 111 Cal.App.3d at p. 33, 168 Cal.Rptr. 428.)

III

Section 1203.2a
Section 1203.2a allows probationers who are in custody either in or out of state to be sentenced in absentia, if they follow the statutory procedure for requesting it. Here, defendant was not on probation and his counsel informed the trial court that he *578 was unwilling to forgo his right to be present at sentencing.
Assuming for purposes of argument that defendant is similarly situated to a probationer, it does not mean he may dispense with the requirement that he waive his right to be present at sentencing. (Cf. Mahan, supra, 111 Cal.App.3d at p. 33, 168 Cal.Rptr. 428.) Sentencing is a critical stage in the criminal proceeding at which the defendant has the right to appear with counsel and present evidence. (In re Cortez (1971) 6 Cal.3d 78, 88, 98 Cal.Rptr. 307, 490 P.2d 819; People v. McGraw (1981) 119 Cal.App.3d 582, 594, fn. 1, 174 Cal.Rptr. 711; see also § 977.) It is within the state's prerogative to require a waiver of the right to personal presence because, as previously discussed, there are inherent legal and financial hurdles to having the defendant temporarily returned to this state.
Our conclusion is consistent with the state Supreme Court's decision in Hayes v. Superior Court, supra, 6 Cal.3d 216, 98 Cal.Rptr. 449, 490 P.2d 1137. Hayes involved an equal protection challenge to section 1203.2a, which at that time applied only to persons incarcerated within California. (Hayes v. Superior Court, supra, at pp. 222-223, 98 Cal.Rptr. 449, 490 P.2d 1137.) The state Supreme Court held this limitation violated equal protection and that persons incarcerated outside of California should be entitled to the benefit of the statute if they otherwise complied with the statutory procedure. (Id. at pp. 222-225, 98 Cal.Rptr. 449, 490 P.2d 1137.) But, in so holding, the court rejected the defendant's argument that it was unconstitutional to require him to forgo his right to be present. (Id. at p. 225, 98 Cal.Rptr. 449, 490 P.2d 1137.) The court explained, "The choice required by the statute is a reasonable method of effectuating proper legislative purposes, not an unconstitutional compulsion which needlessly penalizes the assertion of the rights to be present and represented by counsel." (Ibid.)

DISPOSITION
The judgment is affirmed.
We concur: SIMS, Acting P.J., and NICHOLSON, J. *579
