
821 A.2d 430 (2003)
374 Md. 184
STATE of Maryland
v.
David Crary GRISWOLD.
No. 62, Sept. Term, 2002.
Court of Appeals of Maryland.
April 11, 2003.
*432 Sarah Page Pritzlaff, Asst. Atty. Gen. (J. Joseph Curran,Jr. Atty. Gen., on brief), Baltimore, for appellant.
Maura C. Fisher (Miles & Stockbridge P.C., Frederick, David B. Weisberger, Westminster, on brief), for appellee.
Argued Before ELDRIDGE, RAKER, WILNER, CATHELL, HARRELL, BATTAGLIA and LAWRENCE F. RODOWSKY, (retired, specially assigned), JJ.
*431 RODOWSKY, J.
Here, the State appeals from the revision of judgments of conviction in two sexual offense cases, contending that sentences mandated by statute were not imposed. More than five years after the original judgments had been entered, the Circuit Court for Carroll County, purportedly acting pursuant to timely filed Maryland Rule 4-345(b) motions, altered the charges in the indictment counts to which the defendant had pled guilty, and for which he had been legally sentenced, to other crimes which the State had initially charged in other counts, but which the State had nolle prossed at the time of sentencing. The court then modified the sentences to probation before judgment, a statutorily prohibited disposition of the charges to which the defendant had pled guilty. We shall reverse for the reasons set forth below.
In 1996 a Carroll County grand jury returned multi-count indictments against the respondent, David Crary Griswold (Griswold), charging that he had committed sexual offenses more than ten years before with children under the age of fourteen. At the time of the earliest of the offenses Griswold was in his thirties.[1] Specifically, in case K-1996-23295, Griswold was charged with four counts involving a male victim who was then approximately six years old. Count I alleged a violation of Maryland Code (1957, 1996 Repl.Vol.), Article 27, § 464B, providing in relevant part as follows:
" § 464B. Third degree sexual offense.
"(a) Elements of offense.A person is guilty of a sexual offense in the third degree if the person engages in:
....
"(3) Sexual contact with another person who is under 14 years of age and the person performing the sexual contact is four or more years older than the victim[.]"
Count II in indictment 23295 charged a violation of Article 27, § 464C, which in relevant part read: " § 464C. Fourth degree sexual offense.
"(a) Elements of the offense.A person is guilty of a sexual offense in the fourth degree if the person engages:

