
226 P.3d 552 (2010)
STATE of Idaho, Plaintiff-Respondent,
v.
Robert E. PETERSON, Defendant-Appellant.
No. 35441.
Court of Appeals of Idaho.
January 7, 2010.
Review Denied February 23, 2010.
*553 Dennis A. Benjamin of Nevin, Benjamin, McKay & Bartlett, LLP, Boise, for appellant.
Hon. Lawrence G. Wasden, Attorney General; Nicole L. Schafer, Deputy Attorney General, Boise, for respondent.
LANSING, Chief Judge.
Robert E. Peterson pleaded guilty to four counts of possession of sexually exploitative material for other than a commercial purpose. After his initial sentences were affirmed on appeal, his subsequent Idaho Criminal Rule 35 motion to correct "illegal" sentences was granted and a new judge was assigned to resentence Peterson. Peterson appeals from the sentences imposed at his second sentencing, from the denial of his motion to disqualify the new judge, and from the denial of his I.C.R. 33(c) motion to withdraw his guilty plea.

I.

BACKGROUND
Peterson was charged with ten counts of possession of sexually exploitative material. Pursuant to a plea agreement, he pled guilty to four counts and the remaining charges *554 were dismissed. On December 4, 2006, the district court imposed unified five-year sentences with three years determinate on each count. The court ordered that the sentences for counts two and five would be concurrent and that the sentences for counts six and nine would also be concurrent with each other but consecutive to those for counts two and five. This yielded a cumulative sentence of ten years with six years determinate. Peterson appealed, and this Court affirmed his judgment of conviction and sentences. This Court's remittitur issued on February 12, 2008.
On November 19, 2007, Peterson filed a pro se Idaho Criminal Rule 35 "Motion for Correction or Reduction of Sentence" in which he alleged ineffective assistance of counsel. In his motion Peterson asserted that his defense attorney had not advised him of his Fifth Amendment right not to participate in a psychosexual evaluation conducted for purposes of sentencing. This, he argued, constituted ineffective assistance of counsel, citing Estrada v. State, 143 Idaho 558, 149 P.3d 833 (2006). In Estrada, the Idaho Supreme Court held that the defendant was denied effective assistance of counsel because his attorney had not informed him of his right to assert his privilege against self-incrimination when the court ordered a psychosexual evaluation. Id. at 564, 149 P.3d at 839.
The district court granted Peterson's motion and set the matter for a new sentencing hearing in front of another district judge. Recognizing that there was an issue concerning the timeliness of Peterson's motion under I.C.R. 35, in its initial order the district court said that it was treating the motion as a petition for post-conviction relief. Subsequently, upon Peterson's request, the district court modified its order to treat Peterson's motion as an I.C.R. 35 motion to correct an illegal sentence.
Peterson filed a motion to disqualify the new judge, which was denied. He also filed a motion to withdraw his guilty plea on April 14, 2008. At a subsequent hearing, the new judge denied the motion to withdraw the guilty plea and sentenced Peterson to a five-year term with two years determinate on each of the four counts, all to be served consecutively. This resulted in a cumulative sentence of twenty years with eight years determinate, which was significantly longer than Peterson's original sentences. Peterson then filed an I.C.R. 35 motion to reduce the new sentences, which the district court denied.
Peterson appeals. He claims error in the original district judge's disqualification of himself from the resentencing proceedings, the denial of Peterson's motion to disqualify the second district judge, and the order denying his motion for withdrawal of his guilty plea. Peterson also asserts that his right to due process under the state and federal constitutions was violated by the second district judge's imposition of sentences that were more severe than those that Peterson originally received.

II.

DISCUSSION

