OPINION
KLEINSCHMIDT, Judge.The defendant, Brian Schumann, appeals his conviction and sentence imposed following a guilty plea to aggravated driving while under the influence of intoxicating liquor, a class 5 felony. The question presented in this appeal is whether Ariz.Rev. StatAnn. (“A.R.S.”) § 13-709(B) (1989), as interpreted by State v. Mathieu, 165 Ariz. 20, 795 P.2d 1303 (App.1990), affords a trial court discretion to credit presentence incarceration time against a probationary jail term rather than against a six-month prison sentence. We conclude that it does.
In November 1990, the defendant was indicted in superior court for aggravated driving or actual physical control while under the influence of intoxicating liquor or drugs. He entered into a plea agreement with the state, in which he agreed to be placed on three years probation and to serve a six-month, flat time prison sentence in the Department of Corrections. The plea agreement also provided that he would receive credit “for all time previously served." At the change-of-plea hearing, defense counsel informed the court that defendant’s presentence incarceration credit would wipe out the six-month prison sentence. The trial judge responded, “[tjhat’s too bad. He won't have the benefit of that ... Aspen House program.” At the time of sentencing, however, the judge imposed the stipulated probationary term and the six-month prison sentence and then imposed a jail term of 217 days against which he credited defendant’s presentence incarceration time. Defendant timely appealed from his conviction and sentence.
Our decision in this case will not affect the defendant because he has completed his six-month term of imprisonment in the Department of Corrections. We address the question presented in this appeal, however, because the issue “ ‘threatens to evade review as a result of the relative brevity of the sentences imposed under the statute.’ ” Mathieu, 165 Ariz. at 21, 795 P.2d at 1304 (quoting State v. Clements, 161 Ariz. 123, 776 P.2d 801 (App.1989)).
The defendant claims that he was entitled to presentence incarceration credit against his mandatory prison sentence. He does not claim that the trial judge could not impose a jail term, as opposed to the prison term, as a condition of his probation, or that the imposition of the jail term was somehow a violation of the terms of his plea agreement. He argues instead that under Mathieu, the court should have credited the time he spent in presentence incarceration against the prison term imposed as a condition of probation.
Arizona Revised Statutes § 13-709(B) governs credit for presentence incarceration. That section provides:
All time actually spent in custody pursuant to an offense until the prisoner is sentenced to imprisonment for such offense shall be credited against the term of imprisonment otherwise provided for by this chapter.
In Mathieu, this court considered whether A.R.S. § 13-709(B) required presentence incarceration time to be credited against a probationary prison term. 165 Ariz. at 23, 795 P.2d at 1306. In interpreting section 13-709(B) and its applicability to a probationary prison term, we found no distinction between confinement in prison as a “traditional ‘sentence’ ” or when imposed as a condition of probation. Thus, we held that a defendant who receives a probationary prison term is entitled to presentence incarceration credit against that term “as any other defendant ‘sentenced’ to prison.” Id. at 25, 795 P.2d at 1308.
The state disputes defendant’s argument that Mathieu requires presentence incarceration time to be credited against defendant’s mandatory prison term. According *644to the state, Mathieu requires the trial court to award presentence incarceration credit against a probationary term of incarceration.1 The state argues that Mathieu does not limit the trial court’s discretion to award credit against a probationary jail term rather than against a mandatory prison term imposed as a condition of probation.
In prior cases before this court, we have upheld the trial court’s discretion to award presentence incarceration credit against probationary terms of incarceration. See Clements, 161 Ariz. at 123, 776 P.2d at 801; State v. Brodie, 127 Ariz. 150, 618 P.2d 644 (App.1980). In Clements, we considered whether A.R.S. § 28-692.01 (1989), precluded courts from crediting presentence incarceration time against a mandatory prison term. 161 Ariz. at 125, 776 P.2d at 803. Restricting the discretion of trial courts to award presentence incarceration credit against a mandatory probationary prison term, we decided, would create inequities for defendants unable to post bail because of financial constraints. Id. at 126, 776 P.2d at 804. In Brodie, we considered whether A.R.S. § 13-903(E) (now A.R.S. § 13-903(F) (1989)) required a trial court to credit presentence incarceration time against a probationary jail term. We held that section 13-903 did not obligate a trial court to award credit for presentence incarceration. 127 Ariz. at 151, 618 P.2d at 645.
Implicit in our decisions in Clements and Brodie is that the trial court possesses considerable discretion in awarding credit for presentence incarceration. If the trial court in this case had imposed probation with a six-month prison sentence and credited the defendant with 217 days presentence incarceration on that prison sentence, it would unquestionably have been free to have imposed an additional jail term as a condition of that probation without any credit for presentence incarceration. If that were the case, the defendant would have spent no more nor less time incarcerated than he actually spent in this case. The point is that the defendant did receive credit for presentence incarceration against one of two sentences that the judge had a right to impose. Here, the trial judge adopted a flexible approach to achieve a rehabilitative goal he deemed desirable. We believe that he acted legally in doing so. We affirm the trial court’s order.
Pursuant to A.R.S. § 13-4035 (1989), we have reviewed the record for fundamental error and found none. The judgment and sentence imposed are affirmed.
CONTRERAS, P.J., and FIDEL, J., concur.. In a footnote in its answering brief, the state cites State v. Brodie, 127 Ariz. 150, 618 P.2d 644 (App.1980), and notes its disagreement with the result in Mathieu. While the result in these two cases may appear inconsistent, Brodie and Mathieu considered the issue of presentence incarceration credit against probationary terms of incarceration in the context of different statutes.