
73 Md. App. 686 (1988)
536 A.2d 128
STATE OF MARYLAND
v.
BILLY J. THURMOND.
No. 644, September Term, 1987.
Court of Special Appeals of Maryland.
January 19, 1988.
Mary Ellen Barbera, Asst. Atty. Gen. (J. Joseph Curran, Jr., Atty. Gen., Kurt L. Schmoke, State's Atty. for Baltimore City and Ruth M. Finch, Asst. State's Atty. for Baltimore City, on brief), Baltimore, for appellant.
Michael R. Malloy, Asst. Public Defender (Alan H. Murrell, Public Defender, on brief), Baltimore, for appellee.
Argued before GILBERT, C.J., and BISHOP and WENNER, JJ.
BISHOP, Judge.
In the Circuit Court for Baltimore City, Billy Joe Thurmond, appellee, pled guilty to robbery with a dangerous and deadly weapon, use of a handgun in the commission of a felony or a crime of violence, one count of unlawful possession of a sawed off shotgun and five counts of assault contrary to MD. ANN. CODE art. 27, §§ 488 & 489, § 441, § 481C(b) and the common law, respectively. Thurmond was found guilty of all charges and a sentence of twelve years was imposed with five years supervised probation. The State appeals the trial court's refusal to impose a twenty-five year sentence without parole pursuant to the repeat offender statute, MD. ANN. CODE art. 27, § 643B.[1]
This appeal presents several issues:
I. Whether the State may appeal under these circumstances?
II. Whether the trial court erred in refusing to sentence under § 643B and Rule 4-245?
III. If the answers to issues I and II are in the affirmative, whether Thurmond should be allowed to withdraw his guilty plea?

FACTS
Upon entering Thurmond's plea of guilty, defense counsel began a lengthy litany with Thurmond to assure the trial court that Thurmond's plea was made knowingly and voluntarily. Defense counsel advised Thurmond of the nature of the charges, the rights he would waive by pleading guilty, his appellate rights and that the maximum sentence on the armed robbery charge was twenty years. The trial court initially accepted that guilty plea. After an objection by the State that the plea was not satisfactory, the trial court allowed the State to make Thurmond aware of its intention to seek a sentence of twenty-five years without parole under § 643B. In addition, in response to questions from the State's Attorney, Thurmond stated that he understood that he could receive additional twenty year sentences under each of the five assault counts as well as twenty years for a conviction under the use of a handgun count. The trial court also told Thurmond that those sentences could be imposed to run consecutively. Thereafter, the trial court again accepted the guilty plea.
After the State gave the statement of facts which constituted Thurmond's criminal conduct, the trial court found Thurmond guilty of all the offenses charged. When the trial court asked the parties whether they were ready for sentencing, the State replied in the negative and requested a postponement in order to comply with the notice requirements of Maryland Rule 4-245.[2] Thurmond requested an immediate sentence, but stated that he was unwilling to waive the notice required under Rule 4-245. The trial court denied the State's request for a postponement. The State then proffered Thurmond's prior conviction record, which included two separate armed robbery convictions. The State also proffered that Thurmond spent considerable time in jail under both convictions and qualified as a § 643B subsequent offender. The trial court, however, failed to sentence Thurmond in accordance with § 643B.

I.

The State's Right to Appeal

A.
Under MD.CTS. & JUD.PROC.CODE ANN. § 12-302(c)(2) (1984 Repl.Vol. and 1987 Cum.Supp.), "[t]he 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." Thurmond moves, pursuant to Rules 1035 and 1036, to dismiss the State's appeal as not allowed by law. Thurmond concedes that the appeal, as a matter of form, is an allegation that the trial court failed to impose a sentence under § 643B. Nonetheless, he argues that the sentence the trial court imposed was a legal sentence authorized under Code art. 27, § 488, and that the failure to impose the enhanced sentence under § 643B did not render the sentence illegal. This is not a correct statement of the law. If the State produced the proper predicate before the trial court, then any other sentence not in accordance with the statute would be illegal. We deny Thurmond's motion to dismiss because § 12-302(c)(2) requires only that the State allege a failure to impose a mandated sentence. If upon our review we determine that the State's position is correct we will reverse; if the State is not correct then we will affirm.

