
122 P.3d 1041 (2005)
The PEOPLE of the State of Colorado, Plaintiff-Appellee,
v.
Jose Albert HEREDIA, Defendant-Appellant.
No. 04CA0115.
Colorado Court of Appeals, Div. II.
May 19, 2005.
As Modified on Denial of Rehearing June 16, 2005.[*]
Certiorari Granted November 7, 2005.
*1042 John W. Suthers, Attorney General, Christine C. Brady, Assistant Attorney General, Denver, Colorado, for Plaintiff-Appellee.
David S. Kaplan, Colorado State Public Defender, Kathleen A. Lord, Chief Appellate Deputy State Public Defender, Denver, Colorado, for Defendant-Appellant.
TAUBMAN, J.
Defendant, Jose Albert Heredia, appeals the trial court's order granting the People's Crim. P. 35(a) motion to correct Heredia's sentence to impose consecutive terms of mandatory parole. We vacate the order and remand.

I. Background
In 1999, Heredia was sentenced to three years in the Department of Corrections (DOC) for first degree criminal trespass and a consecutive two years in DOC for possessing a dangerous weapon. The applicable mandatory parole period was two years. Heredia served his time in DOC and was released on parole.
*1043 In September 2001, Heredia failed to report to a shelter as required by the terms of his parole. In December 2001, the state charged him with escape from custody, pursuant to §§ 17-27.5-104 and 18-8-208(2), C.R.S.2004, a class three felony.
In August 2001, before Heredia's parole violation, a division of this court held that sentencing a defendant to two periods of mandatory parole violated § 18-1.3-401(1)(a)(V)(E), C.R.S.2004 (formerly § 18-1-105(1)(a)(V)(E)), which governs consecutive sentences, and therefore, the mandatory parole period imposed on an escape charge should be served concurrently with the mandatory parole period remaining on the underlying charge. People v. Luther, 43 P.3d 660 (Colo.App.2001)(Luther I), rev'd, 58 P.3d 1013 (Colo.2002)(Luther II). Certiorari was granted in Luther I on March 18, 2002.
In May 2002, while certiorari was pending in Luther I, Heredia pleaded guilty to attempted escape pursuant to § 18-8-208.1, C.R.S.2004. In the plea agreement, Heredia stipulated to a sentence of one year in DOC with no reconsideration to be served consecutively to any sentence he was currently serving. The offense was a class four felony and carried a mandatory parole period of three years.
Heredia filed a Crim. P. 35(c) motion to amend the mittimus to reflect concurrent mandatory parole terms in compliance with Luther I. In October 2002, the trial court granted the motion and amended the mittimus to direct that Heredia's mandatory parole sentence for the attempted escape charge was to be served concurrently with the remainder of his mandatory parole for the underlying charge. The People did not appeal this modification.
In November 2002, the supreme court reversed the decision in Luther I, holding that a parole revocation reincarceration was not a period of mandatory parole or a sentence that carried parole, and therefore, § 18-1.3-401(1)(a)(V)(E) did not apply. Luther II, supra.
In September 2003, the People filed a Crim. P. 35(a) motion to correct an illegal sentence based upon Luther II. In December 2003, the trial court granted the motion and ordered Heredia to serve his underlying sentence, his mandatory parole revocation period, his sentence for attempted escape, and finally, the period of mandatory parole associated with the attempted escape charge.
Heredia appealed in January 2004, and the following day, he objected in the trial court to its ruling based on Luther II.

