
887 So.2d 314 (2004)
Ex parte State of Alabama.
(In re STATE of Alabama
v.
Laurence MONETTE).
No. CR-03-0390.
Court of Criminal Appeals of Alabama.
February 6, 2004.
William H. Pryor, Jr., atty. gen., and W. Van Davis, district atty., Pell City, for petitioner.
Edwin M. Van Dall, Jr., Pell City, for respondent.
PER CURIAM.
The district attorney for the Thirtieth Judicial Circuit filed this petition for a writ *315 of mandamus directing Judge Charles E. Robinson, Sr., to set aside his December 9, 2003, order suspending Laurence Monette's sentence and to reinstate the 15-year sentence originally imposed. On January 22, 2003, Monette pleaded guilty pursuant to a plea agreement to burglary in the first degree and was sentenced to 15 years in the state penitentiary. At that time he applied for probation. On April 29, 2003, Judge Robinson denied his request for probation and modified his original sentencing order to impose additional conditions that Monette enroll and complete anger-management classes and domestic-violence classes. In June 2003, Monette filed a motion to alter, amend or vacate the sentence. A second motion to alter, amend, or vacate the sentence was filed in November 2003. On December 9, 2003, Judge Robinson granted Monette's motion and ordered that Monette serve one year in prison and a period of five years on probation. The district attorney then filed this mandamus petition.
This case is correctly before this Court by mandamus petition. The State may file a mandamus petition challenging an illegal sentence. See Smith v. State, 447 So.2d 1334 (Ala.1984).
The district attorney argues that Judge Robinson was without jurisdiction to modify Monette's sentence almost 11 months after Monette was sentenced. Monette argues that pursuant to § 15-18-8, Ala.Code 1975, the Split Sentence Act, Judge Robinson retained jurisdiction to split Monette's sentence any time after Monette was sentenced.
Generally, a trial court retains jurisdiction to modify a sentence for 30 days after that sentence is pronounced. See Jolly v. State, 689 So.2d 986 (Ala.Crim.App.1996). Cf. State v. Green, 436 So.2d 803 (Ala.1983) (a trial court may grant probation any time before the execution of the sentence). A trial court also retains jurisdiction if the original sentence is imposed pursuant to the Split Sentence Act. If the sentence is imposed pursuant to the Split Sentence Act the trial court retains jurisdiction of that sentence until the expiration of the period of confinement. See § 15-18-8(c), Ala.Code 1975.
On January 22, 2003, Monette was sentenced to 15 years' imprisonment. Judge Robinson retained jurisdiction to modify that sentence for 30 days after it was pronounced. However, the sentence was not modified during that period and no motion to alter, amend, or vacate the sentence was filed within 30 days from the date of sentencing.
In June 2003 and in November 2003, Monette filed motions to alter, amend, or vacate his sentence. A motion to alter, amend, or vacate a sentence is the functional equivalent of a motion for a new trial and "should be treated the same procedurally as a motion for new trial or a motion in arrest of judgment...." Melvin v. State, 583 So.2d 1365, 1366 (Ala.Crim.App.1991). See also Pickron v. State, 475 So.2d 593 (Ala.Crim.App.1984), aff'd, 475 So.2d 599 (Ala.1985). A motion for a new trial must be filed within 30 days of the date of sentencing. See Rule 24.1(b), Ala.R.Crim.P. Also, a motion for a new trial is deemed denied by operation of law if no ruling is made within 60 days from the date of sentencing. See Rule 24.4, Ala.R.Crim.P. That rule states:
"No motion for a new trial or motion in arrest of judgment shall remain pending in the trial court for more than sixty (60) days after the pronouncement of sentence, except as provided in this section. A failure by the trial court to rule on such a motion within the sixty (60) days allowed by this section shall constitute a denial of the motion as of the *316 sixtieth day; provided, however, that with the express consent of the prosecutor and the defendant or the defendant's attorney, which consent shall appear in the record, the motion may be carried past the sixtieth day to a date certain; if not ruled upon by the trial court as of the date to which the motion is continued, the motion is deemed denied as of that date, unless it has been continued again as provided in this section. The motion may be continued from time to time as provided in this section."
Judge Robinson had no jurisdiction to modify Monette's sentence in April 2003  almost 3 months after it was pronounced  nor in December 2003  almost 11 months after it was pronounced. The district attorney has established the prerequisites for the issuance of this writ. See State v. A.J., 877 So.2d 635 (Ala.Crim.App.2003).
Accordingly, this petition is due to be, and is hereby, granted. Judge Robinson is directed to reinstate the original sentence imposed on January 22, 2003.
PETITION GRANTED; WRIT ISSUED.
McMILLAN, P.J., and COBB, BASCHAB, SHAW, and WISE, JJ., concur.