*433 "(1) In sexual contact with another person against the will and without the consent of the other person[.]"
The remaining counts in No. 23295 charged common law battery and child abuse in violation of Article 27, § 35C.
The second case with which we are concerned on this appeal is K-1996-23296. The victim was Griswold's niece, who was born in 1980. The criminal acts were alleged to have occurred between 1987 and 1994. Counts I and II in that indictment charged third degree sexual offense in violation § 464B(a)(3), and Counts III and IV charged fourth degree sexual offense in violation of § 464C. The remaining counts in No. 23296 charged sexual child abuse of a family member, common law battery, and indecent exposure.[2]
On January 17, 1997, Griswold pled guilty to the first counts, charging third degree sexual offense, in the two indictments involved in this appeal, and the State nolle prossed all of the other counts of both indictments. That day, the court sentenced Griswold on each of the two counts of third degree sexual offense to five years, to be served concurrently. The circuit court suspended the execution of the sentence and released Griswold on probation, under a number of conditions. These included home confinement between the hours of 6:00 p.m. and 10:00 a.m. for a period of 180 days, that he continue counseling with his physician, that he have no contact with the male victim, and that there be no unsupervised contact with any children under eighteen years of age. These sentences were not illegal.
Within ninety days of the imposition of these sentences Griswold filed identical motions in each case, headed, "Motion for Modification or Reduction of Sentence." He moved "pursuant to Maryland Rule 4-345(b) for a modification and/or reduction of sentence imposed in the above case." The motions simply described the sentences imposed and asked the court to "consider revising its judgment and sentence in the above-captioned case."
Maryland Rule 4-345, "Sentencing-Revisory power of court," provides in relevant part:
"(b) Modification or reductionTime for. The court has revisory power and control over a sentence upon a motion filed within 90 days after its imposition... in a circuit court, whether or not an appeal has been filed. Thereafter, the court has revisory power and control over the sentence in case of fraud, mistake or irregularity[.]
....
"(d) Open court hearing. The court may modify, reduce, correct, or vacate a sentence only on the record in open court, after hearing from the defendant, the State, and from each victim or victim's representative who requests an opportunity to be heard."
The State responded to the motions, asserting that the sentence was "fair, reasonable and within the statute," that there was no "unconscionable burden" on Griswold, and that "nothing has occurred since the time of sentencing to warrant a reduction in the sentence."
By longhand notations on the margins of the motions, the court directed that they be held sub curia, awaiting the decision of counsel as to when a hearing would be requested. A hearing was requested in late December 1998, but canceled the following month. In September 2001 Griswold *434 again requested a hearing on the pending motions. At that hearing, held January 10, 2002, Griswold asked for probation before judgment (P.B.J.).
When Griswold was originally sentenced, Maryland Code (1957, 1996 Repl. Vol.), Article 27, § 641, dealing with P.B.J., contained a limitation on that type of disposition that is relevant here.[3] That limitation, found in § 641(a)(4), read:
"Notwithstanding paragraph (1) of this subsection, a court may not stay the entering of judgment and place a person on probation for a violation of any of the provisions of §§ 462 through 464B of this article for an offense involving a person under the age of 16 years."
At the time of the revision of the judgments to P.B.J. in the instant matter, the limitation was found in Maryland Code (2001), § 6-220(d)(3) of the Criminal Procedure Article (CP), reading:
"Notwithstanding subsections (b) and (c) of this section, a court may not stay the entering of judgment and place a defendant on probation for:
....
"(3) a violation of any of the provisions of Article 27, §§ 462 through 464B of the Code for a crime involving a person under the age of 16 years."
At the January 10, 2002 hearing on the motion Griswold's counsel, in part, argued as follows:
"I would ask you to consider modifying this to a P.B.J. I think we had two Third Degree Sex Offenses, which typically cannot be modified....
"I would ask you to consider modifying the Third Degree Convictions to Fourth so they could then be P.B.J.... I'm asking this on behalf of his mother. I ask that she not have to live with the conviction that's on his record. I don't think there's a need for him to be reporting as a sex offender on an annual basis or to be on any list."
The State expressly opposed the requested modifications with respect to cases 23295 and 23296 on the ground that "[a] P.B.J. cannot be given as they are Third Degree Sex Offenses."
After taking the matter under advisement, the circuit court, on March 6, 2002, caused the docket to reflect the following:
"ORDERED, that Defendant's convictions in K-96-23295 and K-96-23296 of Art. 27, § 464B, Third Degree Sexual Offense be, and they hereby are, modified to Art. 27, § 464C, Fourth Degree Sexual Offense; and it is further
"ORDERED, that Defendant's convictions in ... K-96-23295 and K-96-23296, Art. 27, § 464C, Fourth Degree Sexual Offense be, and they hereby are, modified to Probation Before Judgment, pursuant to Md. Criminal Procedure Code Ann. § 6-220 (2001)."
The State timely noted an appeal to the Court of Special Appeals. This Court issued the writ of certiorari on its own motion prior to consideration of the matter by that court.
A single question is presented by the State, namely:
"Where Griswold was convicted and sentenced on two third degree sexual offense convictions, did the circuit court err when it later changed the convictions to fourth degree sexual offenses in order *435 to modify Griswold's sentence to probation before judgment?"
In answer to that question the State submits that the circuit court violated CP § 6-220(d)(3) when it modified the sentences for third degree sexual offense to P.B.J. In opposition, Griswold's principal submission is that P.B.J. was imposed for convictions of fourth degree sexual offenses, dispositions which were not prohibited by statute. The result, he contends, is that the State has no right of appeal and that the appropriate mandate is to dismiss the appeal.

