
105 N.J. 399 (1987)
522 A.2d 423
STATE OF NEW JERSEY, PLAINTIFF-APPELLANT,
v.
PATRICK RONALD O'CONNOR, DEFENDANT-RESPONDENT.[*]
The Supreme Court of New Jersey.
Argued October 7, 1986.
Decided March 24, 1987.
*401 Abraham J. Chasnoff, Assistant Prosecutor, argued the cause for appellant (Alan A. Rockoff, Middlesex County Prosecutor, attorney).
Jane E. Haburay, Assistant Deputy Public Defender, argued the cause for respondent (Alfred A. Slocum, Public Defender, attorney).
Leslie F. Schwartz, Deputy Attorney General, argued the cause for amicus curiae Attorney General of New Jersey (W. Cary Edwards, Attorney General, attorney).
The opinion of the Court was delivered by STEIN, J.
In this case, and in State v. Hartye, 105 N.J. 411 (1987), which we also decide today, we are called on to determine the proper relationship between a term of imprisonment imposed as a condition of probation, N.J.S.A. 2C:43-2b(2), and the presumptions *402 of incarceration contained in N.J.S.A. 2C:44-1d and -1e. Specifically, the issue in this case is whether the "split sentence" authorized by N.J.S.A. 2C:43-2b(2) may be imposed on a defendant who has pled guilty to a second-degree offense, which normally carries a presumption of imprisonment. Because we conclude that such a sentence is invalid under our Code of Criminal Justice, we reverse the judgment of the Appellate Division, and remand the matter to the trial court for disposition in accordance with this opinion.

I
This case arises out of defendant's plea of guilty to a charge of aggravated arson, a second-degree offense under N.J.S.A. 2C:17-1a. Defendant's indictment on this charge was the result of an incident that occurred in November 1984, when he set fire to his employer's place of business. In the plea agreement, the State agreed to recommend that defendant "be sentenced as a 3rd degree offender, if custodial not to exceed 4 years, court to set amount of restitution."
At the sentencing hearing, the court sentenced defendant to a three-year probationary term. Additionally, he was required to serve fifteen consecutive weekends in the Middlesex County Adult Correction Center, and to make restitution to his former employer in the amount of $5,000. In the event defendant failed to make restitution within three years, the period of probation was to be extended for two years.[1]
In its statement of reasons, the court found as aggravating factors the nature of the offense, N.J.S.A. 2C:44-1a(1), and the need for deterrence, N.J.S.A. 2C:44-1a(9). It listed as mitigating factors defendant's payment of compensation to the victim, N.J.S.A. 2C:44-1b(6), and his lack of a prior record, N.J.S.A. 2C:44-1b(7). Significantly, the court made an express finding that the presumption of non-incarceration of N.J.S.A. 2C:44-1e *403 applied to this case because of the stipulation that defendant was to be sentenced as a third-degree offender, and because this was a first offense. However, the fifteen-weekend term of imprisonment was imposed because "the serious nature of the crime" was found to overcome the presumption of non-imprisonment.
The State appealed, contending that the sentence was inconsistent with the sentencing provisions of the Code of Criminal Justice. The Appellate Division affirmed the trial court in an unpublished opinion. The court held that the presumption of imprisonment of N.J.S.A. 2C:44-1d was applicable, but concluded that the fifteen-weekend prison term, imposed as a condition of the probationary sentence, satisfied the statutory presumption. It therefore concluded that the sentence imposed was proper under the sentencing provisions of the Code.
In its opinion, the Appellate Division relied on State v. Jones, 197 N.J. Super. 604 (App.Div. 1984), which held that a probationary sentence carrying a prison term as a condition was authorized under the Code, even though the presumption of incarceration was applicable. Id. at 608-09. However, two other panels have since reached the opposite conclusion, holding that such a sentence is illegal. State v. Whidby, 204 N.J. Super. 312 (App. Div. 1985); State v. Kreidler, 211 N.J. Super. 276 (App.Div. 1986). We granted certification, ___ N.J. ___ (1986), in order to resolve this conflict.

