
78 So.3d 1012 (2011)
James Earl ANDREWS
v.
STATE of Alabama.
CR-09-1675.
Court of Criminal Appeals of Alabama.
March 18, 2011.
James Earl Andrews, pro se.
Troy King and Luther Strange, attys. gen., and Robin D. Scales, for appellee.
Note from the reporter of decisions: On July 27, 2005, James Earl Andrews filed a Rule 32, Ala. R.Crim.App., petition alleging that he should be allowed to withdraw his guilty plea to second-degree rape, in part because the Montgomery Circuit Court did not sentence him according to a plea agreement he had entered into with the prosecution. The circuit court dismissed Andrews's petition, and he appealed. On March 18, 2011, the Court of Criminal Appeals issued an order remanding this case to the Montgomery Circuit Court to allow Andrews the opportunity to prove that he was not aware before he was sentenced that the circuit court would not sentence him according to the plea agreement and to allow the State an opportunity to rebut Andrews's claim. Presiding Judge Welch dissented from the order.
WELCH, Presiding Judge, dissenting.
I respectfully dissent from the majority's order remanding this case to the Montgomery Circuit Court for that court to review James Earl Andrews's claim, presented in a Rule 32, Ala. R.Crim. P., petition, that he should be allowed to withdraw his guilty plea. The order directs the circuit court to conduct additional proceedings and to issue findings of fact resolving whether Andrews knew before entering his guilty plea that the trial court intended to reject a plea agreement Andrews had entered into with the State. I believe that the record affirmatively shows that Andrews entered his guilty plea without knowing that the trial court intended to reject the plea agreement but that, nevertheless, contrary to the law, the circuit court erroneously ruled that Andrews was not entitled to rehef Therefore, unlike the majority, I believe that the Court should reverse the circuit court's judgment denying Andrews relief on this claim instead of remanding the case for further proceedings.
I also note that, although the circuit court described its action as a summary dismissal of Andrews's Rule 32 petition, in reality the circuit court did in fact issue a ruling on the merits, albeit without explicitly addressing Andrews's ineffective-assistance-of-appellate-counsel claim. Because the circuit court made findings of fact (see emphasized text from the circuit court's order below), it is obvious that the order was a denial of reUef based upon factual determinations made by the court, and not a summary dismissal. Because the circuit court has ruled on the merits in this case, remand is not necessary, and the judgment in this case should be reversed because the circuit court incorrectly applied the law to the facts it found to exist.
Andrews appeals from the denial of his August 1, 2005, Rule 32 petition in which he argued that the trial court failed to sentence him in accordance with a written plea agreement he had entered into with the prosecution. The plea agreement provided: "[Andrews] shall receive a sentence as determined by this Honorable Court. The parties agree that the sentence should be suspended and [Andrews] shall be placed on three (3) years of supervised *1013 probation." (C. 27.) The trial court, however, sentenced Andrews to 20 years in prison. The state responded that Andrews's claim was without merit and, in support of that assertion, attached as exhibits to its response a copy of Andrews's plea agreement and an affidavit of Norman Hurst, Andrews's defense counsel. The affidavit asserted that it had been agreed that Andrews would "`receive a sentence as determined by this Honorable Court' but that `[t]he parties agree[d] that the sentence should be suspended and [Andrews would] be placed on three (3) years probation.'" (C. 29, quoting the plea agreement.) Based on the evidence submitted in support of Andrews's Rule 32 petition,[1]see Rule 32.9(a), Ala. R.Crim. P., the judge presiding over the Rule 32, who was the same judge who presided over Andrews's guilty plea, on October 5, 2005, ruled as follows:
"This matter is before the Court on [Andrews's] Petition For Relief From Conviction Or Sentence, filed pursuant to Rule 32, [Ala. R.Crim. P.], and the State's Answer to Petition for Relief and Motion to Dismiss.
"James Andrews was indicted by the Montgomery County Grand Jury on May 14, 2004 for the offenses of Rape in the first degree, two counts, in violation of § 13A-6-61, Code of Alabama 1975. The Honorable Norman Hurst, Jr., was retained to represent Mr. Andrews in this matter.
"On October 28, 2004, [Andrews] came before this Court and pleaded guilty to a reduced charge of Rape in the second degree. This Court conducted a sentencing hearing on December 16, 2004 and sentenced [Andrews] to 20 years in the penitentiary. [Andrews] filed a Motion to Set Aside Judgment; however, said Motion was denied as moot. [Andrews] appealed to the Alabama Court of Criminal Appeals; however, a Certificate of Judgment affirming his conviction was issued on June 17, 2005. On August 1, 2005, [Andrews] filed a Rule 32 Petition for Relief from Conviction or Sentence.
"It is the finding of this Court that [Andrews] made a knowing and voluntary plea of guilt to Rape in the second degree. This Court made it clear to [Andrews] before his plea of guUt that it was not bound by any agreement [Andrews] had with the State of Alabama and sentencing was solely in this Court's discretion. It is also the finding of this Court that [Andrews] was represented by effective counsel who acted professionally and competently at all times.
"Upon consideration thereof, and having taken judicial notice of the Court's own records, IT IS HEREBY ORDERED, ADJUDGED AND DECREED that the Petition is hereby SUMMARILY DISMISSED without an evidentiary hearing pursuant to Rule 32.7(d) of the Alabama Rules of Criminal Procedure."
(R. 38-39.)(Capitalization in original; emphasis supplied.)
Andrews, acting pro se, filed a notice of appeal, which was followed by a motion to withdraw his guilty plea filed by [Andrews's] counsel. The trial court ruled that the motion to withdraw the guilty plea was moot because it was filed after Andrews had filed his notice of appeal.[2] (C. 29.)
*1014 It is clear from the face of the record that Andrews did not know before entering his plea that the trial court did not intend to honor the plea agreement. As the cu-cuit court found, the record establishes only that the trial court told Andrews that the court was not bound by the plea agreement. Further, we cannot assume that Andrews was informed off the record because the Alabama Canons of Judicial Ethics prohibit judges from initiating or considering ex parte communications concerning a pending or impending proceeding. See Canon 3A(4), Alabama Canon of Judicial Ethics. The transcript of the sentencing hearing, which is contained in the record, reflects that Andrews was informed for the first time at the sentencing hearing that the trial court was rejecting the plea agreement. (Supp. Eec. at 167.)
Because the trial court did not follow the plea agreement executed between Andrews and the prosecution, the trial court was required to allow Andrews the opportunity to withdraw his guilty plea. Johnson v. State, 886 So.2d 900, 902 (Ala.Crim. App.2003) (When the trial judge decides not to carry out an agreement reached between the prosecutor and defense counsel, the accused must be afforded the opportunity to withdraw his or her guilty plea oh motion promptly made."'"); See also Waters v. State, 963 So.2d 693 (Ala.Crim.App.2006) ("`"[I]f the trial court does not sentence the defendant pursuant to the terms of the plea agreement ... then the defendant must be given an opportunity, upon proper, timely, and specific motion, to withdraw his guilty plea."'"); Rule 14.3(c)(2)(iv), Ala. R.Crim. P. ("If the court rejects the plea agreement, the court shall ... [a]fford the defendant the opportunity to withdraw the defendant's offer to plead guilty.").
It is unnecessary to remand this case to the circuit court for findings of fact because it is clear from the record that the circuit court committed an error of law. The judgment of the circuit court denying Andrews's Rule 32 petition should be reversed because the trial court made an error in applying the law to the facts. Therefore, I must dissent from the remand order.
NOTES
[1]  The plea agreement and defense counsel's affidavit were included with the record on appeal.
[2]  The trial court's ruling in this regard was error.

"In criminal cases, the trial court has jurisdiction over a motion for a new trial if it is filed within 30 days after the entry of the judgment or sentence even if a notice of appeal is also filed, regardless of the order in which the motion and notice of appeal are filed. Walker v. State, 652 So.2d 198 (Ala.1994); Ala.Code 1975, § 12-22-133; Rule 4(b)(1), Ala. R.App. P; and Rule 24, Ala. R.Crim. P. Therefore, the appellant's motion to withdraw his guilty pleas was timely filed and, even though notice of appeal had been given prior to its filing, the trial court retained jurisdiction to consider the motion. Therefore, the trial court erred in ruling that the notice of appeal rendered the motion to withdraw the guilty pleas moot."
Wallace v. State, 701 So.2d 829, 830 (Ala. Crim.App.1997).