A. Jurisdiction to Grant Peterson's Motion to Correct an Illegal Sentence
Because Peterson's arguments concerning his motion to disqualify the second judge and challenging his new sentences are necessarily dependent upon the original judge having jurisdiction to grant Peterson's Rule 35 motion in the first instance, we will first take up an argument by the State that the district court had no jurisdiction to grant Peterson's Rule 35 motion because the motion was untimely. The State did not appeal from the order granting the Rule 35 motion, nor cross-appeal in the present proceeding. Nevertheless, it may now tardily raise the jurisdiction issue because a challenge to a court's subject matter jurisdiction may be raised at any time during the course of the proceedings, even for the first time on appeal, and may not be waived by the parties. State v. Armstrong, 146 Idaho 372, 374, 195 P.3d 731, 733 (Ct.App.2008); State v. McCarthy, 133 Idaho 119, 122, 982 P.2d 954, 957 (Ct.App.1999). The issue may even be raised sua sponte by a trial or appellate court. State v. Kavajecz, 139 Idaho 482, 483, 80 P.3d 1083, 1084 (2003); Armstrong, 146 Idaho at 374, 195 P.3d at 733. An order entered *555 without subject matter jurisdiction is void. Troupis v. Summer, 148 Idaho 77, 79, 218 P.3d 1138, 1140 (2009); Andre v. Morrow, 106 Idaho 455, 459, 680 P.2d 1355, 1359 (1984); Sierra Life Ins. Co. v. Granata, 99 Idaho 624, 626-27, 586 P.2d 1068, 1070-71 (1978); Armstrong, 146 Idaho at 374, 378, 195 P.3d at 733, 737. Whether a court has jurisdiction is a question of law, over which we exercise free review. Kavajecz, 139 Idaho at 483, 80 P.3d at 1084; State v. Savage, 145 Idaho 756, 758, 185 P.3d 268, 270 (Ct. App.2008).
At the time in question, Idaho Criminal Rule 35 authorized the trial court to correct or modify a sentence within specified time limits:
The court may correct an illegal sentence at any time and may correct a sentence that has been imposed in an illegal manner within the time provided herein for the reduction of sentence. The court may reduce a sentence within 120 days after the filing of a judgment of conviction or within 120 days after the court releases retained jurisdiction.
Under this rule, a motion to correct an illegal sentence could be entertained at any time, but a motion to modify a sentence on any other grounds had to be filed within 120 days from the date of judgment or the date the court released retained jurisdiction. The 120-day limit is jurisdictional, so if Peterson's motion was subject to this time limit, the district court lacked jurisdiction to grant relief. Brandt v. State, 118 Idaho 350, 352, 796 P.2d 1023, 1025 (1990); State v. Parvin, 137 Idaho 783, 785-86, 53 P.3d 834, 836-37 (Ct.App.2002); State v. Sutton, 113 Idaho 832, 833, 748 P.2d 416, 417 (Ct.App.1987).
The State contends that the alleged ineffective assistance in Peterson's original sentencing proceedings did not make his sentence "illegal," and therefore his motion was untimely. Even assuming his claim of ineffective assistance may be presented under Rule 35, the State argues, the motion had to be brought within 120 days from the date of Peterson's judgment of conviction.
A sentence is "illegal" within the meaning of Rule 35 only if it is in excess of statutory limits or otherwise contrary to applicable law. State v. Alsanea, 138 Idaho 733, 745, 69 P.3d 153, 165 (Ct.App.2003); State v. Lee, 116 Idaho 515, 516, 777 P.2d 737, 738 (Ct.App.1989). Recently, the Idaho Supreme Court has interpreted the term narrowly as "a sentence that is illegal on the face of the record, i.e., does not involve significant questions of fact or require an evidentiary hearing." State v. Clements, 148 Idaho 82, 86, 218 P.3d 1143, 1147 (2009). The Court further stated that "Rule 35 is not a vehicle designed to reexamine the facts underlying the case to determine whether a sentence is illegal. ..." Id. Peterson does not contend that his sentences exceed any statutory limit, and the claimed illegality is not discernable from the face of the judgment or otherwise on the face of the record in the criminal case. Rather, his claim of illegality is based upon his assertion of a fact not shown by the record-that his attorney did not advise him of his Fifth Amendment right to decline participation in the psychosexual evaluation. Hence, Peterson's motion was, at best, a claim that his sentence was imposed in an illegal manner, and it was thus subject to the 120-day time limit under Rule 35.[1]
Peterson contends that the State's jurisdictional argument is without merit "because it confuses the question of jurisdiction, i.e., whether the court has the power to decide the motion, with the question of whether the motion was meritorious." Peterson reasons as follows:
Putting aside the question of whether the district court was correct in granting the motion, it is beyond peradventure that it had the authority to decide the motion. `The court may correct an illegal sentence *556 at any time[.]' I.C.R. 35. Therefore, the filing of a motion for the correction of an illegal sentence in a criminal case confers jurisdiction to decide the motion upon the district court.
From this Peterson argues that the State cannot assert error in the district court's order granting the Rule 35 motion because the State did not file an appeal or cross-appeal from that decision.
Peterson's argument is without merit. By his line of reasoning, parties could confer subject matter jurisdiction on a court by the label placed on their motions. By titling a motion as one to correct an illegal sentence, no matter how far removed the substance of the motion might actually be from that label, the party would confer upon the court jurisdiction to grant the requested relief! It is fair to say, of course, that a court has jurisdiction to determine whether it possesses jurisdiction. United States v. Ruiz, 536 U.S. 622, 628, 122 S.Ct. 2450, 2454, 153 L.Ed.2d 586, 594 (2002); Cedano-Viera v. Ashcroft, 324 F.3d 1062, 1064 (9th Cir.2003). That does not mean, however, that the court then must possess jurisdiction to reach the merits of the motion. If a motion is filed for which a court lacks subject matter jurisdiction, the court's only authority is to deny the motion for lack of subject matter jurisdiction. Cf. Idaho Rule of Civil Procedure 12(g)(4) ("Whenever it appears by suggestion of the parties or otherwise that the court lacks jurisdiction of the subject matter, the court shall dismiss the action.")
Here, Peterson's motion was not one for correction of an illegal sentence. Therefore, even if I.C.R. 35 was a proper vehicle for presentation of Peterson's claim of ineffective assistance of counsel in sentencing proceedings, the motion was untimely under that rule, and the district court had no jurisdiction to grant the motion.
Accordingly, the district court's order setting aside Peterson's original sentences is void for lack of subject matter jurisdiction, as are the new sentences that were thereafter imposed by the second judge. The new sentences imposed by the second judge must be set aside and the original sentences reinstated.[2]

B. Motion to Withdraw Guilty Plea
We next consider Peterson's challenge to the order denying his motion to withdraw his guilty plea. We conclude that this motion, like Peterson's Rule 35 motion, was untimely and hence, the court lacked subject matter jurisdiction to address the merits.
Motions to withdraw guilty pleas are authorized by I.C.R. 33(c). Once a judgment becomes final, however, a trial court does not have jurisdiction to amend or set aside the judgment absent a statute or a rule extending jurisdiction. State v. Rogers, 140 Idaho 223, 228, 91 P.3d 1127, 1132 (2004); State v. Jakoski, 139 Idaho 352, 355, 79 P.3d 711, 714 (2003); Armstrong, 146 Idaho at 377-78, 195 P.3d at 736-37. A judgment becomes final at the expiration of time for appeal or affirmance of the judgment on appeal, and a motion to withdraw a guilty plea may not be granted thereafter. Jakoski, 139 Idaho at 355, 79 P.3d at 714; Armstrong, 146 Idaho at 377-78, 195 P.3d at 736-37.
The trial court here lacked subject matter jurisdiction to entertain Peterson's motion to withdraw his guilty plea because the judgment of conviction had become final upon this Court's issuance of a remittitur some two months before Peterson filed his motion. Accordingly, Peterson has shown no error in the denial of his motion for withdrawal of the guilty plea. We affirm the denial order, albeit on a ground different from that upon which the district court relied.

C. Other Issues Are Moot
Because we have concluded that the district court lacked subject matter jurisdiction to entertain Peterson's Rule 35 motion to *557 modify his sentence and also lacked jurisdiction on Peterson's motion to withdraw his guilty plea, the remaining issues asserted by Peterson on appeal, including his claim that his motion to disqualify the second district judge was erroneously denied, are moot. We therefore do not address them.

III.

CONCLUSION
The district court's order granting Peterson's I.C.R. 35 motion to set aside his original sentences is reversed, the district court's subsequent order imposing new sentences is vacated, and the original sentences are reinstated. The district court's order denying Peterson's motion to withdraw his guilty plea is affirmed.
Judge GUTIERREZ and Judge MELANSON concur.
NOTES
[1]  We need not address whether a claim of ineffective assistance of counsel in sentencing proceedings can ever be presented through a Rule 35 motion. We note, however, that such a claim clearly could appropriately have been brought as an action for post-conviction relief pursuant to I.C. § 19-4901, et seq. Unfortunately, the district court's determination that it possessed authority to consider the claim under Rule 35 may have dissuaded Peterson from filing an action for post-conviction relief.
[2]  Somewhat ironically, although Peterson opposed the State's jurisdictional argument, he benefits from it because his original sentences, which are now reinstated, were shorter than the new sentences imposed by the second district judge in proceedings for which there was no subject matter jurisdiction.
