
996 A.2d 948 (2010)
193 Md. App. 193
Tyrone Armin CARTER
v.
STATE of Maryland.
No. 668, September Term, 2009.
Court of Special Appeals of Maryland.
June 3, 2010.
*949 Samantha Z. Smith (Timchula & Smith, PA, on the brief) Westminster, MD, for appellant.
Cathleen C. Brockmeyer (Douglas F. Gansler, Atty. Gen., on the brief) Baltimore, MD, for appellee.
Panel: EYLER, DEBORAH S., GRAEFF and CHARLES E. MOYLAN, JR. (Retired, Specially Assigned), JJ.
GRAEFF, J.
On February 26, 2007, appellant, Tyrone Armin Carter, was found guilty of second *950 degree assault. The court imposed probation before judgment, with a period of two years supervised probation. As a condition of probation, appellant was ordered to pay restitution to the victim.
On March 24, 2009, the court extended the probation period for three years, until February 26, 2012. Appellant appeals the extension of his probation and presents three questions for review, which we quote:
I. Did the trial court err as a matter of law in extending the Appellant's probation beyond two years?
I. Did the trial court err as a matter of law in not specifically establishing the Appellant's restitution obligation?
II. Did the trial court err as a matter of law in not holding a hearing and receiving evidence on the restitution obligation prior to extending the Appellant's obligation?
For the reasons set forth below, we answer the first question in the affirmative. Accordingly, we shall vacate the order extending appellant's probation.

FACTS AND PROCEDURAL BACKGROUND
On February 26, 2007, appellant pled not guilty, pursuant to an agreed statement of facts, to the charge of second degree assault. The agreed statement of facts indicated that on August 21, 2006, appellant grabbed his wife, pushed her, and slammed her head into the wall and onto the ground.[1]
The court found appellant guilty of second degree assault. Appellant's counsel asked the court to grant appellant probation before judgment, noting that a criminal record would adversely impact appellant's ability to continue to obtain contracting business from the National Security Agency. Counsel stated that appellant was "fully willing to do whatever the Court order[ed] him to do." The State opposed probation before judgment and requested jail time.
The court granted appellant probation before judgment, placing appellant on two years supervised probation. One of the conditions of probation was that appellant pay restitution to the victim for her "mental or emotional counseling," as well as any physical therapy attributable to the assault. With respect to the specific amount of restitution, the Court stated: "As to any amounts, if we need to have a hearing on that we can certainly have a hearing at some point in time." The court stated that it envisioned that the State and appellant would exchange documentation "as far as the amounts are concerned," noting that it was hopeful that an agreement could be reached without a hearing. Counsel for appellant stated: "That is acceptable, Your Honor, as long as we get the documentation." The court explained to appellant the implications of probation before judgment, and appellant accepted the disposition. The court and appellant signed a Probation/Supervision order, which provided that the length of probation was two years, beginning on February 26, 2007.
Three months later, on May 25, 2007, appellant filed a Motion to Modify: Request for Restitution Hearing, in which he asked the court to hold a hearing "to determine a monetary limit and/or a time limit for claims to be submitted" by the victim. On June 8, 2007, the State filed an Answer to appellant's motion, agreeing *951 that a hearing should be held on this matter.
On September 4, 2007, the court held a hearing. The State informed the court that it had reached an agreement with appellant's counsel that the current restitution amount owed was $1,535.24, a figure reflecting $1,500 that appellant already had paid. The State requested that an amended probation order be entered, providing that the $1,535.24 was "to be paid in regular increments through parole and probation," and that appellant would continue to be responsible for any medical, mental, or physical therapy for the victim. The State opposed placing a time or amount limit on the restitution payments. Appellant's counsel, on the other hand, requested that the court place a dollar and time limit on the restitution obligation. The court declined to set a dollar limit, but it stated that the time limit was two years, the length of appellant's probation. The court reiterated that appellant would be responsible only for "things that were caused approximately [sic] by the incident which took place on or about August 21st of 2006." It explained that the restitution was "not an open, blank check for therapy," but rather, it was "designed to make sure that the victim is not paying out-of-pocket costs for therapy, which would not have ... been incurred but for this incident."
The court asked counsel to fill out a Revised Probation/Supervision Order that was acceptable to both parties. The parties agreed that the correct amount of restitution that appellant owed at that time was $1,535.24, but they could not agree on the amount that appellant should pay each month. The court ordered that the $1,535.24 be paid in monthly installments of $100.00. The parties agreed that this amount was subject to: (1) a decrease if appellant could prove credit for other payments; or (2) an increase based on future therapy costs. Appellant's counsel agreed that, if the restitution obligation increased, "the possibility exist[ed] that the probation could be extended if necessary to pay the restitution figure." Appellant signed the revised order, stating that he understood these conditions of probation.
On July 31, 2008, the State filed a request for a hearing to address appellant's obligation regarding additional restitution payments. The State represented that, with regard to the $1,535.24 restitution ordered on September 4, 2007, appellant had paid through August 2008, leaving a balance of $435.24. The victim, however, had incurred additional therapy costs, and the State requested a hearing to address the issue of this additional restitution.
On November 10, 2008, the court held a hearing on the additional restitution charges. Counsel for appellant stated that appellant had paid all but $135.24 of the $1,535.24 incurred as of the September 4, 2007, hearing. Since that time, the victim had submitted additional therapy bills of approximately $3,800. Appellant's counsel questioned whether the expenses incurred were directly related to the assault in August 2006, as opposed to issues arising from the parties' divorce.
The court found that there should be another hearing on the outstanding expenses, to be scheduled before the expiration of probation. The court discussed the possibility of extending probation as follows:
COURT: ... The only reason I would extend the probation, the main reason, would be because I think it is appropriate if we are going to do this on an installment basis to have Mr. Carter give him the time to make those payments, which at this point in time are pushing $4,000.