II. Jurisdiction
Heredia contends that the trial court lacked jurisdiction to reinstate his original sentence because the modification of his sentence under Luther I was legal, and therefore, the trial court lost jurisdiction because the modification became a final judgment. The People assert that Heredia's sentence based on Luther I became illegal as a result of Luther II, and thus, the trial court was correct in modifying the sentence pursuant to Crim. P. 35(a). We agree with Heredia, but on slightly different grounds.
We first consider and reject the People's assertion that we should not address Heredia's claims because they were not raised in the trial court before Heredia filed his notice of appeal. Jurisdictional issues may be raised at any time, including for the first time on appeal. People v. Torkelson, 22 P.3d 560 (Colo.App.2000)(citing People v. Hinchman, 196 Colo. 526, 589 P.2d 917 (1978)).
"[A] trial court loses jurisdiction upon imposition of a valid sentence except under circumstances specified in Crim. P. 35." People v. Mortensen, 856 P.2d 45, 47 (Colo.App.1993). Thus, we must determine whether Heredia's sentence was valid, and, if so, whether the People are entitled to relief under Crim. P. 35.

A. Validity of Heredia's Sentence
We conclude that under Mortensen, Heredia's sentence was valid.
In Mortensen, the defendant received a deferred judgment and sentence. Subsequently, the deferred judgment and sentence were revoked, and the defendant was resentenced to four years in a community corrections *1044 facility. After serving approximately fourteen months in the facility, he was transferred to a nonresidential program. Ultimately, his sentence to community corrections was revoked, and the court resentenced him to four years incarceration.
The defendant spent a total of 468 days in the community corrections program, which included both residential and nonresidential time. He argued that he should be given presentence confinement credit for all 468 days under People v. Hoecher, 804 P.2d 230 (Colo.App.1990)(holding that defendant was entitled to credit for both residential and nonresidential community corrections time), rev'd, 822 P.2d 8 (Colo.1991).
Subsequently, the supreme court reversed Hoecher. The People moved to modify the defendant's sentence, and the trial court granted the motion. The trial court issued an order reducing the defendant's presentence confinement credits from 468 to 198 days.
On appeal, a division of this court concluded that the trial court lost jurisdiction once it imposed a valid sentence, and therefore, the trial court had exceeded its jurisdiction when it modified the defendant's otherwise valid sentence. Mortensen, supra; see also People v. Janke, 852 P.2d 1271 (Colo.App.1992)(where trial court's order granting defendant's Crim. P. 35(c) motion became final, it did not retain jurisdiction to reconsider its ruling based upon subsequent court of appeals decision; trial court's final order could only be amended by motion under C.R.C.P. 59 or 60).
Here, Heredia's underlying convictions for criminal trespass and possession of a dangerous weapon were valid. The People did not assert in their Crim. P. 35(a) motion that Heredia's sentences for the underlying convictions were illegal in any way.
Similarly, neither Heredia nor the People asserted that Heredia's sentence for attempted escape was illegal. As noted, Heredia pleaded guilty to attempted escape pursuant to § 18-8-208.1, a class four felony with a presumptive sentencing range of two to six years and a three-year period of mandatory parole. Section 18-1.3-401(1)(a)(V)(A). Therefore, the mitigated sentence that Heredia stipulated to in his plea agreement, a consecutive one-year term in DOC and three years of mandatory parole, was consistent with his plea and complied with the statutory presumptive sentencing range. See § 18-1.3-401(6), C.R.S.2004 (upon finding extraordinary mitigating circumstances, the court may impose a sentence no less than one-half the minimum term authorized in the presumptive range).
The People argue that the supreme court's holding in Luther II caused Heredia's sentence to become illegal. However, because both the sentences for the underlying convictions and the sentence for attempted escape were valid final sentences, the trial court did not reacquire jurisdiction to modify the sentences upon the announcement of Luther II. See Janke, supra. Consequently, the trial court lost jurisdiction except for those circumstances specified in Crim. P. 35. See Mortensen, supra.