I
A limited right of appeal by the State is conferred by Maryland Code (1974, 2002 Repl.Vol.), § 12-302(c) of the Courts and Judicial Proceedings Article (CJ). Pertinent here is subsection (2) which reads:
"(c) In a criminal case, the State may appeal as provided in this subsection.
....
"(2) The State may appeal from a final judgment if the State alleges that the trial judge failed to impose the sentence specifically mandated by the Code."
Resolution of the principal issue between the parties ultimately turns on the appropriate analysis for applying CJ § 12-302(c)(2). Under the State's analysis, we are to compare the original charging document to the modified sentence. At the initial sentencing Griswold pled guilty to third degree sexual offenses and the sentences imposed were not prohibited by the predecessor of CP § 6-220(d)(3). In the State's view, the circuit court changed those judgments of conviction by modifying the sentence element thereof to a statutorily prohibited sentence while, throughout, the determination of guilt remained, in legal effect, the commission of third degree sexual offenses.
On the other hand, Griswold's position looks at the proceedings below as consisting of distinct steps. First, per the timely filed Rule 4-345 motions, there was a modification from third degree to fourth degree sexual offenses of the guilt determination element of the judgments. Then there was a modification of the sentences to sentences that are lawful for fourth degree sexual offenses. Consequently, argues Griswold, there being no sentence specifically mandated by the Code for fourth degree sexual offenses, there is no right of appeal by the State.
The State presents the proper analysis, as demonstrated by our decision in State v. Hannah, 307 Md. 390, 514 A.2d 16 (1986). There the defendant pled guilty to common law robbery and to the use of a handgun in the commission of a felony. Maryland Code (1957, 1982 Repl.Vol., 1985 Cum.Supp.), Article 27, § 36B, mandated a minimum five year sentence for the handgun violation. At sentencing, the circuit court struck the plea of guilty to the handgun offense and entered P.B.J. On the robbery count Hanna was sentenced to ten years, all but two suspended, followed by five years probation. On the State's appeal of the disposition of the handgun charge, this Court reversed and remanded for imposition of the statutorily mandated minimum sentence.
In this Court, Hanna challenged the State's right to appeal under CJ § 12-302(c)(2). He contended that, by first striking the plea of guilty to the handgun charge and then imposing P.B.J., the circuit court had not entered a final judgment on the handgun count, thereby rendering CJ § 12-302(c)(2) inapplicable. As part of that argument Hanna sought to distinguish State ex rel. Sonner v. Shearin, 272 Md. 502, 325 A.2d 573 (1974), and State v. *436 Wooten, 277 Md. 114, 352 A.2d 829 (1976), as cases in which sentences had been imposed and then execution of the sentences suspended. Rejecting that argument we said:
"This Court recognized the State's appeals in Sonner and in Wooten to have been taken from appealable orders not because those orders suspended sentences which had earlier been imposed, if only by an instant, but because, by virtue of some other provision of law, the orders allegedly were beyond the authority of the sentencing courts."
Hannah, 307 Md. at 400, 514 A.2d at 21. We then held that P.B.J. is a "final" judgment within the meaning of CJ § 12-203(c)(2). Thus, in Hannah, we looked through the striking of the guilty plea to the offense charged to determine whether a Code mandated sentence had been imposed. Here, the appropriate analysis looks through the purported modification by the circuit court of the first counts in the indictments and looks to the charges brought by the State to which Griswold pled guilty. P.B.J. is not a permitted disposition of the grand jury's charges.
Shilling v. State, 320 Md. 288, 577 A.2d 83 (1990), involved a subsection of the P.B.J. statute which is a companion to the prohibition against P.B.J. involved in the instant matter. Maryland Code (1957, 1987 Repl.Vol., 1989 Cum.Supp.), Article 27, § 641(a)(2), now CP § 6-220(d)(1), prohibited P.B.J. for a second or subsequent violation of the driving while intoxicated or driving under the influence prohibitions of Maryland Code (1977, 1987 Repl.Vol., 1989 Cum.Supp.), § 21-902(a) of the Transportation Article. There, in describing the operation of CJ § 12-302(c)(2), Judge Cole, writing for the Court, said that the statute "confers a right of appeal on the State under circumstances where the State alleges that the trial court failed to impose a sentence specifically mandated by the statute under which the defendant is charged." Shilling, 320 Md. at 294, 577 A.2d at 86 (emphasis added).
The instant matter presents an even more compelling case for appealability under CJ § 12-302(b)(2) than was presented in Hannah. In Hannah, no final judgment had been entered when the guilty plea was stricken, so that the court retained broad discretionary power to strike that plea. Here, the circuit court, in its first step, undertook to modify that portion of the judgment of conviction "defining a defendant's culpability." Shilling, 320 Md. at 293, 577 A.2d at 85. Griswold argues that the authority for that alteration is Rule 4-345(b). That rule, however, limits the circuit court's revisory power to a "sentence." In Webster v. State, 359 Md. 465, 754 A.2d 1004 (2000), we said that
"[t]he meaning of `sentence' in the criminal context is clearit refers to the act of the court in pronouncing sentence, announcing the sanction that is being imposed on the defendant. It is that part of the final judgment that postdates the rendition of a verdict of guilty. But a trial court may modify a sentence. See Maryland Rule 4-345(b)[.]"
Id. at 482, 754 A.2d at 1013.
A more fundamental defect in Griswold's position is that the circuit court had no authority to alter the charging document over the objection of the State's Attorney. The first counts of the indictments, to which Griswold pled guilty, charged third degree sexual offense, but the circuit court, years later, undertook to alter those charges to fourth degree sexual offenses, which had been charged in later counts in the indictments. The State's Attorney had disposed of the fourth degree sexual offenses by nolle prosequi. Maryland Rule 4-247(a) provides, in relevant part, that "the State's Attorney may terminate a *437 prosecution on a charge and dismiss the charge by entering a nolle prosequi on the record in open court." This Court views as
"well settled that `the entry of a nolle prosequi is generally within the sole discretion of the prosecuting attorney, free from judicial control and not dependent upon the defendant's consent,' Ward v. State, 290 Md. 76, 83, 427 A.2d 1008, 1012 (1981); see also In re Darren M., 358 Md. 104, 112, 747 A.2d 612, 616 (2000) ... and that it `may be entered as to an entire charging document, or one or more counts, or even a part of a count.' Ward, 290 Md. at 83, 427 A.2d at 1012."
State v. Martin, 367 Md. 53, 55, 785 A.2d 1270, 1271 (2001). Further,
"a nolle prosequi discharges the defendant on the charging document or count which was nolle prossed, and ... it is a bar to any further prosecution under that charging document or count...."
Ward v. State, 290 Md. at 84, 427 A.2d at 1012-13.
Nor can we view the circuit court's alteration of the first counts in the indictments as an amendment, because it was made after verdict and the "amendment" changed "the character of the offense charged." Maryland Rule 4-204.[4] The changes to fourth degree sexual offense eliminated the element that the victims were under fourteen years of age while Griswold was more than four years older than those victims. Even if the amendment had been attempted before the guilty plea was entered, that substantial a change could not be made without the consent of the State.
This is not a case like Chertkov v. State, 335 Md. 161, 642 A.2d 232 (1994), where the State argued the illegality of the modified sentence based on the violation of a Maryland Rule of Procedure. In Chertkov the defendant pled guilty to misdemeanor medicaid fraud and conspiracy to commit felony medicaid fraud. The plea was entered pursuant to a plea agreement, approved by the court pursuant to Maryland Rule 4-243(c), under which the defendant was sentenced to three years incarceration, all but 179 days suspended, followed by five years probation and 1500 hours of community service. Id. at 164, 642 A.2d at 233. Pursuant to a timely filed motion under Maryland Rule 4-345, the defendant sought revision of the sentence after service of the unsuspended portion thereof. Over the State's objection, the circuit court entered P.B.J. The State noted an appeal, contending that the sentence was illegal because the court's action violated Rule 4-243, governing plea bargains. Although we agreed with the State that the modification of the sentence violated the court's obligations under the plea bargain rule, the appeal was dismissed. This was because, when CJ § 12-302(c)(2) "referred to a failure to impose the sentence specifically mandated by the Code, it was not referring to the Maryland Rules or anything else other than the statutory law of this State." Chertkov, 335 Md. at 169, 642 A.2d at 236.
Similar to Chertkov is Cardinell v. State, 335 Md. 381, 644 A.2d 11 (1994). The defendant had been found guilty of drug offenses and lawfully sentenced. After the circuit court had denied a timely filed Rule 4-345 motion to revise the sentence, the *438 defendant filed a second Rule 4-345 motion, well beyond the time limit of ninety days from imposition of sentence. Id. at 385, 644 A.2d at 13. Based on that motion the circuit court revised the sentence, and the State appealed under CJ § 12-302(c)(2), alleging noncompliance with the time limits in Rule 4-345 as the illegality in the modified sentence. Although Cardinell was later overruled on other grounds by State v. Green, 367 Md. 61, 785 A.2d 1275 (2001), this Court was unanimous in concluding that § 12-302(c)(2) did not authorize the State's appeal. Cardinell, 335 Md. at 387, 644 A.2d at 14. See also State v. Green, 367 Md. at 84-85, 785 A.2d at 1288-89 (Wilner, J., concurring); State v. Warfield, 148 Md.App. 178, 181, 811 A.2d 382, 384 (2002).
Neither Chertkov nor Cardinell involved crimes for which the Code mandated or prohibited a specific sentencing disposition. In those cases the State sought to substitute a rule violation for a statutory mandate or prohibition applicable to the crime of which the defendant was guilty. Comparison of the sentence that had been imposed to the rule violation did not satisfy CJ § 12-302(c)(2).
We will not extend the holdings of Chertkov and of Cardinell to preclude the State's reliance on violations of the Maryland Rules of Procedure in order to demonstrate that the portion of the judgment of conviction determining criminal culpability has been altered, in violation of the Rules, to a crime which is different from that on which a mandatory sentence was originally imposed and which carries no sentence specifically mandated by the Code. The obvious purpose of CJ § 12-302(c)(2)'s conferral of a right of appeal on the State from the imposition of sentences contrary to a specific mandate of the Code is to insure that the courts carry out the legislative policy embodied in statutes mandating or prohibiting certain sentences for certain crimes. The purpose of those statutes, including CP § 6-220(d)(3), easily could be thwarted if circuit courts could, in violation of the Rules of Procedure, amend charging documents over the prosecutor's objection, resurrect nolle prossed counts, substantially change offenses from those on which the determination of guilt was predicated, and, by those means, produce a judgment of conviction for a crime for which the Code does not mandate any sentencing requirement.[5]
Consequently, the State's appeal lies.

