The District Attorney for the 39th Judicial Circuit filed this petition for a writ of mandamus requesting that this Court direct Judge James W. Woodroof to vacate his sentencing order of November 13, 2013, sentencing Austin Smith Clem for his rape convictions and to resentence Clem so that the sentences comply with statutory law. In September 2013, Clem was convicted of one count of first-degree rape and two counts of second-degree rape. Judge Woodroof sentenced Clem to 20 years in prison on the first-degree-rape conviction and ordered that the sentence be “split” so that Clem would serve 2 years in the Limestone County Community Corrections Program (“LCCCP”), followed by 3 years of supervised probation. Clem was sentenced to 10 years in prison for each second-degree-rape conviction; those sentences were also “split,” and he was ordered to serve 2 years in the LCCCP, followed by 3 years of supervised probation on each conviction. At the sentencing hearing, the State argued that the execution of Clem’s 20-year sentence for his conviction for first-degree rape was illegal because, it said, the 2-year period of incarceration was a lesser term of imprisonment than was mandated by the Split Sentence Act, codified at § 15-18-8, Ala.Code 1975. The State further argued that a defendant convicted of first-degree rape was barred from participating in a community-corrections program. After Judge Woodroof failed to correct Clem’s sentences, the State timely filed this petition for a writ of mandamus. Pursuant to the holding of the Alabama Supreme Court in State v. Webber, 892 So.2d 869 (Ala.2004), this Court stayed all action in the circuit court pending the resolution of this mandamus petition.
Initially, we note that this case is correctly before this Court by way of an extraordinary petition for a writ of mandamus. The State may challenge an illegal sentence by filing a mandamus petition. See State v. Williams, 819 So.2d 79, 80 (Ala.Crim.App.2000). In reply to this mandamus petition, Judge Woodroof has responded: “The respondent herein stipulates to a resentencing in the above-styled matter.”
Based on statutory law, this petition for a writ of mandamus is granted. Judge Woodroof is directed to resentence Clem in accordance with the statutory provisions of § 15 — 18—8(a)(1), Ala.Code 1975, and § 15-18-171(14), Ala.Code 1975.
PETITION GRANTED; WRIT ISSUED; STAY LIFTED.
*845WINDOM, P.J., and WELCH, KELLUM, BURKE, and JOINER, JJ., concur.