
700 P.2d 16 (1985)
108 Idaho 394
Rick LOPEZ, Petitioner-Appellant,
v.
STATE of Idaho, Respondent.
No. 15463.
Supreme Court of Idaho.
April 15, 1985.
Keith A. Zollinger, Pocatello, for petitioner-appellant.
Jim Jones, Atty. Gen., Lynn E. Thomas, Sol. Gen., Myrna A.I. Stahman, Deputy Atty. Gen., Boise, for respondent.

On Denial of Petition for Rehearing
1984 Opinion No. 170, issued December 21, 1984, is hereby withdrawn and this opinion is substituted therefore
HUNTLEY, Justice.
After entering a guilty plea to second degree kidnapping, I.C. § 18-4501(1) and admitting to being a persistent violator as defined in I.C. § 19-2514, Rick Lopez was sentenced on September 14, 1981, to an indeterminate term of fifteen (15) years imprisonment on the kidnapping charge and a separate life term of imprisonment for being a persistent violator. The sentences were to run concurrently with each other and with a sentence Mr. Lopez was already serving for voluntary manslaughter. Following pronouncement of sentence, *17 Mr. Lopez was immediately remanded to the custody of the Bannock County Sheriff.
On September 17, 1981, the trial judge entered an ex parte Amended and Corrected Minute Entry and Order and Order of Commitment which provided that Mr. Lopez was to be imprisoned for an indeterminate term not to exceed fifteen years, which sentence was to be enhanced by an additional indeterminate term of imprisonment for fifteen years pursuant to the persistent violator provisions of I.C. § 19-2514. The trial court acted sua sponte having realized that a persistent violator allegation does not constitute a separate offense for sentencing purposes but merely allows for enhancement.
Mr. Lopez petitioned for post-conviction relief, alleging that the sentence violated his due process rights under the state and federal constitutions, and also violated the state and federal constitutional prohibitions against double jeopardy. He also challenged that portion of the September 14, 1981 judgment which purported to impose a separate sentence for his being a persistent violator upon the basis that that sentence was illegal and in excess of the jurisdiction of the court.
The trial court denied the Petition for Post-Conviction Relief, the order reading:
[T]he sentence originally imposed could not be divided into part legal and part illegal and the sentence must be considered as a whole. Since the subsequent Order and sentence was merely an attempt by the court to correct the previously pronounced illegal sentence. [sic] There was and is authority under Rule 35 I.C.R. to proceed in this manner.
Furthermore, it does not appear that it was necessary for the defendant/petitioner to be present at the time of the correction of the sentence, he having been given full opportunity at the September 14, 1981 hearing to furnish information in mitigation and was not restricted in any way from doing so.
Mr. Lopez appeals from the denial of his post-conviction relief petition.
We first consider whether the sentence initially imposed by the trial court should be considered as lawful in part and unlawful in part, in which case the second sentence, increasing the time for the underlying felony would be disallowed;[1] or whether the entire sentence should be deemed illegal and, hence, subject to correction.[2]
I.C. § 19-2514 provides:
19-2514. Persistent violator  Sentence on third conviction for felony.  Any person convicted for the third time of the commission of a felony, whether the previous convictions were had within the state of Idaho or were had outside the state of Idaho, shall be considered a persistent violator of law, and on such third conviction shall be sentenced to a term in the custody of the state board of correction which term shall be for not less than five (5) years and said term may extend to life.
Clearly, I.C. § 19-2514 does not create a new crime, but instead provides for the imposition of greater punishment for the underlying conviction. State v. Greensweig, 102 Idaho 794, 641 P.2d 340 (Ct.App. 1982). Therefore, the trial court should not have imposed a separate sentence for the persistent violator allegation. This was not merely a clerical error, as the State claims, but was an error of law.
Mr. Lopez contends that the court's original sentence must be divided into two parts, resulting in a determination that the sentence for the underlying felony was lawful and that the sentence for the persistent violator provision was unlawful. He argues that even though the court may decrease or vacate the "unlawful provision" it may not increase the "lawful provision" of the sentence, since the "unlawful provision" does not render the entire sentence *18 unlawful and subject to correction. We reject this reasoning.
The State submits, and we agree, that the trial court properly considered the original sentence as a whole. Since the two provisions were clearly interdependent, the entire sentence was invalid ab initio.[3] Consequently, the trial court was obligated to make an appropriate correction.
We next consider whether Mr. Lopez was denied due process of law when the trial court corrected the illegal sentence outside defendant's presence. Mr. Lopez acknowledges that he was afforded all of his rights at the time of the initial, invalid sentencing on September 14, 1981. However, he was not present when the amended judgment of September 17, 1981 was imposed. He contends that the court's ex parte correction of the sentence violated his right to due process.
The State contests this point by observing that the corrected sentence was very similar to the original sentence and that the defendant had little, if anything, to gain by being present at the time the sentence was corrected. The State's argument misses the mark.
I.C. § 19-2503 provides:
19-2503. Presence of defendant.  For the purpose of judgment, if the conviction is for a felony, the defendant must be personally present; if for a misdemeanor, judgment may be pronounced in his absence.
I.C.R. 43(a) provides:
Rule 43. Presence of the defendant.  (a) Presence required. The defendant shall be present at the arraignment, at the time of the plea, at every stage of the trial including the impaneling of the jury and the return of the verdict, and at the imposition of sentence, except as otherwise provided by this rule.
The statute and rule establish that a defendant's presence at the time of sentencing is mandatory, not discretionary. State v. Creech, 105 Idaho 362, 670 P.2d 463 (1983). Since the original sentence was invalid, sentence was not imposed until the court corrected the judgment. Mr. Lopez should have been present at the second proceeding.
We remand to the trial court with instructions that it reimpose sentence at a proceeding at which the defendant is present.
DONALDSON, C.J., SHEPARD and BAKES, JJ., and OLIVER, J. Pro Tem., concur.
NOTES
[1]  Safrit v. Garrison, 623 F.2d 330 (4th Cir.1980); See, McFarland v. Hunt, 79 Idaho 262, 313 P.2d 1076 (1957).
[2]  I.C.R. 35.
[3]  See, United States v. Henry, 709 F.2d 298 at 310 (5th Cir.1983) wherein the court concluded that a "sentence," within the meaning of the rule allowing for a correction of an illegal sentence, is a specific penalty imposed for a specific statutory offense, and does not embrace the entire aggregate of prison terms imposed upon a defendant for a single criminal transaction viewed as a whole. Hence, even where separate counts may be deemed interdependent to the extent they comprise but one criminal transaction, the sentence for each count remains a separate sentence and where an unlawful sentence on one such count is vacated, the court may not increase the sentence already imposed on a remaining lawful count.

However, the same result does not obtain where two purported sentences are not separate but comprise one general sentence. Id. at 312. In the instant case, "sentences" were not imposed for separate counts but were imposed for a single offense and an enhancement. Despite the trial court's terminology, the "sentence" for the enhancement was not a "sentence" as defined in Henry. Instead, it was merely ancillary to the sentence for the underlying offense. Hence, the trial court upon recognizing its error, properly vacated the purported sentence initially imposed, and resentenced the defendant.