II
A threshold issue in this case is whether the presumption of imprisonment, N.J.S.A. 2C:44-1d, or the presumption of non-imprisonment, N.J.S.A. 2C:44  1e, determines the legality of defendant's sentence. Under the Code, all persons convicted of a first- or second-degree crime are to be sentenced to a term of imprisonment, absent a showing that incarceration would work a "serious injustice * * * overrid[ing] the need to deter such conduct by others." N.J.S.A. 2C:44-1d. Conversely, all first-time *404 offenders convicted of third- or fourth-degree crimes are entitled to a presumption of non-imprisonment, which can be overcome only by a finding that imprisonment "is necessary for the protection of the public." N.J.S.A. 2C:44-1e.
The sentencing court, relying on the plea agreement, found the presumption of non-imprisonment to be applicable despite the fact that defendant pled guilty to a second-degree crime. Defendant urges us to adopt the same conclusion, citing language in the agreement specifying that he be sentenced as a third-degree offender "if custodial." (Emphasis supplied.) This language, he argues, makes it clear that the parties contemplated a non-custodial sentence under N.J.S.A. 2C:44-1 e, a bargain to which the State ought to be held.
We find no such clarity in the plea agreement. The phrase to which the defendant attaches such importance is ambiguous. Nor is there any other evidence to suggest that the parties discussed or agreed to the applicability of the presumption of non-incarceration. Accordingly, we decline to hold that this matter is governed by the parties' agreement. We look instead to the sentencing statute and cases interpreting its terms for resolution of this issue.[2]
N.J.S.A. 2C:44-1d provides that a court "shall deal with a person who has been convicted of a crime of the first or second degree by imposing a sentence of imprisonment * * *." (Emphasis supplied.) N.J.S.A. 2C:44-1e similarly refers to "a person convicted of an offense other than a crime of the first or second degree." (Emphasis supplied.) The plain language of these provisions indicates that the applicable presumption is *405 to be determined not by the sentence imposed but by the offense for which a defendant is convicted. See State v. Kreidler, supra, 211 N.J. Super. at 278 (App.Div. 1986); State v. Gerstorfer, 191 N.J. Super. 542, 545 (App.Div. 1983); State v. Rodriguez, 179 N.J. Super. 129, 134-35 (App.Div. 1981).
Furthermore, we have observed that "the overall thrust" of the Code's sentencing provisions is to "focus upon the gravity of the offense and not the blameworthiness of the offender * * *." State v. Roth, 95 N.J. 334, 355 (1986) (emphasis supplied). Such an approach is necessary to preserve the Code's goals of enhancing fairness and uniformity in the exercise of sentencing discretion. Id. at 345; State v. Yarbough, 100 N.J. 627, 635 (1985). Consistent with this offense-oriented philosophy, it is our view that the crime committed should control which presumption will govern the legality of a sentence. Accordingly, we conclude that the presumption of incarceration applies to a defendant who pleads guilty to a second-degree crime, notwithstanding the terms of his plea bargain.