B. Crim. P. 35 Relief
We conclude that the People are not entitled to relief under Crim. P. 35.
The People moved to correct Heredia's sentence pursuant to Crim. P. 35(a), which allows for the correction of an illegal sentence. The version of Crim. P. 35(a) in effect at the time the People's motion was decided provided in part, "The court may correct an illegal sentence at any time . . . ." The current version of Crim. P. 35(a), effective July 1, 2004, provides in part, "The court may correct a sentence that was not authorized by law or that was imposed without jurisdiction at any time . . . ."
However, as we read the People's argument, their Crim. P. 35(a) motion challenged the manner in which Heredia's two sentences were effectuated, rather than the legality of the sentences themselves. To understand the People's argument, a review of the differences between Luther I and Luther II is necessary.
The statutes at issue in the Luther cases were §§ 18-1.3-401(1)(a)(V)(E) and 18-8-208.1(1), C.R.S.2004. Section 18-1.3-401(1)(a)(V)(E) provides: "If an offender is *1045 sentenced consecutively for the commission of two or more felony offenses . . . the mandatory period of parole for such offender shall be the mandatory period of parole established for the highest class felony of which such offender has been convicted." (Emphasis added.)
Section 18-8-208.1(1) provides: "If a person, while in custody or confinement following conviction of a felony, knowingly attempts to escape from said custody or confinement, he commits [attempted escape]. The sentence imposed [for attempted escape] shall run consecutively with any sentences being served by the offender." (Emphasis added.)
In Luther, the defendant was serving an eighteen-month term in DOC for a class four felony. The defendant's sentence carried with it a three-year period of mandatory parole. The defendant was subsequently released to parole and was placed in in-home detention. The defendant absconded, but subsequently was arrested and charged with escape. His parole was revoked, and he pleaded guilty to attempted escape.
For the escape, the parties stipulated to a three-year sentence in DOC, consecutive to the defendant's earlier sentence. The trial court advised the defendant that he would have to finish serving his sentence for the underlying conviction, which included the remainder of his mandatory parole period, before he could begin serving the sentence for the escape conviction and its attendant three-year period of mandatory parole.
The defendant moved for postconviction relief, contending that the manner in which his sentences were imposed violated § 18-1.3-401(1)(a)(V)(E) because he would be forced to serve two mandatory periods of parole instead of just the parole period for the higher class felony.
The division in Luther I agreed because at the time the defendant was sentenced on the escape charge, he had not completed serving the period of mandatory parole on the underlying conviction, and therefore, the division concluded that the trial court in effect required him to serve two periods of mandatory parole. The division determined that the trial court's order violated § 18-1.3-401(1)(a)(V)(E), which governed consecutive sentences. The Luther I division then ordered that the mittimus be amended to reflect that the defendant began serving the sentence for attempted escape when he was sentenced on that conviction, and that the attempted escape sentence would be followed by a period of mandatory parole.
In Luther II, the supreme court reversed the division's holding. It concluded that once the defendant was reincarcerated after his parole was revoked, he was no longer serving a sentence for mandatory parole. Instead, the defendant was serving a parole revocation reincarceration period. Therefore, requiring the defendant to complete the parole revocation reincarceration period before he could begin serving his sentence for attempted escape did not violate § 18-1.3-401(1)(a)(V)(E) because that confinement was not a period of mandatory parole.
Accordingly, the difference between the holdings in Luther I and Luther II is the date upon which a defendant begins to serve the sentence for the escape charge. Luther I held that it begins on the date the defendant is sentenced on the escape charge, while Luther II requires that the defendant serve the time remaining on his parole revocation reincarceration period from the underlying conviction before he serves the sentence for the escape conviction.
Thus, we conclude that the People's motion challenges the manner in which Heredia was ordered to serve his sentences, rather than the legality of the sentences themselves. Because we determined above that both sentences were legal, we further conclude that the People's argument that the sentences violated Crim. P. 35(a) fails. Therefore, Crim. P. 35(a) did not allow the People to invoke the jurisdiction of the trial court.
Nevertheless, a challenge to the manner in which the sentences were effectuated might otherwise fit within the provisions of Crim. P. 35(c).
Crim. P. 35(c)(2), which was unchanged by the 2004 rule amendments, provides in relevant part:

