
153 Ariz. 320 (1987)
736 P.2d 803
The STATE of Arizona, Appellee,
v.
Ralph Edward VASQUEZ, Appellant.
No. 2 CA-CR 4534.
Court of Appeals of Arizona, Division 2, Department A.
January 15, 1987.
Review Denied May 5, 1987.
Robert K. Corbin, Atty. Gen. by Eric J. Olsson, Tucson, for appellee.
Frederic J. Dardis, Pima County Public Defender by John F. Palumbo, Tucson, for appellant.
OPINION
FERNANDEZ, Judge.
This appeal presents the question of whether time spent in a residential treatment house as a condition of probation should be credited towards the sentence imposed after the probation is revoked. Additionally, appellant argues that his plea *321 agreement was modified to require that such credit be given.
Appellant pled guilty to a class 6 felony, theft by control, and was sentenced to three years' probation. As a condition of his probation, the court ordered that he successfully complete the Amity House drug treatment program, which apparently lasts 18 months. After approximately nine months in the program, appellant was discharged from Amity House due to his failure to abide by program guidelines. The state filed its petition and the court revoked appellant's probation, sentencing him to the presumptive term of 1.5 years in prison, with credit for 114 days previously served in the Pima County Jail.
Initially, when appellant pled guilty to the theft offense, the plea agreement required that he spend 180 days in the county jail as a condition of probation. When the court suspended the imposition of a sentence and imposed the term of probation, the prosecutor agreed to allow appellant, as a condition of his probation, to successfully complete the drug treatment program at Amity House in lieu of the 180-day jail requirement. Appellant argues that the time he spent at Amity House was time spent "in custody" for purposes of the statutes which require that credit for such time be given against the term of imprisonment imposed for an offense. Alternatively, he argues that the substitution of the drug rehabilitation program for the required jail time altered his plea agreement to require that credit be given.
SENTENCE CREDIT
The issue before us is whether A.R.S. §§ 13-709(B), 13-901, and 13-903(E) mandate the inclusion of the Amity House time as credit against appellant's sentence. Subsection 13-903(E) requires that time spent "in custody" pursuant to § 13-901(F) shall be credited against any sentence of imprisonment imposed upon revocation of probation, recognizing that under subsection 13-901(F) a court may require a defendant to be "imprisoned in the county jail" as a condition of probation. Similarly, A.R.S. § 13-709(B) requires that all time "actually spent in custody" shall be credited against the term of imprisonment imposed for an offense. In determining whether time in a particular facility is required to be included as jail credit pursuant to the statutes quoted above, the crucial question is whether the person is in custody. The resolution of that issue varies widely among the states, since jail credit is a statutory matter. See Annot., 24 A.L.R. 4th 789 (1983).
Appellant cites Lock v. State, 609 P.2d 539 (Alaska 1980), in which the court interpreted Alaska's statute to allow credit for time spent by a defendant in a rehabilitation facility if the program "impose[d] substantial restrictions on one's freedom of movement and behavior." 609 P.2d at 545. While we are mindful of the Alaska rule, we believe that in determining whether time spent in a facility constitutes "custody" under our credit statute, the circumstances of placement are of greater significance than the nature of the facility itself.
A.R.S. § 13-903(E) requires that a defendant be given credit for time spent in jail. A.R.S. § 13-709(B) requires credit for time "actually spent in custody." Contrary to appellant's assertion that the statutes are ambiguous, we believe that the harmonious interpretation of those statutes requires credit only for periods in which a defendant is in the actual or constructive control of jail or prison officials. See, e.g., A.R.S. §§ 13-605, 13-606 and 31-335; see also Green v. Superior Court, 132 Ariz. 468, 647 P.2d 166 (1982) (credit allowed for time spent in jail as a condition of probation includes time spent on work furlough or authorized release). Thus, when a defendant remains within the control of jail or prison officials, credit must be given against his sentence for that time. Once a defendant leaves the custody and/or control of jail or prison officials, for example, by pretrial release on his own recognizance, probation, or parole, credit may not be given for that period. A supervising probation officer, parole officer, or pretrial supervision officer is not a jail or prison official for purposes of determining credit.
*322 In this case, appellant was placed on probation, released from the control of the jail officials, and placed under the supervision of a probation officer. The time that appellant spent at Amity House as a condition of his probation does not qualify as time spent "in custody" for purposes of the Arizona credit statutes. See State v. Babcock, 226 Kan. 356, 597 P.2d 1117 (1979).
As the Florida Supreme Court pointed out in Pennington v. State, 398 So.2d 815 (Fla. 1981), there is a key conceptual difference between incarceration and structured rehabilitation and treatment. Although we interpret our statutes to allow a defendant credit for all time spent in a county jail, in prison, or within the control of jail or prison officials, we decline to extend the language of the statutes to require that credit be given in other circumstances. We believe that denying credit for time spent in a treatment program such as Amity House encourages probationers to participate fully in such programs and to adhere to their conditions of probation.
PLEA AGREEMENT
Appellant argues that the state's agreement to allow him to enter the Amity House program in lieu of the 180 days' jail time originally required as a condition of probation in the plea agreement constituted an oral modification of the agreement and thus allowed appellant to reasonably believe that the credit for Amity House time would be given. There is nothing in the record to support that notion. At the time of sentencing, it was clear that the parties agreed only to alleviate the 180-day jail requirement and replace it with a much-needed drug rehabilitation treatment program. Appellant's counsel requested that the trial court credit the Amity House time against the sentence pursuant to the terms of the plea agreement as modified, but the court refused, finding that the agreement to delete the 180-day jail term did not require the same credit for the treatment program. The court stated: "The plea agreement provided for jail time. At the time of sentencing I talked the prosecutor into letting me send him to Amity instead of putting him in jail." Furthermore, the trial judge's personal opinion that Amity House is "worse than the county jail" does not require that appellant receive credit for his time spent. Appellant did not question the trial court's decision to allow a substitution of the drug rehabilitation program for his jail time, nor did he request alternatively that the court comply with the original terms of the plea agreement and sentence him to 180 days in the county jail.
The order revoking probation and the sentence imposed are affirmed.
HATHAWAY, C.J., and HOWARD, P.J., concur.
