Terry Dewayne Bailey appeals from the denial of his pro se motions to alter, amend, or vacate a judgment.
In 1997, Bailey pleaded guilty to two counts of first-degree robbery and was sentenced to concurrent terms of 15 years’ imprisonment. Bailey did not appeal. On April 15, 2014, Bailey filed a Rule 32, Ala. R.Crim. P., petition challenging his sentences and requesting resentencing. Bailey alleged in the petition that his 15-year sentences were illegal because they were less than the mandatory minimum sentence for first-degree robbery in which a *378firearm was used, the sentence for which is 20 years. § 13A-5-6(a)(4), Ala.Code 1975. He requested an evidentiary hearing and, as relief, that he be resentenced to 20-year terms of imprisonment in accordance with the statute. The circuit court held an evidentiary hearing on May 29, 2014, and Bailey argued that the 15-year sentences had been improper, and he stated he wanted to “correct [his] record.” The court set aside Bailey’s 15-year sentences. The court appointed counsel and scheduled a date for a sentencing hearing. On June 19, 2014, Bailey and defense counsel appeared for the hearing, and the trial court sentenced Bailey to concurrent 20-year terms of imprisonment.
On July 1 and July 3, 2014, Bailey filed pro se motions to “alter, amend or vacate the judgment.” The substance of the two motions is virtually identical, and in each motion Bailey requested that he be allowed to withdraw his guilty pleas. He alleged that he had entered his pleas pursuant to an agreement reached between defense counsel and the prosecutor that provided for concurrent 15-year sentences even though the mandatory minimum sentence was a term of 20 years and that a trial court cannot accept a plea agreement for an illegal sentence. Bailey further alleged in the motions that, because his guilty plea was based on that agreement, the 20-year sentences imposed in the June 2014 resentencing hearing constituted a rejection of the plea agreement and that, therefore, he was entitled to withdraw his guilty pleas. We consider Bailey’s motions to be the functional equivalents of motions for a new trial, see Wallace v. State, 701 So.2d 829, 830 (Ala.Crim.App.1997), and, as such, they were timely filed.
Rule 24.4, Ala. R.Crim. P., provides that a motion for a new trial or in arrest of judgment shall not remain pending for more than 60 days and that on the 60th day the motion is deemed denied, absent the express consent of the prosecutor and the defendant or the defendant’s attorney that the time for ruling on the motion has been extended beyond that time for ruling. The record contains no consent by the parties to extend the circuit court’s time for ruling on the postjudgment motions as required by Rule 24.4. Therefore, Bailey’s postjudgment motions were deemed denied by operation of law on August 18, 2014. Nonetheless, on September 4, 2014, the circuit court held a hearing on Bailey’s motions and it purported to deny Bailey relief. Bailey gave oral notice of appeal. The trial court determined that Bailey was indigent, and on September 5, 2014, the trial court entered an order appointing counsel to represent Bailey on appeal. On September 17, 2014, Bailey, through newly appointed appellate counsel, filed a notice of appeal.
In his brief to this Court, Bailey argues that the circuit court’s judgment should be reversed and his guilty pleas set aside. He argues, in relevant part, that the plea agreement was violated because it provided for 15-year sentences and he ultimately was sentenced to 20 years. Bailey further argues that he was entitled to counsel on his pro se motions seeking to withdraw his plea and that the record does not reflect that he had counsel or that he had waived his right to counsel.
On numerous occasions our courts have addressed the denial of the right to counsel during proceedings on a motion to withdraw a guilty plea. For example, in a case nearly identical to Bailey’s, Humphrey v. State, 110 So.3d 396 (Ala.Crim.App.2012), this Court stated:
“The dispositive issue[ ] raised by Humphrey on appeal is whether the circuit court violated his Sixth Amendment right to counsel when the circuit court ruled on his pro se motion to withdraw *379his guilty pleas without first informing Humphrey of his right to counsel to assist in the preparation of that motion and without ascertaining if Humphrey had knowingly and intelligently waived his right to the assistance of counsel.
“The Sixth Amendment right to counsel ‘attaches at the initiation of adversary judicial proceedings, and extends to every critical stage of the proceedings .... A critical stage is any stage where a substantial right of an accused may be affected ... and can arise in pre-trial as well as post-trial proceedings.’ Berry v. State, 630 So.2d 127, 129 (Ala.Crim.App.1993) (internal citations omitted). ‘A motion to withdraw a guilty plea is a critical stage in a criminal proceeding requiring representation of counsel or a valid waiver of the right to counsel.’ Berry, 630 So.2d at 129.
“In Ex parte Pritchett, 117 So.3d 356 (Ala.2012), the Alabama Supreme Court recently discussed a case that is factually indistinguishable from Humphrey’s. The facts in Pritchett were as follows:
“‘[cjounsel in [Pritchett’s] case was appointed for [Pritchett], and at no point before the filing and adjudication of the motion to withdraw the guilty plea did counsel formally withdraw. Nonetheless, Pritchett filed a motion to withdraw his guilty plea that, in this case, we know was handwritten and that explicitly stated that it was being filed as a “pro se” motion. Furthermore, we also know that, in this case, the ground for relief asserted in this motion was that counsel who had represented the defendant before the filing of the motion allegedly had been inadequate and ineffective. As in Berry, although Pritchett nominally had counsel of record at the time he filed his motion, it was clear that the motion was prepared and relief was sought by Pritchett without the involvement of that counsel.’
“117 So.3d at 361-62. The Supreme Court held that Pritchett was required to have the assistance of counsel—or to have validly waived such assistance— during the proceedings surrounding the motion to withdraw his guilty plea because Pritchett’s motion to withdraw his guilty plea was a critical stage in the judicial proceedings. Id. Therefore, the Supreme Court reversed Pritchett’s conviction and ordered ‘a hearing on Pritch-ett’s motion to withdraw his guilty plea in which Pritchett is represented by counsel or in which the trial court determines that Pritchett has knowingly, intelligently, and voluntarily waived his right to counsel.’ Pritchett, 117 So.3d at 362.
“Here, just as in Pritchett, Humphrey filed a pro se motion to withdraw his guilty pleas. The motion was filed before Humphrey’s appointed counsel had withdrawn from his representation of Humphrey. The record does not expressly indicate that Humphrey waived his right to the assistance of counsel, nor does the record indicate that the circuit court made any inquiry into whether Humphrey had waived his right to counsel knowingly, intelligently and voluntarily.Based on the Supreme Court’s decision in Pritchett, the judgment of the circuit court is reversed and Humphrey’s case is remanded to the circuit court to conduct a hearing on Humphrey’s motion to withdraw his guilty pleas in which Humphrey is represented by counsel or to determine that Humphrey has knowingly, intelligently and voluntarily waived his right to counsel.”
110 So.3d at 397-98. See also Stewart v. State, 110 So.3d 395 (Ala.Crim.App.2012) (reversing circuit court’s denial of motion *380to withdraw guilty plea because appellant had not been represented by counsel and remanding for a hearing on the motion).
Here, as in Humphrey, Bailey was entitled to counsel during the proceedings in which he sought to withdraw his guilty plea. Bailey filed two motions pro se, and the record does not show that he had counsel or that he had waived his right to counsel.1 Because of this fundamental error, the denial of Bailey’s motions seeking to withdraw his guilty pleas must be set aside and the case remanded to the circuit court for that court to conduct a hearing on Bailey’s motions to withdraw the pleas. At the hearing Bailey shall be represented by counsel unless he knowingly, intelligently, and voluntarily waives his right to representation by counsel.
REVERSED AND REMANDED.
WINDOM, P.J., and KELLUM, BURKE, and JOINER, JJ., concur.. We note, furthermore, that at the September 4, 2014, hearing the trial court held on Bailey’s pro se motions seeking to withdraw his guilty plea, Bailey argued on his own behalf; there is no indication in the record that counsel had been appointed or appeared on his behalf.