
371 N.W.2d 317 (1985)
220 Neb. 666
STATE of Nebraska, Appellee,
v.
Michael J. KNIGHT, Appellant.
No. 85-107.
Supreme Court of Nebraska.
August 2, 1985.
*318 Maurice A. Green of Burger, Bennett & Green, P.C., McCook, for appellant.
Robert M. Spire, Attorney General, and Terry R. Schaaf, Lincoln, for appellee.
KRIVOSHA, C.J., and BOSLAUGH, WHITE, HASTINGS, CAPORALE, SHANAHAN, and GRANT, JJ.
PER CURIAM.
Pursuant to a plea bargain, defendant pled no contest to the crimes of intentionally causing bodily injury with a dangerous instrument to his wife (a second degree assault in violation of Neb.Rev.Stat. § 28-309 (Cum.Supp.1984) and a Class IV felony with a possible penalty of zero to 5 years in the penal complex) and using a firearm in commission of a felony (a Class III felony with a penalty of 1 to 20 years, consecutive to the underlying felony). A charge of attempted murder was dismissed.
Defendant was sentenced to 18 months to 3 years on the Class IV felony and to 2 to 5 years on the Class III felony, to be served consecutively to the Class IV felony sentence. The sentencing court did not give defendant any credit for 151 days spent in the county jail while awaiting sentence.
Defendant appeals, alleging that the sentences are excessive and that the court erred in failing to give him credit for time served.
Insofar as defendant contends his sentences were excessive, his appeal is without merit. During a fight with his wife, defendant fired a shot at his wife at close range, and the gun jammed before he fired another. The sentences were not excessive.
*319 Defendant's other point on appeal has merit. As stated above, the trial court sentenced defendant to 18 months to 3 years in the penal complex, with no credit for time served. At the time of the sentencing, defendant had been in jail 151 days, or approximately 5 months. We have held that allowing credit for jail time is discretionary with the sentencing court. State v. Tweedy, 196 Neb. 246, 242 N.W.2d 626 (1976).
We adhere to that general rule, but now hold that the court's discretion in withholding credit for jail time cannot be used to impose sentences in violation of Neb.Rev.Stat. § 83-1, 105(1) (Reissue 1981). That statute requires that in imposing an indeterminate sentence "the minimum limit fixed by the court shall not be... more than one-third of the maximum term...." The maximum term for a Class IV felony is 5 years. One-third of that period is 20 months. Defendant was sentenced to 18 months to 3 years. When the approximately 5-month period that defendant was in jail is added to the 18-month sentence, defendant is serving a minimum of 23 monthsan amount in excess of the statutory minimum.
The cause is remanded to the sentencing court for the imposition of a proper sentence. The trial court is directed to impose a sentence containing a minimum sentence, including time served while awaiting sentence, not greater than one-third of the possible maximum.
REMANDED.