*1046 [E]very person convicted of a crime is entitled as a matter of right to make application for postconviction review upon the grounds hereinafter set forth. . . .
(I) That the conviction was obtained or sentence imposed in violation of the Constitution or laws of the United States or the constitution or laws of this state;
(II) That the applicant was convicted under a statute that is in violation of the Constitution of the United States or the constitution of this state . . . [or]
(III) That the court rendering judgment was without jurisdiction over . . . the subject matter.
See also Jones v. Zavaras, 926 P.2d 579 (Colo.1996)(challenges to the procedures by which a defendant was sentenced rather than the legality of his confinement may be raised under Crim. P. 35(c)).
However, by its terms, Crim. P. 35(c) applies only to defendants. See also § 18-1-410(1), C.R.S.2004 ("every person convicted of a crime is entitled as a matter of right to make applications for postconviction review"). (Emphasis added.)
Accordingly, we conclude that the trial court lacked jurisdiction to grant the People's motion because the sentences imposed were valid and Crim. P. 35 did not afford the People a basis to invoke the jurisdiction of the trial court.
Our conclusion does not leave the People without a remedy. As noted above, the People could have filed a direct appeal of the trial court's order granting Heredia's motion based upon Luther I. Although Luther I was controlling at that time, the People were aware that certiorari had been granted in Luther I when the trial court modified Heredia's sentence based on that decision. Thus, the People had a good reason for appealing the trial court's order.
Moreover, the People could have filed a C.A.R. 21 petition in the nature of mandamus. See, e.g., People v. Dist. Court, 673 P.2d 991 (Colo.1983)(correction of an illegal sentence is an extraordinary cause for which mandamus is available).
The People's remedy may also lie in an action against DOC to challenge the manner in which it executed the sentences. See People v. Huerta, 87 P.3d 266 (Colo.App.2004)(a challenge to an act by DOC lies in a civil action against DOC); People v. Carrillo, 70 P.3d 529 (Colo.App.2002)(defendant did not contend that the restitution portion of his sentence was illegal or that it was imposed in a illegal manner, and therefore, he sought relief against DOC and his claim was not cognizable under Crim. P. 35(c)); People v. McMurrey, 39 P.3d 1221 (Colo.App.2001)(motion challenging DOC's authority to classify defendant as sex offender was not appropriate under Crim. P. 35(c)).
Finally, while the People contend that the trial court's modification of Heredia's sentence based upon Luther I was illegal, that order is not at issue before us on this appeal.
Based on our resolution of these issues, we need not address Heredia's argument that the People are not entitled to relief under Crim. P. 35(a).
The order is vacated, and the case is remanded for reinstatement of the prior mittimus. The mittimus should be corrected to reflect that Heredia was convicted of attempted escape in violation of § 18-8-208.1, rather than escape in violation of § 18-8-208(2).
Judge ROTHENBERG concurs.
Judge RUSSEL dissents.
Judge RUSSEL dissenting.
In October 2002, the trial court modified Heredia's sentence to conform to the views expressed in People v. Luther, 43 P.3d 660 (Colo.App.2001) (Luther I). In December 2003, the court corrected Heredia's sentence to conform to People v. Luther, 58 P.3d 1013 (Colo.2002) (Luther II).
Heredia now contends that the trial court lacked authority to issue the December 2003 order. Our resolution of his contention depends on how we answer two subsidiary questions:
1. When the trial court modified Heredia's sentence in October 2002, did the order result in an illegal sentence?

*1047 2. If so, did the trial court have authority to correct the illegal sentence in December 2003, even though the prosecution failed to appeal the October 2002 order?
Because the majority believes that the answer to the first question is no, it does not reach the second question. It simply concludes that the trial court lacked authority to correct a sentence that was never illegal.
I disagree with the majority's view. Because I conclude that the answer to the first question is yes, I would address the second question and further conclude that the trial court had authority to correct the illegal sentence.
I write separately to explain my view.