II
Griswold also makes some ancillary arguments which will not long detain us. First, he suggests that there is no violation of CP § 6-220(d)(3) because a lawful sentence was originally imposed, and the modified sentence was based upon an offense for which Griswold originally could have been found guilty. In State v. Green, 367 Md. at 83, 785 A.2d at 1288, we rejected "the petitioner's alternate argument that because the Circuit Court originally sentenced him as [the statute there involved] requires, the court did not fail to impose the sentence specifically mandated by the Code."
Griswold also cites Madison v. State, 205 Md. 425, 431, 109 A.2d 96, 99 (1954), for the proposition that all judgments are under the control of the court *439 during the term in which they are entered. We note that, under Maryland Rule 16-107.a, terms of the circuit courts now exist only for "accounting and statistical reporting purposes." In any event, Griswold does not demonstrate that the revision of the judgment of conviction in 2002 took place in the same term of court as the imposition of the lawful sentence in 1997.
For the foregoing reasons we enter the following mandate.
JUDGMENT OF THE CIRCUIT COURT FOR CARROLL COUNTY REVERSED; CASE REMANDED TO THAT COURT FOR REINSTATEMENT OF THE JUDGMENTS OF CONVICTION IN K-1996-23295 AND IN K-1996-23296. COSTS IN THIS COURT TO BE PAID BY THE APPELLEE, DAVID CRARY GRISWOLD.
NOTES
[1]  At age nineteen Griswold, who had been a brilliant student, was involved in a motorcycle accident which left him with a mentally debilitating brain injury and unable to maintain regular employment outside of the family home. He also suffered from epileptic type seizures.
[2]  A third indictment, No. 23297, returned against Griswold at the same time, involved a third victim. In that case Griswold pled guilty to child abuse. That judgment of conviction was also modified by the circuit court, but it is not involved in this appeal.
[3]  P.B.J., in general, means that, with the consent of a person guilty of a criminal offense, the court exercising criminal jurisdiction has power to "stay the entering of judgment, defer further proceedings, and place the person on probation[.]" Former § 641(a)(1)(i)1. Section 641, without substantial change, has been recodified as Maryland Code (2001), § 6-220 of the Criminal Procedure Article.
[4]  Maryland Rule 4-204, "Charging documentAmendment," reads in relevant part:

"On motion of a party or on its own initiative, the court at any time before verdict may permit a charging document to be amended except that if the amendment changes the character of the offense charged, the consent of the parties is required."
[5]  The view which we take of this case makes it unnecessary to address whether the action by the circuit court constituted an unconstitutional invasion by the Judiciary Department of State Government on the State's Attorney's "`most awesome discretionary power: to determine whether or not to prosecute.'" Lykins v. State, 288 Md. 71, 86, 415 A.2d 1113, 1121 (1980) (quoting Murphy v. Yates, 276 Md. 475, 495, 348 A.2d 837, 848 (1975)).