B.
Thurmond then argues that once the trial court denied the State's request for a postponement of the sentencing hearing and the State continued, without objection, to participate in the sentencing, the State waived its right to appellate review of this issue. We disagree.
After the trial court denied its request for a postponement, the State, in an attempt to persuade the trial court to reverse its decision, proffered Thurmond's prior conviction record. The prosecutor told the trial court:
Judge, most respectfully, the defendant has admitted to the two armed robberies where he received a six year sentence that I put into the file and I think the court should give the defendant twenty-five years without parole in this case.
I think [defense counsel] is wise in advising his defendant to plead guilty at this time, particularly, since the court is not following [Rule 4-245] as it should be followed. But I certainly do not think he should be given any breaks because the State ... has no problem with trying this case.
THE COURT: Let me correct you on one thing. Let's get it straight. Now, I have already ruled that I am following the rule. Now, don't tell me I am not following the rule when I have ruled that I am following the rule. If you have a private disagreement, tell it to the Court of Special Appeals.
That is precisely what the State has done and since we hold that the State did not waive its right to appellate review, we will address the issue of the legality of Thurmond's sentence.

II.

The Sentence
The State argues that the trial court erred when it refused to grant the requested postponement under Rule 4-245(c) and thereafter imposed an illegal sentence. We agree.
Although Thurmond received a sentence within the statutory maximum for the crimes of which he was convicted, see Johnson v. State, 274 Md. 536, 538, 336 A.2d 113 (1975), the evidence proffered by the State indicates that he is a subsequent offender within the meaning of § 643B(c). See note 1, supra.
Under subsection (d) of Rule 4-245, supra, note 2, the State is not required to file notice of its intent to seek sentencing under § 643B until after the trial court accepts the guilty plea. In the case sub judice, the trial court accepted Thurmond's guilty plea only minutes before the State requested a postponement for the purpose of giving the required notice under Rule 4-245(c), note 2, supra. And just as the defense had done in State v. Armstrong, 60 Md. App. 244, 249, 482 A.2d 31 (1984), cert. denied, 302 Md. 288, 487 A.2d 292 (1985). Thurmond opted for an immediate sentence.
Former Rule 734(c),[3] as discussed in Armstrong, 60 Md. App. at 250, 482 A.2d 31:
seemed to permit an accused to spring a surprise on the State by withholding from the prosecutor the fact that the defendant intended to plead guilty. If, at trial, the accused entered a plea of guilty and requested an immediate imposition of sentence, and the judge agreed, the prosecution was caught short. It was unable to comply with Rule 734, unless as a policy matter it served timely notice in every case to which the habitual offender act might conceivably apply.
The Armstrong court went on to say:
Under the new Rule 4-245(c),[4] if the State fails to give the required notice, the judge must postpone sentencing for 15 days in order that the notice requirements are met. Of course, the defendant may waive notice. In either event, the State appears to be able to utilize the rule by complying with its terms before or after the entering of a verdict of guilty, whether by way of a plea or by trial on the merits.
The operative language of Rule 4-245(c), "the court shall (emphasis added) postpone sentencing at least 15 days unless the defendant waives the notice requirement", is mandatory and leaves no discretion with the trial court. We hold that the trial court erred in disobeying the clear command of the rule.