III
Having determined that the statutory presumption of incarceration is applicable to defendant's sentence, we now decide whether a sentence of fifteen consecutive weekends at a county correctional facility, or any term of imprisonment imposed as a condition of probation under N.J.S.A. 2C:43-2b(2), may satisfy the presumption. Resolution of this question requires that we review the structure and policies underlying the sentencing provisions of the Code, as set out in our earlier decisions of State v. Roth, supra, 95 N.J. 334; State v. Hodge, supra, 95 N.J. 369; and State v. Yarbough, supra, 100 N.J. 627. Our analysis of these provisions leads us to conclude that defendant's sentence is invalid under the statute.
The primary goal of the Code is greater uniformity and fairness in sentencing decisions. State v. Yarbough, supra, *406 100 N.J. at 635. Accordingly, the sentencing statute is designed to channel the discretion of sentencing judges through the use of presumptions of imprisonment, presumptive terms for various offenses, and presumptive ranges within which a limited amount of sentencing discretion may be exercised. State v. Yarbough, supra, 100 N.J. at 635; State v. Roth, supra, 95 N.J. at 357-59. We have consistently held that compliance with this statutory framework is vital to the achievement of the legislative policies underlying the Code. See State v. Hodge, supra, 95 N.J. at 379; State v. Roth, supra, 95 N.J. at 366.
In State v. Roth, supra, we discussed in detail the specific steps that a sentencing court must take in order to comply with the statute. The trial court must first consider N.J.S.A. 2C:43-2b, which enumerates the available sentencing alternatives.[3] The court must then determine whether a presumption of imprisonment, N.J.S.A. 2C:44-1d, or a presumption of non-imprisonment, N.J.S.A. 2C:44-1e, applies. See supra at 414-416. At this juncture, the Code significantly restrains sentencing discretion by making it clear that persons convicted of first- or second-degree offenses shall "predictably incur a particular sentence unless specific mitigating or aggravating factors are found." State v. Roth, supra, 95 N.J. at 358 (quoting "Fair and Certain Punishment," Report of the Twentieth Century Fund Task Force on Criminal Sentencing, at 20 (1976)). The statute permits the exercise of some discretion in the decision to imprison a first- or second-degree offender, but only in the "truly extraordinary and unanticipated circumstance[]" where a sentence of imprisonment would constitute a "serious injustice." Id.
The next stage of the sentencing process requires the trial court to set the length of sentence. As a general rule, the *407 court is limited to the presumptive terms contained in N.J.S.A. 2C:44-1f(1). However, the Code confers on the court the limited power to depart from these presumptive terms where it finds a "preponderance of aggravating factors or [a] preponderance of mitigating factors, as set forth in [N.J.S.A. 2C:44-1]a. and b." Where such circumstances are found to exist, the sentencing court may increase or decrease the sentence, but only within the presumptive ranges found in N.J.S.A. 2C:43-6 a. State v. Roth, supra, 95 N.J. at 359.[4]
The presumptive term for second-degree offenses is seven years. N.J.S.A. 2C:44-1f(1). However, the court may exercise its discretion to impose a greater or lesser sentence; the maximum sentence that may be imposed for a second-degree crime is ten years, and the minimum is five years. N.J.S.A. 2C:43-6a(2). In this case, the plea agreement indicated that defendant was to be sentenced as a third-degree offender. For third-degree offenses, the presumptive sentence is four years, N.J.S.A. 2C:44-1f(1), while the presumptive range is three to five years, N.J.S.A. 2C:43-6a(3).
N.J.S.A. 2C:43-2b and 2C:45-1c authorize a court to sentence a defendant to a probationary term. These provisions also permit the court to impose a term of imprisonment as a condition of probation, commonly referred to as a "split sentence." However, the maximum term of imprisonment that may be imposed in connection with a probationary sentence is 364 days. N.J.S.A. 2C:43-2b(2), 2C:45-1c. Therefore, a *408 sentence of imprisonment as a condition of probation that conforms to the limitations of N.J.S.A. 2C:45-1c cannot be long enough to fall within the presumptive range of sentence for either a second- or third-degree offense.
In State v. Jones, supra, 197 N.J. Super. at 608, a panel of the Appellate Division held that the presumptive ranges contained in N.J.S.A. 2C:44-1f(1) were intended to apply only to state prison sentences, not to county jail terms imposed under N.J.S.A. 2C:43-2b(2). The court therefore concluded that N.J.S.A. 2C:44-1f(1) does not bar imposition of a split sentence, even where the presumption of imprisonment governs.
We decline to adopt the Jones court's interpretation of N.J.S.A. 2C:44-1f(1). Application of the Jones holding could theoretically permit a second-degree offender to be sentenced to a prison term as short as one day or as long as ten years. See State v. Kreidler, supra, 211 N.J. Super. at 279. In our view, this approach to the statute would undermine the Code's dual policies of fairness and uniformity by re-introducing unfettered discretion into sentencing decisions. See State v. Roth, supra, 95 N.J. at 345.
We are also unpersuaded by defendant's argument that the term "imprisonment" should have the same meaning throughout the Code's sentencing provisions. Relying on this principle of statutory interpretation, defendant, citing Jones, supra, 197 N.J. Super. at 609, contends that his fifteen-weekend county-jail sentence, as a term of imprisonment under N.J.S.A. 2C:43-2b(2), satisfies the presumption of imprisonment of N.J.S.A. 2C:44-1d. We acknowledge the maxim of statutory construction that "a word or phrase should have the same meaning throughout the statute in the absence of a clear indication to the contrary." Perez v. Pantasote, Inc., 95 N.J. 105, 116 (1984). However, we decline to accord controlling significance to a mechanical rule of statutory construction when to do so would violate the clear policies that form the foundation of the Code's sentencing provisions. See Alexander v. New Jersey Power & Light Co., 21 N.J. 373, 378 (1956).
*409 Moreover, we are persuaded that the Legislature intended that "imprisonment for a term" as a condition of probation and a sentence of imprisonment be treated as two distinct and different sentencing alternatives. We observe that the Criminal Law Revision Commission, in its Final Report, came to the same conclusion, noting that
[s]entences may be of four different sorts: * * * (2) to be placed on probation with or without a short period of imprisonment; or (3) to imprisonment for a term * * *. [II Final Report of the New Jersey Criminal Law Revision Commission: Commentary 313 (1971) (emphasis supplied).]
That a split sentence is qualitatively different from a sentence of imprisonment is also supported by an analysis of the history of the statute. When initially adopted as part of the Code of Criminal Justice in 1978, N.J.S.A. 2C:43-2b(2) provided for a prison term not to exceed ninety days. L. 1978, c. 95, § 2C:43-2 b(2).[5] A sentence as brief as ninety days or, as appears in the current version of the statute, 364 days, suggests a form of punishment qualitatively as well as quantitatively different from a term of imprisonment under N.J.S.A. 2C:43-2b(3). The distinction between the two sentencing alternatives is underscored by the fact that a term of imprisonment as a condition of probation must be served in a county jail, while in the majority of cases a sentence of imprisonment must be served in a state correctional facility. N.J.S.A. 2C:43-10; see also State v. Hartye, supra, 105 N.J. at 421 (noting that a parole ineligibility term, N.J.S.A. 2C:43-6b, may not be imposed in connection with a split sentence, and that the custodial element of such a sentence may commence, or be reduced, at any time during the probationary period).
Finally, defendant contends that our holding today will undermine the Code's sentencing framework because it *410 effectively eliminates the possibility of imposing a term of imprisonment as a condition of probation. We disagree. To the extent our opinion recognizes that a first- or second-degree crime is sufficiently serious that a probationary term should be permitted only in the exceptional case, we believe that this view more accurately reflects the policies of proportionality and desert underlying the Code. See State v. Roth, supra, 95 N.J. at 355. The Code permits imposition of a split sentence on a first- or second-degree offender in cases where the presumption of imprisonment is overcome by a finding that incarceration would constitute a "serious injustice which overrides the need to deter such conduct by others." N.J.S.A. 2C:44-1d; see State v. Kreidler, supra, 211 N.J. Super. at 277. A term of imprisonment as a condition of probation is also available when the offender has been convicted of a third- or fourth-degree crime. See State v. Hartye, supra, 105 N.J. 411.
We therefore hold that a split sentence is invalid where the defendant has committed a second-degree offense, except in cases where the presumption of imprisonment has been overcome. State v. Whidby, supra, 204 N.J. Super. at 314. We are confident that this approach comports with the Code's primary goal of reducing sentencing disparity. Conversely, it is our view that any other disposition would lead to the untenable conclusion that "the Legislature created a presumption of imprisonment for the most serious crimes in the Code, that can be satisfied by only a day of `imprisonment.'" State v. Kreidler, supra, 211 N.J. Super. at 279. Such a result would re-introduce to sentencing decisions a degree of unfettered discretion that the Code's presumptive-sentence scheme was designed to eliminate.

