
596 P.2d 847 (1979)
Guadalupe GRIFALDO, Petitioner,
v.
STATE of Montana, Respondent.
Steven R. VANDERBECK, Petitioner,
v.
STATE of Montana, Respondent.
Nos. 14778, 14779.
Supreme Court of Montana.
Submitted on Briefs June 15, 1979.
Decided July 3, 1979.
Francis J. Conte, Missoula, for petitioner.
Mike Greely, Atty. Gen., Helena, Harold Hanser, County Attorney, Billings, for respondent.
SHEA, Justice.
These consolidated cases come before this Court on petition for postconviction relief. Petitioners Grifaldo and Vanderbeck each claim that he is entitled to designation as a "nondangerous offender for purposes of parole eligibility" under the mandatory provisions of section 95-2206.16(1), R.C.M. 1947, now section 46-18-404(1) MCA. Designation as a nondangerous offender enables a prisoner to be eligible for parole after he has served one-quarter of his sentence.
Grifaldo was charged with robbery, allegedly committed on August 20, 1977. Grifaldo pleaded guilty, and on October 27, 1977, was sentenced by the Yellowstone County District Court to fifteen years in prison. Vanderbeck was convicted by jury verdict in the Yellowstone County District Court of aggravated assault and unlawful restraint, allegedly committed on June 22, 1978. On November 1, 1978, Vanderbeck was sentenced to eight years for aggravated assault and six months for unlawful restraint, sentences to run concurrently.
During the five years preceding commission of their offenses, neither Grifaldo nor Vanderbeck was convicted of, or incarcerated for, an offense for which a sentence in excess of one year could have been imposed. However, neither Grifaldo nor Vanderbeck was designated a nondangerous offender for purposes of parole eligibility.
On March 2, 1979, at the request of the Montana Department of Institutions, the Montana Attorney General issued an opinion relating to parole eligibility of prisoners. 38 Atty.Gen.Op. No. 10. In pertinent part, the Attorney General held that a prisoner serving a time sentence who was not expressly designated "nondangerous" in connection with a crime committed after July 1, 1977, is ineligible for parole until he has served one-half of his sentence, less good time. As a result, petitioners were classified as ineligible for parole until one-half of their sentences are served.
Parole eligibility is governed by section 95-3214(1), R.C.M. 1947, now section 46-23-201(1) MCA, which provides:

*848 "... Subject to the following restrictions, the board shall release on parole by appropriate order any person confined in the Montana state prison, except persons under sentence of death and persons serving sentences imposed under 95-2206(3)(b), when in its opinion there is reasonable probability that the prisoner can be released without detriment to himself or to the community:
"(a) No convict serving a time sentence may be paroled until he has served at least one-half of his full term, less the good time allowance provided for in 80-1905; except that a convict designated as a nondangerous offender under 95-2206.16 may be paroled after he has served one-quarter of his full term, less the good time allowance provided for in 80-1905. Any offender serving a time sentence may be paroled after he has served, upon his term of sentence, 17 1/2 years.
"(b) No convict serving a life sentence may be paroled until he has served 30 years, less the good time allowance provided for in 80-1905." (Emphasis added.)
Petitioners contend that they are entitled to designation as nondangerous offenders under section 95-2206.16(1), R.C.M. 1947, now section 46-18-404(1) MCA, which provides:
"... The sentencing court shall designate an offender a nondangerous offender for purposes of eligibility for parole under 95-3214 if:
"(a) during the 5 years preceding the commission of the offense for which the offender is being sentenced, the offender was neither convicted of nor incarcerated for an offense committed in this state or any other jurisdiction for which a sentence to a term of imprisonment in excess of 1 year could have been imposed; or "(b) the court has determined, based on any presentence report and the evidence presented at the trial and the sentencing hearing, that the offender does not represent a substantial danger to other persons or society." (Emphasis added.)
The State concedes that under the mandatory language of the above statute petitioners are entitled to designation as nondangerous offenders. The State argues, however, that in declining to do so, the sentencing courts impliedly determined that each petitioner represented a "substantial danger to other persons or society" under subsection (b). The State therefore urges that we remand these cases to the sentencing courts for determination of whether each petitioners parole eligibility should be limited pursuant to section 95-2206(3)(b), R.C.M. 1947, now section 46-18-202(2) MCA, up to one-half of their sentences.
Section 95-2206(3)(b) permits the sentencing court to impose the restriction that a defendant be ineligible for parole for the full term of his sentence, not just half of it. It states:
"... Whenever the district court imposes a sentence of imprisonment in the state prison for a term exceeding 1 year, the court may also impose the restriction that the defendant be ineligible for parole and participation in the prisoner furlough program while serving his term. If such a restriction is to be imposed, the court shall state the reasons for it in writing. If the court finds that the restriction is necessary for the protection of society, it shall impose the restriction as part of the sentence and the judgment shall contain a statement of the reasons for the restriction." (Emphasis added.)
Under this provision, the sentencing court "may" impose the restriction of parole ineligibility, but in so doing, it must ("shall") state reasons for the restriction in writing. We can no more adopt the implication urged by the State  that failure or refusal to designate petitioners as nondangerous offenders constituted a determination of their dangerousness  than we can imply that failure to invoke section 95-2206(3)(b) constituted a determination that restrictions on petitioners' parole eligibility were inappropriate.
Section 95-2206.16(1), R.C.M. 1947, now section 46-18-404(1) MCA, clearly provides that the sentencing court "shall" designate an offender a nondangerous offender if either *849 of the conditions of subsection (a) "or" (b) are met. This statute governed the District Court's conduct in sentencing petitioners Grifaldo and Vanderbeck. Both Grifaldo and Vanderbeck satisfied the condition specified in subsection (a), and therefore, the sentencing courts erred in failing to designate them as nondangerous offenders.
The cases are remanded to the sentencing courts with directions to designate the petitioners as nondangerous offenders for purposes of parole eligibility.
HASWELL, C.J., and DALY, HARRISON and SHEEHY, JJ., concur.
