
633 N.W.2d 163 (2001)
2001 ND 153
STATE of North Dakota, Plaintiff and Appellee,
v.
John BOUCK, Defendant and Appellant.
Nos. 20000346-20000348.
Supreme Court of North Dakota.
August 29, 2001.
*164 Lonnie Olson, State's Attorney, Devils Lake, ND, for plaintiff and appellee; submitted on brief.
Michael N. Steffan, Frith & Steffan, Devils Lake, ND, for defendant and appellant; submitted on brief.
KAPSNER, Justice.
[¶ 1] John Bouck appealed from a district court order finding Bouck guilty of two acts of contempt and imposing a punitive sanction of 30 days' imprisonment at the state penitentiary for each of the two contempts. We affirm the findings of contempt and the imposition of consecutive punitive sanctions. However, we hold the district court did not have authority to sentence Bouck to the state penitentiary for contempt, and we remand for imposition of the appropriate punitive sanction.

I
[¶ 2] John Bouck was charged with two counts of simple assault on a correctional officer and one count of contact of bodily fluids on an officer. All three counts are class C felonies. Counsel was appointed to represent Bouck, but at his trial on December 5, 2000, Bouck chose to represent himself with court-appointed counsel remaining in the courtroom on a "stand-by" basis. While questioning a witness on the second day of trial, Bouck lost his temper at the trial judge. Bouck approached the bench "in a loud yelling manner and using obscene language. He was shouting at [the] judge and then raised his hands in a fighting gesture." Bouck then "spit at the head of [the] judge, propelling both saliva and fragments of candy from his mouth onto papers located on the bench and also onto the face of [the] judge." The trial judge summarily found Bouck in contempt of court and sentenced him to 60 days' incarceration in the state penitentiary. Bouck was immediately removed from the courtroom and transported to the state penitentiary in Bismarck. The criminal trial continued with Bouck's court-appointed counsel representing Bouck in his absence. Bouck was subsequently convicted of one count of simple assault on a correctional officer and one count of contact of bodily fluids on an officer. After Bouck served 60 days at the penitentiary, sentence was imposed on the felony convictions.

II
[¶ 3] On appeal from the contempt convictions, Bouck asserts the district court abused its discretion by imposing two punitive sanctions of 30 days each for Bouck's conduct, which Bouck claims "appears to constitute one (1) act of short duration."
*165 [¶ 4] Under N.D.C.C. § 27-10-01.3(2), the court can summarily impose a punitive sanction "upon a person who commits contempt of court in the actual presence of the court." The judge can immediately impose a punitive sanction to preserve order and protect the authority and dignity of the court. Pounders v. Watson, 521 U.S. 982, 987-88, 117 S.Ct. 2359, 138 L.Ed.2d 976 (1997); Endersbe v. Endersbe, 555 N.W.2d 580, 583 (N.D. 1996). Under N.D.C.C. § 27-10-01.4(2)(b), the court may impose "for each separate contempt of court a fine of not more than five hundred dollars, imprisonment in the county jail for not more than thirty days, or both."
[¶ 5] Conduct constituting contempt of court includes "[i]ntentional misconduct in the presence of the court which interferes with the court proceeding or with the administration of justice, or which impairs the respect due the court." N.D.C.C. § 27-10-01.1(1)(a). The court can punish disrespectful behavior as contempt and can impose a punitive sanction immediately for the purpose of preserving order in the court and protecting the authority and dignity of the court. State v. Zahn, 1997 ND 65, ¶¶ 10, 14, 562 N.W.2d 737. The ultimate determination of whether a contempt has been committed is within the trial court's sound discretion and will not be overturned on appeal unless there is a plain abuse of discretion. City of Grand Forks v. Dohman, 552 N.W.2d 69, 70 (N.D.1996).
[¶ 6] The district court found Bouck committed two separate acts of contempt. The court found Bouck committed an act of contempt when he approached the bench shouting obscene language at the judge and raising his hands in a fighting gesture. The court also found Bouck committed an act of contempt when he spit at the judge, thereby propelling saliva and fragments of candy from his mouth onto the judge's face and onto papers located on the bench. We conclude the trial court's findings that Bouck committed two separate acts of contempt against the authority and dignity of the court did not constitute an abuse of discretion by the court. We further conclude the trial court acted within its discretion in sentencing Bouck to 30-day sentences of imprisonment on each of the two acts of contempt.

