
311 N.W.2d 525 (1981)
209 Neb. 766
STATE of Nebraska, Appellee,
v.
Mark W. PROSSER, Appellant.
Nos. 44006, 44007.
Supreme Court of Nebraska.
October 23, 1981.
*526 Richard G. Kopf of Cook & Kopf, P. C., Lexington, for appellant.
Paul L. Douglas, Atty. Gen., and Martel J. Bundy, Lincoln, for appellee.
Heard before KRIVOSHA, C. J., and BOSLAUGH, McCOWN, CLINTON, BRODKEY, WHITE, and HASTINGS, JJ.
WHITE, Justice.
The appellant, Mark W. Prosser, pursuant to a plea bargain, pleaded guilty to three counts contained in two informations: Count I, subjecting another person to sexual penetration and overcoming such person by threat of force, Neb.Rev.Stat. § 28-319 (Reissue 1979); count IV, use of a firearm to commit a felony, Neb.Rev.Stat. § 28-1205 (Reissue 1979); and escape from confinement while under arrest for a felony, Neb.Rev.Stat. § 28-912 (Reissue 1979). Sexual assault, a Class II felony, is punishable by a maximum of 50 years' imprisonment and a minimum of 1 year's imprisonment. Use of a firearm in the commission of a felony is a Class III felony and provides for a maximum penalty of 20 years' imprisonment or a $25,000 fine, or both, with a minimum of 1 year's imprisonment. Escape is also a Class III felony with the same penalties.
The court sentenced the appellant on the sexual assault charge to a minimum of 8 years and a maximum of 12 years in the Nebraska Penal and Correctional Complex, and awarded credit for 178 days spent in jail. The court sentenced the appellant to a minimum of 1 year and a maximum of 18 months on the commission of a felony with a firearm charge. This sentence was to be served consecutively to the sexual assault charge. On the escape charge, the court sentenced the appellant to 1 year's imprisonment to be served concurrently with the sexual assault charge. The court, after examination by court-appointed psychiatrists, determined that the appellant was a treatable, mentally disordered sex offender and ordered him confined in the Lincoln Regional Center. The appellant does not appeal from that finding.
*527 The appellant's assignments of error are: (1) The district judge failed to credit time spent by the appellant while involuntarily committed to a mental institution while awaiting trial; and (2) The district judge's sentences were excessive in light of the unanimous opinion of the medical experts that incarceration would neither protect the public nor serve the rehabilitative needs of the appellant.
Appellant was arrested for the crime of sexual assault on May 2, 1979, the same date as the date of the offense. He requested bail but it was not granted. While in custody, the appellant escaped by covering a plastic fork with aluminum foil and persuading the deputy sheriff that he had a knife. On the next day he voluntarily surrendered himself to his attorney. On May 21, 1979, the appellant was bound over to the District Court for trial. While awaiting trial in the District Court, the appellant was apparently examined by a psychiatrist retained by the State of Nebraska, and apparently pursuant to some plea negotiations which are reflected in the ultimate disposition of the case, the State of Nebraska commenced an action before the Dawson County Mental Health Board to have the appellant found to be a mentally ill dangerous person. After being found to be a mentally ill dangerous person, the appellant was committed to the River Oaks Psychiatric Hospital in New Orleans, Louisiana, and ordered to pay the costs of his treatment. The parents of the appellant were apparently financially able to afford such treatment. Appellant was a patient in the hospital from September 5, 1979, to May 28, 1980, when he left the hospital without permission. He was subsequently arrested in New Orleans, Louisiana, on or about October 30, 1980. He was returned to Dawson County, Nebraska. It is the period of September 5, 1979, to May 28, 1980, the time spent by the appellant in the psychiatric hospital in Louisiana, which is the basis for the first error claimed. The record is clear that the trial judge was aware of the time spent in the psychiatric hospital. He referred to it in his sentencing remarks and determined not to afford the appellant any credit for time spent in the hospital. Neb. Rev.Stat. § 83-1,106 (Reissue 1976) provides in part: "(1) Credit against the maximum term and any minimum term may be given to an offender for time spent in custody as a result of the criminal charge for which a prison sentence is imposed or as a result of the conduct on which such a charge is based. This shall specifically include, but shall not be limited to, time spent in custody prior to trial, during trial, pending sentence, pending the resolution of an appeal, and prior to delivery of the offender to the custody of the Department of Correctional Services." (Emphasis supplied.)
While there are no cases in Nebraska suggesting that credit for time spent in a mental hospital prior to sentence cannot be given, it seems from the clear wording of the statute that the court may consider time spent in a medical institution pursuant to a valid mental health commitment in determining credit for time to be applied against the sentence. We have further held that it is within the trial court's discretion whether to grant credit for time spent in jail prior to sentencing.
The appellant further cites our case of State v. Blazek, 199 Neb. 466, 259 N.W.2d 914 (1977), as authority for the proposition that it is an abuse of discretion not to give credit for time spent in custody while awaiting trial. The appellant misapprehends the holding in that case. While we did hold in syllabus No. 4 of Blazek that "Ordinarily a defendant should be given credit for time spent in jail prior to sentencing," the specific holding in that case is that where the maximum term of the sentence pronounced is the statutory maximum for the offense, credit for jail time must be given. The court suggested that constitutional difficulties might thereby arise whereby a defendant would be, in fact, in custody for a period longer than the statute authorized. The appellant was sentenced to a maximum possible term of 13½ years. If the maximum term was imposed and the sentence imposed was consecutive, the appellant could have received a term of 90 *528 years. Although the record is not totally clear on this subject, it can be inferred that the mental commitment was initiated, if not at the request of, at least with the willing cooperation of appellant and his parents who were apparently financially able to bear the rather extraordinary cost of the confinement. The confinement was ordered to be a minimum of 1 year in the River Oaks sanitarium. It is true from the reports which were received in evidence that appellant was making excellent progress in resolving what can only be charitably called severe mental problems. The appellant negated any such treatment and any long term effects of that treatment by going a.w.o.l. from the institution and concealing himself from the authorities for a period of nearly 6 months. The trial court did properly take into consideration the appellant's deliberate frustration of the purpose of the mental health commitment by removing himself from the hospital. We are unable to say that it was an abuse of discretion in so doing. Blazek, supra, does not command a different result. The appellant suggests that since this is a nonbailable offense, the failure to credit for the time spent in the mental hospital was a violation of appellant's equal protection and due process rights. He does not cite any authority that so directly holds. All cases on which the appellant relied, which will not be cited here, simply are cases in which a statute authorizes the court to grant such credit. As we have stated above, there is nothing within the Nebraska statutes that would prohibit such credit if the trial court determined to give it. The question here, however, is simply whether or not the trial court abused its discretion. We are unable to conclude that it did so. The assignment of error is without merit.
The second assignment of error is that the sentences are excessive and a violation of the rehabilitative needs of the appellant. There was testimony received from a psychiatrist that ultimate incarceration in the Nebraska Penal Complex would be harmful to the appellant and would undoubtedly render him more dangerous on discharge than he is admittedly at this time. Further psychiatric testimony indicates that the appellant is suffering from a mental disorder that makes him antagonistic toward women, unsure of them, and likely to take out his hostilities in violent sexual acts. All agree that the appellant must be confined and should not be allowed at liberty.
The offense for which the appellant pleaded guilty merits the sentence which the court imposed. The appellant accosted and stopped an automobile operated by a young female on a rural road near Lexington, Nebraska. He used a gun to force her from the automobile and discharged the gun either accidentally or purposefully, removed her to his own automobile, took her farther into the country, and there forcibly raped her twice. While awaiting trial on the charges, he escaped from custody and further escaped from a mental hospital to which the trial court and the State had ordered him committed. The trial court took into account, in weighing these matters, the seriousness of the offense, the dangerousness of the offender, and the prior extended misdemeanor record of the appellant. It then concluded that, both for the protection of society and in view of the seriousness of the crimes, the sentences imposed were appropriate. It is well established in this state, as to require no citations, that a sentence imposed within the limits of the statute will not be disturbed on appeal absent an abuse of discretion. We find no abuse of discretion.
The assignments of error of the appellant are without merit and the judgment and sentences are therefore affirmed.
AFFIRMED.
McCOWN and CLINTON, JJ., concur in result.
