Defendant appeals from the entry of separate convictions and sentences after a trial on stipulated facts in which he was found guilty of attempted assault, ORS 163.185; ORS 161.405, and possession of a weapon by an inmate. ORS 166.275. We affirm.
Defendant first argues that the trial court erred in refusing to merge his convictions. ORS 161.062(1)1 and ORS 161.0672 establish when convictions merge. Defendant concedes that, normally, the convictions here would not merge, because attempted assault and possession of a weapon by an inmate do not require proof of identical elements. However, he contends that, because of the unusual facts and the wording of the indictment, merger is appropriate.
The indictment alleged that defendant, “confined in the Oregon State Penitentiary,” attempted to cause physical injury to a corrections officer by stabbing him with a homemade knife. Defendant argues that, in order to prove the attempted assault, the state had to prove that he possessed a dangerous weapon. Proof of that fact would constitute proof of possession of a weapon by an inmate because of his status as an inmate. Thus, defendant argues, this case constitutes a situation where the completion of one offense, the assault, necessarily includes commission of the acts sufficient to constitute the other offense, possession of a weapon by an inmate.
We disagree. The elements of proof of a criminal offense are controlled by the statute defining the offense, not by the factual circumstances recited in the indictment. Under ORS 161.062(1) and ORS 161.067, offenses cannot be merged if proof of one offense requires proof of an element that the other does not. Here, the only element shared by both offenses is possession of a dangerous weapon.
*51The state must prove that defendant is an inmate in order for him to be found guilty of the offense of possession of a weapon by an inmate. In turn, attempted assault does not require proof that defendant is an inmate. The court did not err in refusing to merge the convictions.
We also disagree with defendant that the trial court erred in ordering his sentence for possession of a weapon to run consecutively to his sentence for attempted assault. ORS 137.123(4)3 allows the court to impose consecutive terms for separate convictions when
“(a) * * * the criminal offense for which a consecutive sentence is contemplated was not merely an incidental violation of a separate statutory provision in the course of the commission of a more serious crime but rather was an indication of defendant’s willingness to commit more than one criminal offense; or
“(b) The criminal offense for which a consecutive sentence is contemplated caused or created a risk of causing greater or qualitatively different loss, injury or harm to the victim or caused or created a risk of causing loss, injury, or harm to a different victim than was caused or threatened by the other offense or offenses committed during a continuous and uninterrupted course or conduct.”
The facts show that the requirements of both subsections were met. Stabbing a person in the chest is not “incidental” to possessing a weapon, and the stabbing indicates that defendant was willing to commit an offense beyond the possession of the weapon. Furthermore, an inmate in possession of a weapon creates risks of qualitatively different harms and risks to different victims from these present in the offense of attempted assault. Possession of a weapon in an institution creates its own problems, and the legislature has responded by making it a crime with a potential punishment of 20 years imprisonment. A conviction for attempted assault carries a potential 10-year term of imprisonment. The prohibition against inmates possessing weapons was enacted to deter conduct different from assault: possession of weapons in penal *52institutions. The sentences were imposed in conformity with the statute.
Affirmed.