I. The October 2002 Order Resulted in an Illegal Sentence
It is undisputed that, in October 2002, the trial court modified Heredia's sentence to achieve the result contemplated in Luther I. Therefore, to gauge the legality of the trial court's order, we must understand what occurs under the analysis of Luther I, and how this differs from the outcome under Luther II.

A. Luther I and Luther II Concern the Original Parole Period
The Luther cases concern the relationship between two sentences:
1. Original Sentence. Luther was convicted of manslaughter and was sentenced to a prison term, plus three years of mandatory parole. He served his prison term and was released to parole. He then absconded, which resulted in the revocation of his parole. Following revocation, Luther was returned to prison to serve the remainder of his mandatory parole period.
2. Attempted Escape. In addition to having his parole revoked, Luther was charged with escape. He pled guilty to attempted escape and was sentenced to three years in prison, plus three years of mandatory parole, to be served consecutively to his original sentence.
The debate in Luther I and Luther II centered on the original parole period  specifically, the portion that remained to be served after revocation of parole and reincarceration. The issue was whether this unserved period was "parole" within the meaning of the former § 18-1-105(1)(a)(V)(E) (now codified as § 18-1.3-401(1)(a)(V)(E), C.R.S.2004). The courts reached different conclusions on this issue of statutory interpretation:
 In Luther I, a division of this court held that this period was "parole" within the meaning of § 18-1-105(1)(a)(V)(E). Because it was parole, ruled the division, Luther could not be required to serve this period in prison before starting his consecutive sentence for attempted escape; rather, Luther was to serve this period concurrently with the parole period that attached to the sentence for attempted escape. Consequently, Luther began serving his sentence for attempted escape on the day that he was sentenced for that crime. Luther I, supra, 43 P.3d at 662-63.
 In Luther II, the supreme court held that this period was not "parole" within the meaning of § 18-1-105(1)(a)(V)(E). Because it was not parole, held the court, Luther would be required to serve the remaining period in prison, plus his consecutive sentence for attempted escape, before being released to mandatory parole. See Luther II, supra, 58 P.3d at 1016-17.
Although the supreme court found various flaws in Luther I's analysis, two points are critical for our purposes: (1) under Luther I, the court that imposes sentence for the crime of attempted escape also dictates how the defendant will serve the period of parole that attached to the original sentence; and (2) the sentencing court does not have the authority to do this. See Luther II, supra, 58 P.3d at 1016 ("[O]nce the parole board released Luther to his mandatory parole period, the trial court lacked authority to impact the terms of that parole, or the penalties for violation of that parole.").


*1048 B. The October 2002 Order Exceeded the Trial Court's Authority
The trial court's October 2002 order states that Heredia's sentence for attempted escape would be served as follows: "Sentence is Consecutive, Mandatory Parole Period of 3 Years i[s] Concurrent." The trial court issued this order so that Heredia's sentence would conform to the views set forth in Luther I. Ironically, by following the dictates of Luther I, the trial court exceeded its authority in two ways.
First, the court invaded the exclusive province of the parole board and affected sentences imposed by other district courts. Just as in Luther I, the October 2002 order effectively negated the period of reincarceration that Heredia would have served for violating mandatory parole, which was part of earlier sentences imposed by other district courts. As noted in Luther II, however, once the parole board released Heredia to his original mandatory parole, "the trial court lacked authority to impact the terms of that parole, or the penalties for violation of that parole." Luther II, supra, 58 P.3d at 1016. The trial court had no authority to invade the exclusive province of the parole board, nor did it have authority to affect sentences imposed by other district courts. See Meredith v. Zavaras, 954 P.2d 597, 602 (Colo.1998) ("a district court lacks authority to address the circumstances around a plea bargain, judgment of conviction, or court sentence entered in another district court"); Bullard v. Dep't of Corr., 949 P.2d 999, 1003 (Colo.1997) ("[t]he Montrose court had no authority to construe or terminate the El Paso sentence").
Second, the court exceeded its statutory authority. As a result of the October 2002 order, Heredia was to serve his sentence for attempted escape concurrently with the reincarceration period that followed revocation of his original period of mandatory parole. See People v. Perea, 74 P.3d 326, 334 (Colo.App.2002) (in effect, Luther I required that the sentence for attempted escape "be served concurrently with the first sentence until the period of mandatory parole associated with that first sentence was extinguished"). This result conflicts with the governing statute, which required imposition of a consecutive sentence. See § 18-8-208.1(1), C.R.S.2004 ("If a person, while in custody or confinement following conviction of a felony, knowingly attempts to escape from said custody or confinement, he commits a class four felony. The sentence imposed pursuant to this subsection (1) shall run consecutively with any sentences be served by the offender.").