*952 [APPELLANT'S COUNSEL]: $4,000 additional.
THE COURT: Right.
[APPELLANT'S COUNSEL]: In addition to what he has already paid. Your Honor, I hear what the Court is saying. One of my concerns, obviously, is the fact that Your Honor seems to be contemplating extending the probation which, I know the reason you are inclined to do so maybe but I think that is somewhat unfair to Mr. Carter.
THE COURT: Well, Mr. Brewer, even iflet's say hypothetically the provider said at this point in time, no need for any further therapy. Unless Mr. Carter is prepared to write a check for $3,900, I got two choices. Put him in jail for violating probation or extend the probation.
I mean, in that event if Mr. Carter had a check payable to whoever to pay all the costs and there was no projected need for any further treatment or therapy, maybe there is no need to extend the probation.
But if he is not able to do that, it is to his benefit to extend the probation. Wouldn't you agree?
[APPELLANT'S COUNSEL]: If you look at it in that way, yes.
The court instructed the parties to work with the assignment office to reschedule the case for a hearing before the original term of probation expired in February 2009. The court ordered that, until the hearing, appellant was to continue to make monthly payments of $100.
On February 12, 2009, the court held another hearing. Counsel for appellant gave the Assistant State's Attorney a check from appellant in the amount of $3,955.24, which covered all therapy costs incurred as of November 10, 2008. Counsel noted that the victim had given her documentation regarding additional costs incurred since the November 2008 hearing, in the amount of $900. Although appellant objected to paying any costs that were not attributable to the assault, he had paid "everything that was due pursuant to the claim through the November hearing of 2008." Counsel noted that appellant's probation was set to expire in 15 days. He objected to the State's request to extend the probation, stating:
My point, among others, on a very practical level, not a legal argument, is the fact that with this ongoing restitution issue not ever having been resolved, if the probation were extended Mr. Carter could be on probation for life. He has paid now a total, since this case began, of $5,355.24.
Your Honor, enough is enough. I would just suggest that Mr. Carter has done everything in compliance with the order of probation since February of 2007. With the probation due to expire, I think this case should be closed as is.
The State acknowledged that it was difficult to determine whether the therapy that the victim was receiving addressed the assault, as opposed to the divorce. The prosecutor noted, however, that some of the victim's stress resulted from appellant's failure to pay $100 a month pursuant to the court order. The State asked the court to "extend the probation, which is permitted under the statute, for purposes of paying restitution." The prosecutor advised that the counselor anticipated that an additional four to six months of therapy would allow the victim to move on with her life.
The court stated that it was "going to reserve a ruling on the issue of whether or not to extend the probation" to allow appellant's counsel to make a legal argument in writing regarding this issue. Appellant then stated that he was going to pay the *953 additional $900 in costs incurred since November 10, 2008, which would make him current on all restitution.[2]
On February 26, 2009, appellant filed a Memorandum in Opposition to Extending Probation, arguing that the court could not extend probation beyond the two-year period originally imposed on February 26, 2007. He argued that, pursuant to Md. Code (2008 Repl. Vol.), § 6-220(g) of the Criminal Procedure Article ("CP"), he was entitled to be discharged from probation because he had "fulfilled the conditions of probation." Appellant asserted that CP § 6-222, which addresses probation after judgment of conviction, authorizes an extension of probation for restitution if the defendant consents. He argued, however, that § 6-220, which addresses probation before judgment, did not authorize an extension for the payment of restitution, particularly absent his consent.
On March 13, 2009, the State filed its response, disputing appellant's assertion that the court did not have the authority to extend probation beyond the initial two year period. It argued that "CP § 6-220 neither grants nor prohibits the extension of probation for purposes of restitution." Moreover, the State asserted that it was not seeking to have the probationary period extended beyond the maximum term, but rather, it was merely "requesting the court to extend the probation beyond the original [two-year] period to allow the defendant to comply with the continued conditions of probation to pay restitution." The State argued that, when appellant accepted the probation before judgment, he was aware that the amount of restitution to be paid was uncertain, and he should not be allowed to accept the benefits of this disposition but not be bound by the responsibilities. The State requested that the court extend appellant's probation for the purpose of paying further restitution, and it requested a hearing to advise appellant regarding the new time period and conditions of his probation.
On March 24, 2009, almost a month after the original two-year term of probation expired, the court ordered that appellant's term of probation be extended until February 26, 2012. On April 7, 2009, appellant filed a Motion to Revise, pursuant to Md. Rule 4-345(e), asking the court to vacate its March 24, 2009, order. Appellant argued that the State's request to extend the probationary period beyond the two years amounted to a motion to revise a sentence, which was filed beyond the ninety days permitted by Md. Rule 4-345(e). He argued that the court's order granting this motion amounted to an illegal increase in sentence. On April 9, 2009, the State responded to appellant's Motion to Revise, stating that, pursuant to Md. Rule 4-346(b), the court had the authority to modify and change the duration of probation, which did not constitute an increase in appellant's sentence.
On April 14, 2009, the court denied appellant's Motion to Revise. On May 14, 2009, appellant noted an appeal to this Court, stating that he was appealing: (1) the court's order of March 14, 2009, extending his probation; and (2) the order of April 14, 2009, denying his Motion to Revise.

DISCUSSION
Appellant contends that the court erred as a matter of law in extending his term of probation beyond two years, stating that, after he successfully fulfilled the probation conditions, the court should have released him from probation. He argues that the *954 extension of his probation constituted an illegal sentence.[3]
The State responds in several ways. Initially, it argues that the appeal should be dismissed for one of two reasons: (1) a defendant cannot appeal from an order of probation before judgment; and (2) the appeal was untimely. On the merits, the State argues that "the terms of [appellant's] probation, two years extended to five years, were reasonable" given the circumstances of the victim's continued need for counseling.

A.

Appeal After Disposition of Probation Before Judgment
We address first the State's argument that the appeal should be dismissed because a defendant cannot appeal from an order granting probation before judgment. We agree with the State that CP § 6-220 limits the right to appeal when a defendant receives probation before judgment. We do not agree, however, that it prohibits the appeal in this case.
Section 6-220 provides, in relevant part, as follows:
(b) In general.
(1) When a defendant pleads guilty or nolo contendere or is found guilty of a crime, a court may stay the entering of judgment, defer further proceedings, and place the defendant on probation subject to reasonable conditions if:
(i) the court finds that the best interests of the defendant and the public welfare would be served; and
(ii) the defendant gives written consent after determination of guilt or acceptance of a nolo contendere plea.
(2) Subject to paragraphs (3) and (4) of this subsection, the conditions may include an order that the defendant:
(i) pay a fine or monetary penalty to the State or make restitution;
* * *
(e) Waiver of right to appeal.
(1) By consenting to and receiving a stay of entering of the judgment as provided by subsections (b) and (c) of this section, the defendant waives the right to appeal at any time from the judgment of guilt.
(2) Before granting a stay, the court shall notify the defendant of the consequences of consenting to and receiving a stay of entry of judgment under paragraph (1) of this subsection.
(Emphasis added).
The language of this statute makes clear that, when a defendant receives probation before judgment, he or she "waives the right to appeal ... from the judgment of guilt." Thus, appellant could not have appealed the initial finding that he was guilty of second degree assault. See State v. Hannah, 307 Md. 390, 401, 514 A.2d 16 (1986).[4] Nor could appellant *955 appeal from the initial conditions of his probation, to which he agreed. See Cunningham v. State, 397 Md. 524, 527-28, 919 A.2d 30 (2007) (where defendant affirmatively agreed to restitution, clear waiver of appellate claim regarding restitution).
Here, however, appellant is not appealing the judgment of guilt or the initial conditions of probation. Rather, his appeal relates to the court's subsequent order extending his probation from two to five years. Appellant contends that, in extending his probation, the court imposed an illegal sentence. Neither party cites any case that addresses the right to appeal in this situation.
In Mateen v. Saar, 376 Md. 385, 405, 829 A.2d 1007 (2003), the Court of Appeals explained that a motion to correct an illegal sentence is in the nature of a collateral attack and an appeal of the denial of such a motion is not a direct appeal from the original sentence. We find that analysis instructive here. Although CP § 6-220 precludes an appeal from the finding of guilt, as well as the imposition of conditions to which the defendant agreed, there is nothing in the statute that suggests that a defendant cannot challenge a court's subsequent order that unilaterally changes the agreed upon terms of probation. We hold that when a court changes the agreed upon terms of probation, without the consent of the defendant, and the defendant contends that the change amounts to an illegal sentence, CP § 6-220(e) does not preclude an appeal.

B.

Timeliness of Appeal
The State contends that the appeal should be dismissed for an additional reason; it argues that the appeal was untimely. As the State notes, Md. Rule 8-202(a) provides that an appellant must file a notice of appeal "within 30 days after entry of the judgment or order from which the appeal is taken." This requirement is jurisdictional, and if the appeal is not timely noted, we must dismiss the appeal. Chmurny v. State, 392 Md. 159, 166, 896 A.2d 354 (2006).
The court's order extending appellant's probationary term was issued on March 24, 2009. The 30-day time period to note the appeal from that order, therefore, expired on April 23, 2009. Appellant did not note his appeal, however, until May 14, 2009, outside the thirty-day time frame prescribed by the Maryland Rules.
At oral argument, appellant's counsel acknowledged that an appeal from the court's March 24, 2009, extension of the probation period was not timely. She stated, however, that appellant also appealed the court's April 14, 2009, ruling denying appellant's motion to modify his sentence. The appeal was filed within 30 days of that order.
The State, however, contends that a denial of a motion to modify sentence is not an appealable order. At oral argument, counsel for appellant appeared to agree, stating that the only circumstance in which appellant's appeal remained viable was if *956 the extension of the probationary term constituted an illegal sentence.
We agree with the parties that the propriety of the April 14, 2009, ruling is properly before this Court only if it was a denial of a motion to correct an illegal sentence. The Court of Appeals had made clear that "the denial of a motion to correct an illegal sentence is appealable." Hoile v. State, 404 Md. 591, 617, 948 A.2d 30 (citing State v. Kanaras, 357 Md. 170, 177, 742 A.2d 508 (1999)), cert. denied, ___ U.S. ___, 129 S.Ct. 257, 172 L.Ed.2d 146 (2008). By contrast, a motion to modify a sentence that does not allege an error of law, but is addressed to the court's discretion, is not the proper subject of appeal. Id. at 616-18, 948 A.2d 30.
The State argues that appellant's motion to modify sentence was not a motion to correct an illegal sentence, noting that it was filed pursuant to Md. Rule 4-345(e), not Rule 4-345(a).[5] The State is correct that appellant referenced Rule 4-345(e) in its motion, and he titled his motion as one to revise sentence, rather than to correct an illegal sentence. That is not, however, dispositive.
It is a "well-established principle `that the substance rather than the form of the pleading is the controlling consideration.'" In re Deontay J., 408 Md. 152, 160, 968 A.2d 1067 (2009) (quoting Lapp v. Stanton, 116 Md. 197, 199, 81 A. 675 (1911)). As an appellate court, "our concern is with the nature of the issues legitimately raised by the pleadings, and not with the labels given to the pleadings." Higgins v. Barnes, 310 Md. 532, 535 n. 1, 530 A.2d 724 (1987). Keeping these principles in mind, and noting that the motion substantively alleged that the extension of the probationary term beyond the original two years "resulted in an increase of sentence, in violation of the Rule," we will treat this motion as a motion to correct an illegal sentence. The denial of the motion, therefore, was appealable, and the appeal was filed within 30 days. The State's contention that the appeal was untimely is without merit.[6] Accordingly, we shall deny the State's motion to dismiss the appeal.

C.

Illegal Sentence
Turning to the merits, we address whether the extension of appellant's probation before judgment constituted an illegal sentence. There are two components to our analysis: (1) whether an extension of a term of probation is a "sentence" when the original probationary term was part of a *957 disposition of probation before judgment; and (2) if so, whether an extension of the term of probation, after the expiration of the initial probation term, is an illegal sentence.
We start with the first issue, whether the court's initial order of probation, and the extension of the probation period, was a sentence that could be challenged as an illegal sentence. We have found no case specifically addressing the issue whether probation before judgment constitutes a sentence. The Court of Appeals, however, has referred to such a disposition as a sentence. See Jones v. Baltimore City Police Dep't, 326 Md. 480, 489, 606 A.2d 214 (1992) ("a sentence of probation before judgment is not entered upon a defendant's public driving record") (emphasis added). See also Hoile, 404 Md. at 620, 948 A.2d 30 (referring to another case where "the sentence of probation before judgment" was vacated) (emphasis added) (citing Hannah, 307 Md. at 403, 514 A.2d 16).
The term "sentence" is defined as "[t]he judgment that a court formally pronounces after finding a criminal defendant guilty; the punishment imposed on a criminal wrongdoer." BLACK'S LAW DICTIONARY 1485 (9th ed. 2009). Accord Epps v. Levine, 457 F.Supp. 561, 566 (D.Md.1978) ("`sentence' means the fine, probation, or incarceration imposed to punish, rehabilitate, or deter a convicted criminal defendant."). The definition of "sentence" as "[t]he judgment that a court formally pronounces" is potentially problematic to a finding that a disposition of probation before judgment is a sentence; such a disposition results in a stay of entry of judgment. CP § 6-220(b). The second definition of "sentence," however, "the punishment imposed on a criminal wrongdoer," does support a finding that probation before judgment constitutes a sentence. There is no question that "[a]n order to pay restitution as a condition of probation is part of the punishment for the crime." Juliano v. State, 166 Md. App. 531, 537, 890 A.2d 847 (2006). Typically, therefore, "`an illegal condition of probation can be challenged as an illegal sentence.'" Id. (quoting Goff v. State, 387 Md. 327, 340, 875 A.2d 132 (2005)). Although Juliano involved conditions of probation after judgment, id. at 536, 890 A.2d 847, the same analysis applies to conditions of probation before judgment, which similarly constitute punishment for the crime.
Here, the order to pay restitution as a condition of the disposition of probation before judgment was punishment imposed for the assault. Accordingly, the initial order of probation, and the order extending the term of probation, will be treated as a sentence for the purpose of a motion to correct an illegal sentence.
We proceed next to determine whether extending the probation constituted an illegal sentence. The Court of Appeals has defined an illegal sentence as "a sentence `not permitted by law,'" Hoile, 404 Md. at 621, 948 A.2d 30 (quoting Walczak v. State, 302 Md. 422, 427, 488 A.2d 949 (1985)), a sentence "`beyond the statutorily granted power of the judge to impose.'" Id. at 622, 948 A.2d 30 (quoting State v. Wilkins, 393 Md. 269, 273, 900 A.2d 765 (2006)). An illegal sentence occurs when there is "some illegality in the sentence itself or where no sentence should have been imposed." Evans v. State, 382 Md. 248, 278-279, 855 A.2d 291 (2004), cert. denied, 543 U.S. 1150, 125 S.Ct. 1325, 161 L.Ed.2d 113 (2005).
Significant to the determination of whether the court's order in this case constitutes an illegal sentence is the timing of the order extending the term of appellant's *958 probation. The court initially placed appellant on probation on February 26, 2007, for a period of two years. Thus, absent a violation of probation, appellant's term of probation was scheduled to end on February 26, 2009. The court's order extending the term of probation for three more years, however, was not issued until March 24, 2009. This case presents the issue whether, in the absence of a violation of probation, a court has the authority to extend the terms of probation after the probation has terminated.
In addressing that issue, we must determine the mechanism by which a term of probation expires. CP § 6-220(g)(1) states: "On fulfillment of the conditions of probation, the court shall discharge the defendant from probation." Neither appellant nor the State could advise whether any specific action by the court was required to discharge the defendant from probation or whether probation terminated automatically at the end of the probation period. We found no Maryland case addressing this issue. We did, however, find a Tennessee case that was instructive.
In Alder v. State, 108 S.W.3d 263, 267 (Tenn.Crim.App.2002), the Court of Criminal Appeals of Tennessee addressed the effect of a similar Tennessee statute, which provided that the court "shall discharge" the defendant at the end of the probationary period if there were no violations of probation.[7] In addressing whether the court had jurisdiction to revoke Alder's probation after the conclusion of the probationary period, the court rejected the State's argument that the court had continuing jurisdiction over a probationer until it issued an order terminating the probation. Id. The court noted that the statute, providing that the court "shall discharge" the defendant, was mandatory, and the court was "without any discretion." Id. In determining that the probation terminated at the conclusion of the designated time period, even without a formal discharge from the trial court, the appellate court stated that, to hold otherwise, would "give the trial court continuing jurisdiction ad infinitum." Id.
We apply the same analysis here. CP § 6-220(g)(1) provides that, if the defendant fulfills the conditions of probation, the court "shall discharge" the defendant from probation. This requirement is mandatory. See Motor Vehicle Admin. v. Dove, 413 Md. 70, 87, 991 A.2d 65 (2010) ("`Under settled principles of statutory construction, the word "shall" is ordinarily presumed to have a mandatory meaning.'") (quoting State v. Werkheiser, 299 Md. 529, 533, 474 A.2d 898 (1984)). Thus, even in the absence of an order issued by the court,[8] appellant's probation terminated on February 26, 2009.
As indicated, the court did not extend appellant's probation until March 24, 2009, after appellant's probation period had expired. The parties have not cited, and we have not found, any Maryland case addressing whether, absent a violation of probation, a court has the authority to extend the term of probation after the termination of the probationary period.[9]
*959 Maryland has addressed the modification/extension of a probation order by both statute and rule. Maryland Rule 4-346(b) allows for the modification of a probation order as follows:
During the period of probation, on motion of the defendant or of any person charged with supervising the defendant while on probation or on its own initiative, the court, after giving the defendant an opportunity to be heard, may modify, clarify, or terminate any condition of probation, change its duration, or impose additional conditions.
This rule specifically addresses the court's ability to modify the terms of probation "[d]uring the period of probation." Nothing in Rule 4-346(b) provides that the court can extend the duration of probation after the expiration of the probationary period.
CP § 6-222(b) provides that, "[f]or the purpose of making restitution, the court may extend the probation beyond the time allowed under subsection (a)(3)(i)...."[10] Even if this statute applies in the context of probation before judgment, it would not be applicable here because appellant's probation was not extended beyond the five years allowed in § 6-222(a). Moreover, nothing in this statute suggests that the court retains jurisdiction to extend probation after the probation has terminated.
Courts in other jurisdictions have addressed the authority of a court to extend the term of probation after the original probationary period has expired. For example, in State v. Satanek, 190 N.C.App. 653, 660 S.E.2d 623, 624 (2008), the defendant was placed on probation on February 1, 2001, for a period of thirty-six months. On February 26, 2004, after Satanek's period of probation had expired, the Court extended the term of probation for two years, until February 7, 2006. Id. North Carolina had a statute providing that the court could extend the probationary period "prior to the expiration or termination of the probation period." Id. at 625 (quoting N.C. GEN.STAT. § 15A-1344(d) (2007)). The Court of Appeals for North Carolina found that this language did not allow for "the extension of probation after the original term has expired." Id. Accordingly, the court held that the trial court lacked jurisdiction to extend the period of probation, *960 and because Satanek was not legally on probation when he was alleged to have violated probation, the subsequent revocation of probation was vacated. Id.[11]
The Kansas Court of Appeals similarly has found that a trial court loses jurisdiction to modify or extend a defendant's probation after the term of probation has ended. In State v. Cisneros, 36 Kan. App.2d 901, 147 P.3d 880, 881 (2006), the trial court placed the defendant on 12 months probation, with the condition that he "follow recommendations imposed as a result of drug evaluation." On the last day of his probation period, Cisneros had not completed the recommended substance abuse counseling. Id. He agreed to extend his probation period, but the voluntary probation extension agreement was not filed until four days after the expiration of his probation. Id. at 881-82. One month later, Cisneros tested positive for alcohol, a violation of his probation. Id. at 882. The court revoked Cisneros' probation and ordered him to serve his underlying prison term. Id.
The Court of Appeals reversed. Id. at 883-84. Although noting that a Kansas statute provided that the "court may modify or extend" the period of supervision, the Court of Appeals held that a "court's jurisdiction ceases with the termination of the probationary period." Id. at 882. The court stated:
The district court lost jurisdiction to modify or extend Cisneros' probation when Cisneros' probation terminated on Thursday, August 25, 2005. When the voluntary extension order was filed with the district court on Monday, August 29, 2005, the district court's jurisdiction over Cisneros had already terminated. Thus, the district court did not have jurisdiction to modify or extend Cisneros' probation, and when the State initiated revocation proceedings in November, the district court no longer had jurisdiction to revoke Cisneros' probation. The district court's revocation of Cisneros' probation must be reversed for lack of jurisdiction. Cisneros is entitled to be discharged.
Id. at 883-84.
Applying the reasoning of these cases, we hold that, in the absence of a probation violation, a court does not have jurisdiction to extend the term of probation after the original term of probation has expired. Appellant's two year probationary period expired on February 26, 2009, at which time appellant had paid all outstanding restitution and complied with his conditions of probation. Thus, on March 24, 2009, after appellant's probation had expired, the court was without authority to extend appellant's probation for three more years. The order extending the probation was an illegal sentence. Accordingly, we shall vacate the order.
STATE'S MOTION TO DISMISS DENIED. JUDGMENT VACATED. COSTS TO BE PAID BY THE APPELLEE.
NOTES
[1]  At the hearing on November 10, 2008, appellant's counsel informed the court that the parties divorced in May 2008.
[2]  In his Memorandum in Opposition to Extending Probation, defense counsel advised the court that appellant did pay the remaining $900 on February 12, 2009.
[3]  Appellant further argues that the court erred: (1) in requiring him to pay the victim's continued counseling expenses, without evidence that these expenses were the direct result of the assault; and (2) in not holding a hearing and receiving evidence on the restitution obligation before extending the probation. Given our resolution of appellant's first claim, we need not address these additional claims.
[4]  The appealability of a disposition of probation before judgment has been the subject of several opinions by the Court of Appeals. In Warren v. State, 281 Md. 179, 183, 377 A.2d 1169 (1977), the Court held that probation before judgment pursuant to another statute permitting the court to "stay the entering of the judgment of guilt ..." was not a final judgment from which the defendant could note an appeal. In State v. Hannah, 307 Md. 390, 401-02, 514 A.2d 16 (1986), the Court of Appeals held that Warren was no longer good law. The Court stated that, "although probation before judgment is not a final judgment of conviction for many purposes, from the standpoint of appealability it is a final judgment." Id. at 401, 514 A.2d 16. Thus, the State can appeal a disposition of probation before judgment if the disposition violates a mandatory sentencing law. Id. at 401-02, 514 A.2d 16. The accused, however, by consenting to a disposition of probation before judgment, waives the right to appeal. Id. at 401, 514 A.2d 16.
[5]  Md. Rule 4-345 provides:

(a) Illegal sentence. The court may correct an illegal sentence at any time.
* * *
(e) Modification Upon Motion. (1) Generally. Upon a motion filed within 90 days after imposition of a sentence (A) in the District Court, if an appeal has not been perfected or has been dismissed, and (B) in a circuit court, whether or not an appeal has been filed, the court has revisory power over the sentence except that it may not revise the sentence after the expiration of five years from the date the sentence originally was imposed on the defendant and it may not increase the sentence.
[6]  Moreover, we note that a claim that a court imposed an illegal sentence can be raised at any time. See Md. Rule 4-345(a) ("The court may correct an illegal sentence at any time."); Montgomery v. State, 405 Md. 67, 75, 950 A.2d 77 (2008) ("A trial court clearly has the authority and responsibility to correct an illegal sentence at any time ... and the refusal to do so, no matter when the correction request is made, is appealable.") (quoting Coles v. State, 290 Md. 296, 303, 429 A.2d 1029 (1981)). Resolving the issue now, as opposed to dismissing this appeal and requiring another motion and a subsequent appeal, is in the interest of judicial economy.
[7]  The probation was referred to as a "judicial diversion." Alder v. State, 108 S.W.3d 263, 264-65 (Tenn.Crim.App.2002).
[8]  No such order can be found in the record.
[9]  In the context of a violation of probation, a court can revoke probation after the expiration of the probationary period, if the probation violation occurred during the time that the defendant was on probation. See State v. Miller, 289 Md. 443, 446, 424 A.2d 1109 (1981) ("so long as the State proceeds with reasonable promptness and diligence to prosecute a defendant for a violation of probation and so long as the violation itself occurs within the probationary period, the revocation proceedings may be initiated at any time, even if the probationary period has expired"). In that circumstance, the court is authorized by statute to place the defendant "on further probation." Donaldson v. State, 305 Md. 522, 529, 505 A.2d 527 (1986) (citing to the predecessor of CP § 6-224(b)(2)). In Donaldson, the Court distinguished between "continuing" probation after the expiration of the probationary period and placing the defendant on "further probation" after a violation of probation. Id. at 529-30, 505 A.2d 527. Here, there was no finding of a violation of probation.
[10]  CP § 6-222(a)(3)(i) provides, in part:

(a) Limits on probation after judgment. A circuit court or the District Court may:
* * *
(3)(i) order probation for a time longer than the sentence but, subject to subsections (b) and (c) of this section, not longer than:
1.5 years if the probation is ordered by a circuit court;
* * *
(b) Extension for restitutionTime allowed in subsection (a).(1) For the purpose of making restitution, the court may extend the probation beyond the time allowed under subsection (a)(3)(i) of this section for:
(i) an additional 5 years if the probation is ordered by a circuit court ...
[11]  North Carolina's statute permitted a court to revoke probation after the expiration of the period of probation if there was a violation of probation and the State satisfied certain requirements. N.C. GEN.STAT. § 15A-1344(f) (2007) (allowing revocation of probation after the expiration of the period of probation if, before the expiration of the period of probation, the State filed a written motion indicating its intent to conduct a revocation hearing, and that the State made reasonable efforts to notify the probationer and to conduct the hearing). In Satanek, the State did not satisfy those requirements. State v. Satanek, 190 N.C.App. 653, 660 S.E.2d 623, 624, 625 (2008).