III.
Thurmond argues that his guilty plea was based on the reasonable assumption that he would not be subject to sentencing under § 643B and, if we remand, he should be allowed to withdraw his plea. For that proposition Thurmond cites Armstrong, supra, 60 Md. App. at 251 n. 3, 482 A.2d 31, wherein this Court stated:
Because the judge did not comply with the provisions of Md. Ann. Code art. 27, § 643B, the habitual offender law, there was no need to extend to Ms. Armstrong the opportunity to withdraw her plea. On remand, she should be afforded that opportunity, inasmuch as she has not voluntarily waived that right.
Under the facts of Armstrong, we required that the Defendant be allowed to withdraw her guilty plea because the circumstances changed between the entry of the guilty plea and the imposition of the enhanced sentence, some three months later. These conditions are not present in the case sub judice.
Here, the State took it upon itself to make Thurmond aware of its intention to seek enhanced punishment under § 643B. After having been made aware of that fact, Thurmond continued with the guilty plea and acknowledged the possibility of enhanced punishment and the trial court accepted the plea. The trial court then found Thurmond guilty of all of the offenses charged. Only after all of this had transpired did the postponement issue arise. As a matter of law, Thurmond could not have reasonably assumed that he would not have been subjected to a § 643B sentencing. Before Thurmond's plea of guilty was finally accepted, he had been made aware explicitly of a possible enhanced sentence under § 643B. We hold that upon remand the case will proceed on the basis of the guilty plea.
CONVICTIONS AFFIRMED;
SENTENCE VACATED, CASE REMANDED FOR A NEW SENTENCING PROCEEDING;
COSTS TO BE PAID BY APPELLEE.
NOTES
[1]  Section 643B states in pertinent part:

Mandatory sentences for crimes of violence.
(a) "crime of violence".  As used in this section, the term "crime of violence" means abduction; arson; burglary; daytime housebreaking under § 30(b) of this article; kidnapping; manslaughter, except involuntary manslaughter; mayhem and maiming under §§ 384, 385, and 386 of this article; murder; rape; robbery; robbery with a deadly weapon; sexual offense in the first degree; sexual offense in the second degree; use of a handgun in the commission of a felony or other crime of violence; an attempt to commit any of the aforesaid offenses; assault with intent to murder; assault with intent to rape; assault with intent to rob; assault with intent to commit a sexual offense in the first degree; and assault with intent to commit a sexual offense in the second degree.
.....
(c) Third conviction of crime of violence.  Any person who (1) has been convicted on two separate occasions of a crime of violence where the convictions do not arise from a single incident, and (2) has served at least one term of confinement in a correctional institution as a result of a conviction of a crime of violence, shall be sentenced, on being convicted a third time of a crime of violence, to imprisonment for the term allowed by law, but, in any event, not less than 25 years. Neither the sentence nor any part of it may be suspended, and the person shall not be eligible for parole except in accordance with the provisions of Article 31B, § 11. A separate occasion shall be considered one in which the second or succeeding offense is committed after there has been a charging document filed for the preceding occasion.
(d) Compliance with Maryland Rules.  If the State intends to proceed against a person as a subsequent offender under this section, it shall comply with the procedures set forth in the Maryland Rules for the indictment and trial of a subsequent offender.
[2]  Rule 4-245 states in pertinent part:

SUBSEQUENT OFFENDERS
(a) Definition.  A subsequent offender is a defendant who, because of a prior conviction, is subject to additional or mandatory statutory punishment for the offense charged.
.....
(c) Required Notice of Mandatory Penalties.  When the law prescribes a mandatory sentence because of a specified previous conviction, the State's Attorney shall serve a notice of the alleged prior conviction on the defendant or counsel at least 15 days before sentencing in circuit court or five days before sentencing in District Court. If the State's Attorney fails to give timely notice, the court shall postpone sentencing at least 15 days unless the defendant waives the notice requirement.
(d) Disclosure of the Notice.  After acceptance of a plea of guilty or nolo contendere or after conviction, a copy of the notice shall be filed with the clerk and presented to the court. The allegation that the defendant is a subsequent offender is not an issue in the trial on the charging document and may not be disclosed to the trier of fact without the consent of the defendant, except as permitted in this Rule. Nothing herein shall prohibit the use of any prior conviction for impeachment purposes, if the evidence is otherwise admissible.
(e) Determination.  Before sentencing and after giving the defendant an opportunity to be heard, the court shall determine whether the defendant is a subsequent offender as specified in the notice of the State's Attorney.
[3]  Former Rule 734(c) was quoted in Armstrong as follows:

"If a mandatory sentence is prescribed by law because of a specified previous conviction, the State's Attorney, at least 15 days prior to sentencing, shall serve upon the defendant or his counsel a notice of the alleged prior conviction which would require imposition of the mandatory sentence."
60 Md. App. at 249, 482 A.2d 31 (footnote omitted).
[4]  The text of Rule 4-245(c) appears in note 2, supra.