III
[¶ 7] Bouck asserts the district court erred in sentencing him to incarceration with the department of corrections at the state penitentiary as a sanction for contempt.
[¶ 8] Section 27-10-01.4(2)(b), N.D.C.C. specifically authorizes the court, to impose "imprisonment in the county jail for not more than thirty days." The statute does not authorize incarceration with the department of corrections or the state penitentiary.
[¶ 9] Confinement to a county jail is considered "less penal" than incarceration in the state penitentiary. State v. Farrell, 214 N.W.2d 503, 506 (N.D.1973). When the law prescribes a place of imprisonment the court cannot direct a different place and, if it does, the sentence is void. In Davis v. Riedman, 114 N.W.2d 881, 884, 885 (N.D.1962) this Court stated:
Where the law prescribes a place for imprisonment, the court may not direct a different place, and if the court does so, the sentence is void and the prisoner is entitled to relief by habeas corpus, but an order for discharge is ordinarily withheld and an order made for the transfer of the prisoner to the proper prison or an opportunity given for the correction of the sentence by the trial court which imposed it.
As N.D.C.C. § 27-10-01.4(2)(b) prescribes the county jail as the place for incarceration for acts of contempt, the district court *166 was without authority to sentence Bouck directly to the penitentiary or to the department of corrections.[1]
[¶ 10] The trial court stated it did not sentence Bouck to the county jail "because of past problems when the defendant was housed at this jail." However, the court did not specify the nature of the problems nor discuss whether the problems could be resolved at the county jail so Bouck could be incarcerated there. Notwithstanding the potential problems, the court's sentencing authority under the contempt statute does not include incarceration at the state penitentiary, and the court erred in sentencing Bouck to serve time there.[2]

IV
[¶ 11] Bouck asserts the district court erred in not allowing him credit for the time he served on the contempt sanctions toward his sentence of incarceration on the two class C felonies for which Bouck was subsequently convicted.
The relevant statute, N.D.C.C. § 12.1-32-02(2), provides:
Credit against any sentence to a term of imprisonment must be given by the court to a defendant for all time spent in custody as a result of the criminal charge for which the sentence was imposed or as a result of the conduct on which such charge was based.
[¶ 12] This statutory provision does not authorize Bouck to receive credit against the felony sentences for prison time served on the contempt sanctions. Bouck's imprisonment for his acts of contempt is separate from and unrelated to the felony criminal charges, or the conduct on which those charges were based, and for which he was subsequently convicted and sentenced to prison. Consequently, N.D.C.C. § 12.1-32-02(2), does not apply and does not authorize Bouck to receive credit for his prison time served on the contempt convictions against his sentences on the felony convictions. State v. Sorensen, 482 N.W.2d 596, 598 (N.D.1992).

V
[¶ 13] We reverse the court's imposition of sentence on the contempts and remand for imposition of an appropriate punitive sanction. The court, upon resentencing Bouck, must credit Bouck toward any sanction of incarceration with time he served at the state penitentiary on the prior invalid contempt sanction.
[¶ 14] Affirmed in part, reversed in part, and remanded.
[¶ 15] GERALD W. VANDEWALLE, C.J., and MARY MUEHLEN MARING, WILLIAM A. NEUMANN, DALE V. SANDSTROM, JJ., concur.
NOTES
[1]  Specification of the county jail as the place for imprisonment for contempt sanctions under N.D.C.C. § 27-10-01.4(2)(b) is consistent with our general sentencing statutes. An offense for which the maximum penalty is 30 days' imprisonment is classified a class B misdemeanor under N.D.C.C. § 12.1-32-01(6). While a person convicted of a felony or a class A misdemeanor can be sentenced to "a state correctional facility" under N.D.C.C. § 12.1-32-02(1)(c)(1), a person convicted of a class B misdemeanor can only be sentenced to "a county jail or in a regional corrections center" under N.D.C.C. §§ 12.1-32-02(1)(c)(2).
[2]  The legislature has authorized cities and counties to contract with other correctional facilities to confine inmates when necessary for purposes of safety, security, health and medical reasons, or for correctional facility administration. N.D.C.C. § 12-44.1-02. However, the penitentiary is not included in the definition of correctional facilities under the statute with whom the cities and counties can contract. N.D.C.C. § 12-44.1-01(2).