C. The October 2002 Order was "Illegal" under Crim. P. 35(a)
The majority holds that the October 2002 order affected the "manner in which Heredia was ordered to serve his sentences, rather than the legality of the sentences themselves." In my view, this conclusion evidences a misunderstanding about the nature of illegal sentences. The question is not whether a sentencing order merely affects the manner in which sentences are served; it is whether the sentencing court has acted outside of its jurisdiction. If a court has no authority to direct the manner in which a sentence is served, its attempt to do so is "illegal." See In re Mills, 135 U.S. 263, 270, 10 S.Ct. 762, 764, 34 L.Ed. 107 (1890) ("[T]he orders directing the sentences of imprisonment to be executed in a penitentiary are void. This is not a case of mere error, but one in which the court below transcended its powers.").
Because the trial court lacked authority to (1) invade the province of the parole board, (2) affect sentences imposed by other district courts, and (3) impose a concurrent sentence in violation of statute, the October 2002 order was "illegal" within the meaning of the then effective version of Crim. P. 35(a). See People v. Torkelson, 971 P.2d 660, 661 (Colo.App.1998) (sentence was illegal because it was imposed by a county judge lacking lawful authority); People v. Anaya, 894 P.2d 28, 31 (Colo.App.1994) ("A sentence that is beyond the statutory authority of the court is illegal."). And because the October 2002 order was illegal in these ways, the entire sentence was illegal. See Delgado v. People, 105 P.3d 634, 636-37 (Colo.2005).

D. The Sentence was Illegal When Issued
Heredia argues that, because the October 2002 order was issued before the supreme court decided Luther II, his sentence was *1049 legal when it was imposed. I disagree. Luther II did not change the law, it merely clarified what the pertinent statute has always meant. See People v. Grenemyer, 827 P.2d 603, 607 (Colo.App.1992) (if foreseeable, a judicial interpretation of a statute can be retroactively applied to a criminal defendant). Although the trial court issued the October 2002 order in reliance on Luther I, Heredia had no vested right in this erroneous interpretation of the law. See Aue v. Diesslin, 798 P.2d 436, 441 (Colo.1990).
Heredia also argues that the prosecution failed to prove the factual predicate necessary to sustain its request for correction of the October 2002 order. I again disagree. This was a question of law, and the trial court could properly conclude that its sentencing order was illegal simply by reviewing the October 2002 order in light of Luther II.

