ON WRIT OF CERTIORARI
WALLER, Chief Justice,for the Court:
¶ 1. In June 2004, Victor D. Jones pleaded guilty to two counts of sexual battery and was sentenced to two consecutive twenty-year terms, to be served in the custody of the Mississippi Department of Corrections. Jones filed a notice of appeal, which was dismissed for failure to pay the costs of appeal. The mandate issued on October 26, 2004. In December 2004, Jones filed a motion for post-conviction relief (PCR) in the Pike County Circuit Court. The motion was denied on January 20, 2005. The Court of Appeals *325affirmed that judgment in Jones v. State, 962 So.2d 571, 574 (Miss.Ct.App.2006).
¶ 2. In April 2011, Jones filed a second motion for post-conviction relief, which was dismissed by the trial court because the motion was time-barred and barred as a successive writ. The trial court also found that it lacked jurisdiction to consider the claims because Jones had not sought permission from this Court to proceed in the trial court. The Court of Appeals affirmed. Jones v. State, 119 So.3d 350 (Miss.Ct.App.2012). We affirm the trial court’s finding that the motion for post-conviction relief was time-barred and find that the motion also is barred based on res judicata. However, we find that the trial court and Court of Appeals erred in finding that the trial court lacked jurisdiction to hear Jones’s claims.
DISCUSSION
Standard of Review
¶ 3. This Court will not reverse a trial court’s dismissal of a motion for post-conviction relief absent a finding that the decision was clearly erroneous. Jackson v. State, 67 So.3d 725, 730 (Miss.2011) (citing Brown v. State, 731 So.2d 595, 598 (Miss.1999)). Issues of law are reviewed de novo. Jackson, 67 So.3d at 730.
I. Whether Jones must first seek leave of the Mississippi Supreme Court before filing his motion for post-conviction relief in the trial court.
¶ 4. At the time of Jones’s appeal in 2004, an inmate could appeal his sentence directly (but not his conviction) if it resulted from a guilty plea.1 Trotter v. State, 554 So.2d 313, 315 (Miss.1989) (emphasis added).
¶ 5. Jones’s first motion for PCR was filed properly in the first instance in the trial court and was denied on the merits, with the denial affirmed by the Court of Appeals. Jones’s second PCR (the subject of this appeal) was dismissed as time-barred and barred as a successive writ. See Miss.Code Ann. §§ 99-39-5(2), 99-39-23(6) (Supp.2012). The trial court also found that it lacked jurisdiction because Jones had not sought leave of this Court. Mississippi Code Section 99-39-7 requires a petitioner to seek leave of this Court to file a motion for PCR “[wjhere the conviction and sentence have been affirmed on appeal or the appeal has been dismissed.... ” Miss.Code Ann. § 99-39-7 (Supp.2012). However, because Jones was permitted to appeal only his sentence under Trotter, he was not required to seek permission from this Court and could file his PCR directly in the trial court. Therefore, the trial court did have jurisdiction to consider his claims.
II. Whether Jones’s sentence is illegal.
Time Bar
¶ 6. Under the Mississippi Uniform Post-Conviction Collateral Relief Act (UP-CCRA), a PCR motion must be filed within three years after the petitioner’s direct appeal is ruled upon by this Court or, where a petitioner has pleaded guilty, a PCR motion must be filed within three years after entry of the judgment of conviction. Miss.Code Ann. § 99-39-5(2) *326(Supp.2012). Jones was sentenced in June 2004. Jones timely filed his notice of appeal in 2004, however, the appeal was dismissed for failure to pay the costs of appeal, and the mandate issued on October 26, 2004. The petition for PCR at issue was filed in April 2011, well past the three-year statute of limitations for such filing. See Miss.Code Ann. § 99-39-5(2). The Court of Appeals found, and we agree, that none of the exceptions to the time bar listed in the statute is applicable to this case. However, in his appeal before the Court of Appeals, and now in his brief on certiorari review, Jones argues that his motion should have survived the three-year time bar because he is serving an illegal sentence. This Court has held that errors affecting fundamental constitutional rights, such as an illegal sentence, are excepted from procedural bars which otherwise would prevent their consideration. Rowland v. State, 42 So.3d 503, 507 (Miss.2010). And, when a petitioner alleges that he is serving an illegal sentence, the petition for relief is not subject to the time bar. Ivy v. State, 731 So.2d 601, 603 (Miss.1999). The Court of Appeals explained that, although Jones argued that his motion should have survived the three-year time bar because he is serving an illegal sentence, Jones did not explain why his sentence was illegal. The Court of Appeals found that, although the maximum penalty for sexual battery is thirty years, Jones was not sentenced to the maximum sentence, and the sentence imposed was within the statutory guidelines. Jones v. State, 119 So.3d 350 (Miss.Ct.App.2012) (citing Miss.Code Ann. § 97-3-101 (Rev. 2006)). Because Jones’s sentence is within the statutory guidelines and because Jones has not explained how his sentence is illegal, we affirm the Court of Appeals and the trial court on this issue.
Mental Competency
¶ 7. Jones argues that he was “legally incompetent” to plead guilty, and he should have been evaluated by a mental-health specialist prior to entering his plea. The issue of Jones’s mental health was not raised prior to submitting his guilty plea, nor was it raised in Jones’s first PCR motion. Jones v. State, 962 So.2d 571, 573 (Miss.Ct.App.2006). However, in its order denying the first petition for post-conviction relief, the trial court explained that it “personally observed the defendant’s demeanor, appearance and manner in answering the court’s questions and it appeared to the court that the defendant was competent to understand and did understand [the circumstances surrounding his guilty plea].” The trial court further found that the guilty plea was knowingly, willingly, freely, voluntarily, and intelligently made and accepted the plea and found the defendant guilty. The Court of Appeals affirmed the trial court’s denial of post-conviction relief. Jones, 962 So.2d at 573.
¶ 8. In support of his second PCR filing, Jones submitted some of his medical records, but none appears responsive to his mental competency, in general, or at the time of his plea. Therefore, notwithstanding the time bar, the trial court correctly found that Jones’s second PCR motion should be dismissed.
CONCLUSION
¶ 9. We reverse the judgments of the trial court and the Court of Appeals that the trial court lacked jurisdiction. However, we affirm the judgments of the trial court and the Court of Appeals that the PCR motion is time-barred and also find that the motion is barred based on res judicata. See Miss.Code Ann. §§ 99-39-5(2), 99-39-23(6) (Supp.2012).
*327¶ 10. AFFIRMED IN PART AND REVERSED IN PART.
RANDOLPH, P.J., LAMAR, KITCHENS, CHANDLER, PIERCE, KING AND COLEMAN, JJ., CONCUR. DICKINSON, P.J., CONCURS IN RESULT ONLY WITHOUT SEPARATE WRITTEN OPINION.. An amendment to Mississippi Code Section 99-35-101, which took effect on July 1, 2008, states that "where the defendant enters a plea of guilty and is sentenced, then no appeal from the circuit court to the Supreme Court shall be allowed.” Miss.Code Ann. § 99-35-101 (Supp.2012).