
675 P.2d 426 (1983)
100 N.M. 694
STATE of New Mexico, Plaintiff-Appellee,
v.
Rodney SINYARD, Defendant-Appellant.
No. 7179.
Court of Appeals of New Mexico.
December 20, 1983.
Certiorari Denied January 18, 1984.
*427 Paul Bardacke, Atty. Gen., William McEuen, Asst. Atty. Gen., Santa Fe, for plaintiff-appellee.
Janet Clow, Chief Public Defender, J. Thomas Sullivan, Appellate Defender, Santa Fe, for defendant-appellant.

OPINION
NEAL, Judge.
Convicted of larceny over $100.00, contrary to NMSA 1978, § 30-16-1 (Cum. Supp. 1983), defendant appeals contending that after his sentence was partially suspended the trial court could not impose probation. Although not raised below or in the docketing statement his claim that the sentence is unauthorized by statute is jurisdictional and may be raised for the first time on appeal. NMSA 1978, Crim., Child. Ct., Dom.Rel. & W/C App.R. 308 (Repl. Pamp. 1983); see State v. McNeece, 82 N.M. 345, 481 P.2d 707 (Ct.App. 1971). We hold that the trial court could properly impose probation and affirm.
Following his conviction defendant was sentenced to the statutory 18 months plus one year of parole. NMSA 1978, §§ 31-18-15(A)(4) and (C) (Repl.Pamp. 1981); 30-16-1 and 31-21-10(C) (Cum.Supp. 1983). The defendant was ordered to serve 364 days in the Lea County jail and the remainder of the sentence was suspended. After release defendant was to be placed on probation *428 for six months. He challenges the trial court's authority to place him on probation.
The relevant statutory sections, NMSA 1978, §§ 31-20-3 and 31-20-5 (Repl.Pamp. 1981), are as follows:
31-20-3. Order deferring or suspending sentence; diagnostic commitment.
Upon entry of a judgment of conviction of any crime not constituting a capital or first degree felony, any court having jurisdiction when it is satisfied that the ends of justice and the best interest of the public as well as the defendant will be served thereby, may either:
A. enter an order deferring the imposition of sentence;
B. sentence the defendant and enter an order suspending in whole or in part the execution of the sentence; or
C. commit the convicted person to the department of corrections [corrections department] for up to sixty days for purposes of diagnosis, with direction that the court be given a report as to what disposition appears best when the interest of the public and the individual are evaluated.
31-20-5. Placing defendant on probation.
When a person has been convicted of a crime for which a sentence of imprisonment is authorized, and when the district court has deferred or suspended sentence, it shall order the defendant to be placed on probation for all or some portion of the period of deferment or suspension if the defendant is in need of supervision, guidance or direction that is feasible for the probation service to furnish; provided, however, the total period of probation shall not exceed five years.
Defendant's argument is that Section 31-20-5 does not expressly address partially suspended sentences and therefore the statute does not authorize his probation.
The trial court's authority to sentence is only that which has been provided by statute. State v. Mabry, 96 N.M. 317, 630 P.2d 269 (1981); State v. Hovey, 87 N.M. 398, 534 P.2d 777 (Ct.App. 1975). Once a judgment of conviction has been entered a court has four options under the sentencing statutes. It may sentence the defendant and execute the sentence, committing him to prison, NMSA 1978, § 31-20-2 (Repl.Pamp. 1981), or it may act pursuant to any one of the three options in § 31-20-3. State v. Kenneman, 98 N.M. 794, 653 P.2d 170 (Ct.App.), cert. denied, 99 N.M. 47, 653 P.2d 878 (1982); State v. Garcia, 99 N.M. 466, 659 P.2d 918 (Ct.App. 1983). The sentencing alternatives are within the discretion of the trial court. State v. Madrigal, 85 N.M. 496, 513 P.2d 1278 (Ct.App.), cert. denied, 85 N.M. 483, 513 P.2d 1265 (1973).
The suspension of a sentence is a matter of clemency committed to the discretion of the trial court. Ewing v. State, 80 N.M. 558, 458 P.2d 810 (Ct.App. 1969). Probation assumes that the offender can be rehabilitated without serving that portion of the sentence which is suspended, State v. Baca, 90 N.M. 280, 562 P.2d 841 (Ct.App. 1977), and is a form of conditional liberty. State v. Chavez, 94 N.M. 102, 607 P.2d 640 (Ct.App.), cert. denied, 94 N.M. 629, 614 P.2d 546 (1979). It is clear that while probation is not automatic once sentencing is deferred or a sentence suspended, § 31-20-5, State v. Soria, 82 N.M. 509, 484 P.2d 351 (Ct.App. 1971), there can be no probation without sentence deferral or a suspended sentence. State v. Nolan, 93 N.M. 472, 601 P.2d 442 (Ct.App.), cert. denied, 93 N.M. 683, 604 P.2d 821 (1979).
Defendant calls upon this Court to construe § 31-20-5 to prohibit probation when a sentence is partially suspended. The first rule of statutory construction is that the courts must ascertain and give effect to the Legislature's intentions. Legislative intent is to be determined primarily from the language used in the statute as a whole. When the words used are free from ambiguity and doubt, no other means of interpretation should be resorted to. Arnold v. State, 94 N.M. 381, 610 P.2d 1210 (1980). There has been no argument, and we do not believe that either section is ambiguous in itself. Another well-established *429 principle of statutory construction is that the statute must be read as a whole. Each section or part should be construed in connection with every other part or section so as to produce a harmonious whole, State v. Scarborough, 78 N.M. 132, 429 P.2d 330 (1967), and the court is to give effect to all provisions of a statute and to reconcile different provisions so as to make them consistent. Mathieson v. Hubler, 92 N.M. 381, 588 P.2d 1056 (Ct.App.), cert. denied, 92 N.M. 353, 588 P.2d 554 (1978).
Read in their entirety, the sentencing statutes evidence a legislative intent that the trial court have a wide variety of options by which to sentence. For example, Section 31-20-5 allows for the probation option if the necessary supervision can be provided for the defendant by the probation services. NMSA 1978, Section 31-20-6 (Cum.Supp. 1983), allows the court to tailor probation conditions to the offense and to the probationer's individual rehabilitative needs. In the same way, NMSA 1978, § 31-17-1 (Repl.Pamp. 1981), specifically provides for restitution plans which take into consideration the offender's circumstances. Under Section 31-20-3 the court may defer imposition of the sentence, sentence the defendant and either partially or wholly suspend execution of the sentence, or commit the defendant for up to 60 days for a diagnostic evaluation. Once a sentence has been suspended or deferred, Section 31-20-5 provides that the defendant may be placed on probation for all or some portion of the period of deferment or suspension if the probation services can provide for the defendant's needs. When the execution of a sentence is to be partially suspended, the remainder of the sentence is to be executed. Construing both Sections 31-20-3 and 30-20-5 together, it is clear that a sentencing judge has the authority to suspend a sentence in part and then order probation for all or some of the portion which is suspended. We believe that this construction represents the primary expression of the intent of the Legislature. State v. Ellenberger, 96 N.M. 287, 629 P.2d 1216 (1981). Except where specifically prohibited by statute, see, e.g. NMSA 1978, § 31-18-17 (Cum.Supp. 1983) (habitual offender enhancements may not be suspended or deferred), the sentencing judge is afforded broad discretion in fashioning sentences appropriate to the offense and the offender.
We have reviewed defendant's other arguments and find them unpersuasive.
Defendant's sentence is affirmed.
IT IS SO ORDERED.
WALTERS, C.J., and DONNELLY, J., concur.