IV
Our holding today compels a reversal of defendant's sentence of fifteen weekends in a county correctional facility. Defendant, as a second-degree offender, is subject to the presumption of imprisonment. In the absence of a finding by the trial court *411 that the presumption has been overcome, the Code requires a minimum prison term of three years in view of the plea agreement's provision that defendant be sentenced as a third-degree offender. The sentence imposed was therefore illegal.
Accordingly, we remand this case to the trial court for resentencing. We recognize that defendant, in entering his guilty plea, may have relied on an assumption that the presumption of non-incarceration was applicable to his sentence. Because defendant is entitled to have his reasonable expectation of sentence fulfilled, see State v. Kovack, 91 N.J. 476, 483 (1982), we direct the sentencing court to extend to defendant the opportunity to withdraw from the plea agreement. Alternatively, defendant may elect not to withdraw from the plea agreement, in which event the trial court may reconsider whether the presumption of incarceration has been overcome.
The judgment below is reversed and the cause remanded for proceedings in accordance with this opinion.
For reversal and remandment  Chief Justice WILENTZ, and Justices CLIFFORD, HANDLER, POLLOCK, O'HERN, GARIBALDI and STEIN-7.
For affirmance  None.
NOTES
[*]  This case was published in the advance sheet at 105 N.J. 409.
[1]  Defendant was also ordered to attend mental health counseling as directed by his probation officer, to pay a fine of $500, and to pay a Violent Crimes Compensation Board penalty of $25.
[2]  While not necessary to the disposition of this case, we conclude that it would have been improper, in any event, to attempt a modification of the statutory presumption of imprisonment through a plea agreement. The presumption represents a clear policy choice by the Legislature that "[t]he sentence for * * * a crime must reflect primarily the severity of that crime." State v. Hodge, 95 N.J. 369, 377 (1984).
[3]  Included among these alternatives is a sentence of imprisonment for a term, N.J.S.A. 2C:43-2b(3), and a sentence of probation, which may include a term of imprisonment of up to 364 days as a condition of sentence, N.J.S.A. 2C:43-2 b(2).
[4]  The Code provides for several additional sentencing alternatives, to be exercised under more narrow circumstances. If the court becomes clearly convinced that the mitigating factors of N.J.S.A. 2C:44-1b substantially outweigh the aggravating factors, it may sentence a first- or second-degree offender to a term appropriate to a crime one degree lower than that of the conviction. N.J.S.A. 2C:44-1f(2). Conversely, if the court is clearly convinced that the aggravating factors of N.J.S.A. 2C:44-1a substantially outweigh the mitigating factors, it may impose a period of parole ineligibility, pursuant to N.J.S.A. 2C:43-6b. The Code also permits the court to sentence a defendant to an extended term of imprisonment. N.J.S.A. 2C:44-3. See State v. Roth, supra, 95 N.J. at 359-60.
[5]  Subsequent amendments increased the authorized term of imprisonment first to 180 days, L. 1979, c. 178, § 82, and then to 364 days, L. 1983, c. 124, § 1. The 1983 amendment was prompted by the Legislature's perception that a disproportionate number of defendants were being sentenced to state prison rather than county jail. See Assembly Judiciary, Law, Public Safety and Defense Committee, Statement on Senate Bill No. 1463 (1983), reprinted at N.J.S.A. 2C:43-2, at 39 (Supp. 1986).