II. The Trial Court had Jurisdiction to Correct its Illegal Sentence
Having concluded that the October 2002 order resulted in an illegal sentence, I now consider whether the trial court had jurisdiction to correct the sentence in December 2003. I further conclude that the answer is yes.
Heredia argues that the trial court lacked jurisdiction because the prosecution is not a "person convicted of a crime," within the meaning of § 18-1-410, C.R.S.2004. Although I agree with Heredia's reading of the statute, I disagree with his conclusion. In my view, a trial court does not need statutory authority to acquire jurisdiction over an illegal sentence. Rather, a trial court retains jurisdiction to correct an illegal sentence at any time because an illegal sentence represents a kind of jurisdictional defect. See Casias v. People, 148 Colo. 544, 546-47, 367 P.2d 327, 328 (1961) ("[A] trial court which enters an erroneous judgment and sentence in a criminal proceeding retains jurisdiction to correct such erroneous sentence."); see also United States v. Henry, 709 F.2d 298, 307-08 (5th Cir.1983) (en banc) (the court's power to correct an illegal sentence at any time springs from the court's want of jurisdiction to impose the illegal sentence in the first place).
Also, contrary to Heredia's argument, in my view, a trial court may act upon a Crim. P. 35(a) motion that is filed by the prosecution. Other courts have reached this conclusion under the pre-1987 federal rule, on which our rule is based. See United States v. Corbitt, 13 F.3d 207, 211-12 (7th Cir.1993) (the government could invoke the pre-1987 version of Fed.R.Crim.P. 35 to correct an illegal sentence); State v. Wika, 574 N.W.2d 831, 832-33 (N.D.1998) (the prosecution may bring a motion to correct an illegal sentence under state Rule 35(a) that is modeled on pre-1987 federal rule). Indeed, a court may correct an illegal sentence sua sponte. See Guerin v. Fullerton, 154 Colo. 142, 144, 389 P.2d 84, 85 (1964) (under Crim. P. 35, the court may correct an illegal sentence on its own motion so long as the parties have notice and an opportunity to be heard).
I agree with Heredia that the trial court's October 2002 order could have been appealed, and I agree that, because it did not appeal, the prosecution must overcome the law of the case doctrine. See United States v. Mazak, 789 F.2d 580 (7th Cir.1986) (although Fed.R.Crim.P. 35(a) allows correction of an illegal sentence at any time, the law of the case doctrine applies); Paul v. United States, 734 F.2d 1064 (5th Cir.1984) (same); Scott v. State, 150 Md.App. 468, 822 A.2d 472 (2003) (same), aff'd, 379 Md. 170, 840 A.2d 715 (2004).
But this obstacle is not insurmountable. The law of the case doctrine is flexible, and a court may, where appropriate, overlook the doctrine and its own prior ruling to grant relief under Crim. P. 35(a). See United States v. Mazak, supra, 789 F.2d at 581 (law of the case doctrine will not be enforced where doing so would produce an injustice); see also United States v. Quon, 241 F.2d 161 (2d Cir.1957); Ekberg v. United States, 167 F.2d 380, 384 (1st Cir.1948) (because the sentencing court may correct an illegal sentence at any time, the trial court had the power to grant the defendant's second motion, notwithstanding its denial of the earlier motion).
I acknowledge that a criminal defendant may overcome the law of the case doctrine more easily than the prosecution. But if the prosecution's Crim. P. 35(a) motion is meritorious, as this one was, a court may revisit its *1050 previous ruling and correct an illegal sentence in the prosecution's favor, even though this may result in a longer sentence for the defendant.
I make this observation with two points in mind.
First, if correction of an illegal sentence affects the voluntariness of a defendant's plea agreement, the plea itself may have to be invalidated under Crim. P. 35(c). But a court cannot be precluded from correcting an illegal sentence merely because the sentence formed part of the plea bargain. See Craig v. People, 986 P.2d 951, 959 (Colo.1999) (when parties agree to a sentence that is contrary to law, the resulting illegality is not subject to specific enforcement); cf. Chae v. People, 780 P.2d 481 (Colo.1989) (defendant could withdraw guilty plea under a plea agreement that included as material element a recommendation for an illegal sentence).
Second, if an illegal sentence is corrected after the defendant has been released, he or she may receive credit for the number of days that he has "served" his sentence out of custody. See People v. Stark, 902 P.2d 928 (Colo.App.1995) (citing White v. Pearlman, 42 F.2d 788 (10th Cir.1930)).
I conclude that the trial court had authority to correct the October 2002 order under Crim. P. 35(a). For this reason, I respectfully dissent.
NOTES
[*]  Russel, J., would GRANT.
