delivered the opinion of the court:
The defendant was convicted in the circuit court of *136Cook County of the offenses of armed robbery, robbery and unlawful use of weapons. He was sentenced to serve concurrent terms in the penitentiary of not less than 5 years nor more than 15 years for the offense of armed robbery and not less than 5 years nor more than 10 years for unlawful use of weapons. The appellate court reversed the convictions and remanded the cause for new trials, holding that the armed robbery charge and the unlawful use of weapons charge must be tried separately. (People v. Edwards (1975), 28 Ill. App. 3d 647.) We have granted the State leave to appeal from the decision of the appellate court.
The defendant was charged in a three-count indictment with the offense of armed robbery and with two offenses of unlawful use of weapons. Count II of the indictment alleged the commission of a Class A misdemeanor, the offense of unlawful use of weapons in violation of section 24 — 1(a)(2) of the Criminal Code of 1961 (Ill. Rev. Stat. 1973, ch. 38, par. 24-l(a)(2)). Count III alleged the commission of a Class 3 felony, the offense of unlawful use of weapons in violation of section 24 — 1(b) of the Criminal Code of 1961 (Ill. Rev. Stat. 1973, ch. 38, par. 24 — 1(b)). The two weapons charges were based on the same incident and upon possession of the same weapon, a knife. Section 24 — 1(b) provides that a person commits a Class 3 felony if he violates section 24 — 1(a) and if he has been convicted of a felony within 5 years of the violation or if he is a convicted felon who has been released from the penitentiary within 5 years of the violation. Count III of the indictment alleged that the defendant had previously been convicted in the State of Illinois of the offense of burglary and had been released from the penitentiary within 5 years of the violation.
Prior to trial the defendant filed a written motion to dismiss count III of the indictment, alleging that the enhanced penalty section of the statute was arbitrary and unreasonable. Defense counsel orally requested that the *137court not read to the jury the portion of the indictment alleging that the defendant had been convicted of the offense of burglary. After the court indicated that the entire indictment would be read to the jury, defense counsel orally moved that the third count of the indictment be adjudicated in a proceeding separate from the jury trial on the first and second counts. He argued that since the trial of count III would include evidence that the defendant had previously been convicted of a burglary, the defendant would be prejudiced in his trial on the other counts.
Prior to the commencement of voir dire the trial judge read the entire indictment to the prospective jurors. Defense counsel again objected to the reading of count III.
At the conclusion of the State’s case-in-chief a stipulation of the parties was read to the jury which stated that the defendant had been convicted of burglary in 1968, that he had been sentenced to the penitentiary for a minimum of 1 and a maximum of 10 years and that he had been released from the penitentiary on September 7, 1971. After several witnesses testified for the defense, the defendant testified in his own behalf. He was questioned by his own attorney and by the prosecutor about his prior burglary conviction.
The jury was instructed by the trial court that the indictment was not evidence against the defendant but was merely a formal accusation. The jury was further instructed that evidence of the defendant’s prior conviction was to be considered solely in determining the defendant’s credibility as a witness and not as evidence of the defendant’s guilt. The jury was instructed concerning the elements of the offenses of armed robbery, robbery and unlawful use of a weapon pursuant to section 24 — 1(a)(2). No instructions were submitted concerning felonious unlawful use of a weapon under section 24 — 1(b). The jury returned verdicts finding the defendant guilty of armed *138robbery, robbery and unlawful use of a weapon. A judgment was subsequently entered finding the defendant guilty of armed robbery and the felonious unlawful use of a weapon.
The appellate court held that the trial court abused its discretion in failing to grant a severance to the defendant so that the armed robbery count would be tried separately from the other charges. The court reasoned that the pleading and proof that the defendant had previously been convicted of a felony had no probative value as to the charge of armed robbery but was likely to prejudice the defendant in his defense of that charge.
Whether the defendant’s prior burglary conviction was relevant and admissible as to the charge of felonious unlawful use of a weapon is not an issue in this appeal. It is settled that the State must allege and prove a prior conviction to establish the commission of felonious unlawful use of a weapon. (People v. Ostrand (1966), 35 Ill.2d 520.) The issue is whether the court erred in denying a severance to the defendant.
The case upon which the State relies is Spencer v. Texas (1967), 385 U.S. 554, 17 L. Ed. 2d 606, 87 S. Ct. 648. At issue in Spencer was the constitutionality of the enhanced penalty provisions used in the State of Texas. The Texas statute provided that a person who is convicted of a noncapital felony three times shall be imprisoned for life upon the third conviction. A person who was convicted of a capital offense for the second time was to receive not less than life imprisonment upon the second conviction. The statute also provided that a person convicted of a noncapital felony shall be given the most severe sentence possible for that felony if he had been previously convicted of the same or a similar offense. In Spencer the United States Supreme Court considered three cases. One of the defendants had been convicted of a felony for the third time and was sentenced to life imprisonment. A second defendant was convicted of *139murder with malice for the second time and was sentenced to death. The third defendant was found guilty of robbery after having previously been found guilty of bank robbery, and he was also sentenced to imprisonment for life. In each case the State alleged the prior convictions in the indictments and introduced proof of the prior convictions during the jury trials. The juries were instructed that evidence of prior convictions was not to be used in determining the guilt or innocence of the defendants. The defendants contended on appeal that the Texas procedure was so unfair as to deny them fair trials in violation of the due process clause of the United States Constitution. The Supreme Court rejected the argument and affirmed the convictions. The court admitted that a defendant could be prejudiced by the fact that a jury is informed of his prior convictions but noted that juries are expected to follow limiting instructions and that the State has a valid interest in trying different crimes against the same person in the same trial.
The appellate court found that Spencer was distinguishable from the case at bar and thus not applicable. The distinction seen by the appellate court was that only a single primary charge gave rise to the enhanced penalty provisions in Spencer whereas the defendant in this case was charged in a three-count indictment. We must disagree with this portion of the appellate court’s opinion. The procedures condoned in Spencer have the potential to prejudice a defendant in the same manner as the procedure in the instant case. The fact that the defendant in the instant case was charged with more than one primary offense is not a significant distinction. We therefore conclude that the defendant was not denied due process and that he is not entitled to a reversal of his convictions as a matter of constitutional law.
It does not follow, however, that we will reverse the decision of the appellate court. We share the appellate court’s concern that the procedure used in this case *140involves a significant risk that the trier of fact will use evidence of a prior conviction in determining the defendant’s guilt or innocence of an unrelated offense. The procedure could have easily been avoided in the instant case. The State does have an interest in its pursuit of judicial economy in prosecuting all charges against one defendant in one trial, but that interest is not so strong as to justify the denial of a severance in the instant case. We find that the joinder of the armed robbery and the felonious unlawful use of a weapon charges created such a strong possibility that the defendant would be prejudiced in his defense of the armed robbery charge that it was an abuse of the trial court’s discretion to deny a severance. We therefore affirm the decision of the appellate court reversing the conviction for armed robbery.
The trial court’s failure to grant a severance of the charges does not necessarily require reversal of the felonious unlawful use of a weapon conviction. We find, however, that that conviction must be reversed for another reason. As we have previously stated, an element of the offense which must be proved by the State is that the defendant was convicted of a felony or was released from the penitentiary within the last 5 years. Evidence of the defendant’s prior conviction was presented to the jury, but the jury was instructed to consider that evidence only to the extent that it may affect the credibility of the defendant. If the jury followed that instruction, it could not have made the determination that all elements of the charge of felonious unlawful use of a weapon had been proved. The jury received an instruction concerning the elements of the offense of unlawful use of a weapon pursuant to section 24 — 1(a)(2) of the Criminal Code of 1961 (Ill. Rev. Stat. 1973, ch. 38, par. 24-l(a)(2)). The jury then signed a verdict form stating that they found the defendant guilty of the charge of unlawful use of a weapon. We must conclude that the jury did not find the defendant guilty of felonious unlawful use of a weapon, *141and it was error for a judgment of conviction of that offense to be entered.
For the foregoing reasons we affirm the judgment of the appellate court reversing the defendant’s convictions for armed robbery and robbery, and the cause is remanded for a new trial on count I of the indictment. The conviction for unlawful use of a weapon is affirmed and the cause remanded for imposition of a proper sentence on that charge. Since no verdict was returned by the jury as to count III, such charge is dismissed.
Affirmed in part and reversed in part and remanded, with directions.