
922 P.2d 419 (1996)
129 Idaho 122
STATE of Idaho, Plaintiff-Respondent,
v.
Jay A. BUYS, Defendant-Appellant.
No. 22149.
Court of Appeals of Idaho.
August 5, 1996.
*420 Jay A. Buys, Boise, pro se appellant.
Alan G. Lance, Attorney General; John C. McKinney, Deputy Attorney General, Boise, for respondent.
LANSING, Judge.
This appeal presents a question of first impression: does time served in confinement as a condition of probation when a trial court in a criminal case withholds judgment and places the defendant on probation, constitute "incarceration prior to entry of judgment," for which a defendant is entitled to credit against a later-imposed sentence pursuant to I.C. § 18-309?
After a period of probation on a withheld judgment, Jay A. Buys was convicted and sentenced to a period of incarceration in the custody of the State Board of Correction. He asserts that he is entitled to credit against his sentence for one year of incarceration served as a condition of probation when the trial court initially withheld judgment and for two subsequent periods spent in the county jail upon his arrest for probation violations. We conclude that Buys is entitled to credit for time served following one arrest for an alleged probation violation, but that he may not receive credit against his sentence for the period of incarceration that was served solely as a condition of his probation.

PROCEDURAL BACKGROUND
This case began when Buys was arrested in July 1988 for delivery of a controlled substance, I.C. § 37-2732. In January 1989, Buys pleaded guilty, and the district court entered an order withholding judgment pursuant to I.C. § 19-2601(3)[1] and placing Buys on probation for five years. As one of the conditions of his probation, Buys was required to serve one year of incarceration, with credit for 183 days that he had already spent in jail following his arrest. The court specified that this period of incarceration would be served concurrently with a sentence of one and one-half to three years that Buys was then serving in the state of Wyoming.
Upon Buys' release from the Wyoming penitentiary, he was released on probation in the present case.
On June 7, 1991, Buys was arrested and arraigned on a charge of statutory rape. On the same day the district court in the present case issued an "order for incarceration" requiring that Buys serve thirty days' "discretionary time" in jail. The discretionary time was ordered because Buys had been charged with statutory rape. The order further stated *421 that Buys' probation officer was conducting an investigation of the incident and that a probation violation report would be filed thereafter. A violation report was filed on July 2, 1991. It asserted a probation violation other than the statutory rape. Specifically, it alleged that Buys had not complied with a schedule prepared by his probation officer that governed Buys' time for employment, community service, curfew and free time. Based upon this alleged probation violation, a bench warrant was issued on July 8, 1991, and bond was set at $10,000. Meanwhile, in the rape case that was proceeding simultaneously, Buys entered into a stipulation with the prosecutor that the $10,000 bond set in the present case could be utilized as the bond in the rape case, so that one bond of $10,000 would suffice for both. Buys asserts that he spent thirty-two days in jail between the date of the district court's order for incarceration (which was also the date of his arrest for statutory rape) and the date that he was released upon posting bond in both cases.
Ultimately, Buys entered into a plea agreement by which he agreed to plead guilty to the statutory rape charge and, in return, the State dismissed the probation violation report in the present case. Consequently, no evidentiary hearing was conducted on the probation violation report. In the rape case, the district court entered a judgment of conviction but retained jurisdiction for 180 days and, thereafter, suspended Buys' sentence and placed him on probation.
On November 10, 1993, an order of incarceration was entered in the rape case directing that Buys be incarcerated for forty-five days as discretionary time because Buys had struck his wife on three occasions, was not successfully completing counselling and had repeatedly failed to follow the directives of his probation officer by changing residences without permission and incurring unnecessary indebtedness.
On December 23, 1993, a report of probation violation was filed in the rape case, alleging that Buys had violated the terms of his probation in that case by: failing to participate in good faith in his sex offender treatment program, which led to his being expelled from the program; persistently making advances toward a sixteen-year-old girl; and using cocaine. A report dated December 28, 1993, alleging the same probation violations was filed in the present case. A bench warrant ordering Buys' arrest for these probation violations was issued in the present case on January 6, 1994. Buys denied the probation violations in both cases, and a consolidated evidentiary hearing on the alleged violations was conducted. The district court found that the violations had occurred as reported and, as a consequence, on April 4, 1994, the court revoked Buys' probation in both cases.
The court, which had theretofore withheld judgment in the present case, entered a judgment of conviction and sentenced Buys to the custody of the State Board of Correction for a unified term of ten years with a minimum period of confinement of three years. Buys received credit for 284 days of prior incarceration. This included 183 days served between Buys' initial arrest and the entry of the January 1989 order withholding judgment, and 96 days served following his arrest for the final probation violation.[2]
In February 1995, Buys filed in this case a motion for additional credit for time served. He requested credit for the one year of incarceration imposed as a condition of his probation when the court withheld judgment, and for the entire period of his imprisonment in Wyoming, 635 days. He also sought credit for thirty-two days he spent in jail in June and July 1991 based upon the court's June 7, 1991 order for incarceration. Finally, he argued that credit should also be given for forty-five days served in November and December 1993, pursuant to the court's November 12, 1993 order for incarceration in the rape case.
In ruling upon the motion, the district court observed that, of the one-year jail term imposed as part of the order withholding judgment, Buys had already received credit *422 for 183 days served between his arrest and the order withholding judgment, so only the balance of 182 days served concurrently with Buys' Wyoming sentence was actually at issue. As to that remaining 182 days, the court relied upon the holding in State v. Banks, 121 Idaho 608, 826 P.2d 1320 (1992), that a defendant whose probation has been revoked is not entitled to credit against his sentence for time spent in jail as a condition of probation. The court held that the 182 days that was served in Wyoming to complete the one-year jail term was a condition of probation to which Buys was not entitled to credit. The district court also concluded that the periods of incarceration in June and July 1991, and November and December 1993, were "discretionary time" served as conditions of probation and could not be applied to Buys' sentence. Finally, the district court held that the time in excess of 182 days that Buys served in the Wyoming penitentiary was not incarceration related to the Idaho charges and therefore could not be credited. Accordingly, the court denied any additional credit for time served in this case.
On appeal, Buys no longer claims credit for his Wyoming imprisonment in excess of the one year imposed as a condition of his probation, but continues to assert a right to credit for that one year and the subsequent confinements served on the district court's orders of incarceration of June 7, 1991 and November 10, 1993. We will consider each of these periods of incarceration in turn.

ANALYSIS

A. One-year Confinement Imposed as a Condition of Probation
Buys' claim for additional credit against his sentence is predicated upon I.C. § 18-309, which states:
In computing the term of imprisonment, the person against whom the judgment was entered, shall receive credit for any period of incarceration prior to entry of judgment, if such incarceration was for the offense or an included offense for which the judgment was entered. The remainder of the term commences upon the pronouncement of sentence and if thereafter, during such term, the defendant by any legal means is temporarily released from such imprisonment and subsequently returned thereto, the time during which he was at large must not be computed as part of such term.
This Court has observed that, "the language of I.C. § 18-309 is mandatory, and requires that in sentencing a criminal defendant, the sentencing judge give the appropriate credit for pre-judgment incarceration." State v. Rodriguez, 119 Idaho 895, 897, 811 P.2d 505, 507 (Ct.App.1991). Buys argues that because the district court withheld judgment in this case until April 4, 1994, when his probation was revoked and a judgment of conviction entered, all of the incarceration prior to that date was "pre-judgment incarceration" for which credit is mandated by I.C. § 18-309.
As the district court recognized, this issue requires consideration of the Idaho Supreme Court's holding in State v. Banks, supra. In that case, Banks was convicted of statutory rape, and an indeterminate five-year sentence was imposed. However, the sentence was suspended and Banks was placed on probation. One of the conditions of probation was that he serve nine months in jail, with credit for 239 days he spent in jail prior to sentencing. Banks served the thirty-four days remaining on the nine-month term before being released on probation. Later, Banks was found to have violated conditions of his probation, and the district court revoked the probation and ordered that Banks be committed to the custody of the Board of Correction. The court did not give Banks credit for any of the nine months of jail time as a credit against the sentence, and Banks appealed the disallowance of this credit. The Idaho Supreme Court held that Banks was entitled to credit for all jail time served prior to his being sentenced and placed on probation. However, the Court disagreed with Banks' contention that he was also entitled to jail time served after probation was imposed in order to complete the nine months of incarceration required as a condition of probation. The Court stated:
We hold that the time Banks spent in jail, after the imposition of sentence, was a *423 condition of probation not required to be credited against the sentence. Under I.C. § 19-2601(2), a court may place a defendant on probation subject to "such terms and conditions as it deems necessary and expedient." This Court has previously approved as a term of probation that the defendant waive his right to be free from unreasonable searches and seizures. State v. Gawron, 112 Idaho 841, 843, 736 P.2d 1295, [1297] (1987). Here, Banks agreed to serve nine months in jail, with credit for the eight months he had served pre-trial, in order to receive probation. As in Gawron, Banks waived a right in exchange for being placed on probation. Accordingly, he is not entitled to credit for the time he voluntarily surrendered to gain probation.
Id. at 610, 826 P.2d at 1322 (footnote omitted).
Here, Buys received credit on his sentence for 183 days that he was incarcerated before he was placed on probation, as mandated by Banks. He asserts that, unlike Banks, he should also receive credit for the remaining 182 days served after he was placed on probation, which completed the one-year term imposed as a condition of probation. Buys argues that Banks is distinguishable because in Banks the judgment of conviction was entered when Banks was placed on probation, so all of the period of incarceration served by Banks as a condition of his probation was post-judgment incarceration. Buys argues that because in his case the district court withheld judgment when probation was imposed, and no judgment of conviction was entered until April 1994, all of his previous confinement, including that served after he was placed on probation, constitutes pre-judgment incarceration for which credit is required by I.C. § 18-309.
The State, in response, asserts that an order withholding judgment should be deemed a "judgment" within the meaning of I.C. § 18-309. The State points to State v. Wagenius, 99 Idaho 273, 581 P.2d 319 (1978), where the Idaho Supreme Court held that an order withholding judgment, but imposing a jail term and a fine as conditions of the withheld judgment, was a de facto judgment of conviction and thus an appealable order under a then-existing statute, which authorized an appeal from "a final judgment of conviction." The State urges that an order withholding judgment should likewise be deemed a de facto judgment for purposes of calculating credit for time served prior to the entry of "judgment" pursuant to I.C. § 18-309.
We think it unnecessary to address the State's argument that an order withholding judgment is the functional equivalent of a judgment for purposes of determining entitlement to credit for pre-judgment incarceration. Rather, applying the Supreme Court's rationale in State v. Banks, we conclude that Buys was not entitled to credit for the 182 days served after probation was ordered regardless of whether it is viewed as pre-judgment or post-judgment confinement, because it was a condition of probation and was voluntarily accepted by Buys in order to obtain probation and a withheld judgment. The statute upon which Buys relies, I.C. § 18-309, not only requires that a defendant receive credit for pre-judgment incarceration but also provides that, "[t]he remainder of the term commences upon the pronouncement of sentence. . . ." Therefore, as a general rule under that statute, any period of incarceration, whether before or after the entry of judgment and imposition of sentence, counts against the sentence of imprisonment so long as the incarceration is attributable to the offense or an included offense for which judgment was entered. In Banks, however, the Supreme Court identified an exception to that general rule, holding that incarceration served after pronouncement of the sentence was not to be credited against the sentence if the jail time was required as a condition of probation. This was so, the Supreme Court said, because a period of confinement in exchange for the benefit of probation is a voluntary choice of the defendant, who has the option of declining the probation terms and, instead, serving the sentence which the court has pronounced but would suspend during the period of probation.
In our view, the Supreme Court's rationale in Banks applies equally to any incarceration that is served as a condition of probation, *424 regardless of whether that incarceration is post-judgment, as in Banks, or is served prior to entry of judgment because judgment is being withheld during the pendency of the probation. By agreeing to the terms of his probation, Buys gained the benefit of a withheld judgment and probation in lieu of immediate entry of a judgment of conviction with imposition of a sentence. Therefore, like Banks, "he is not entitled to credit for the time he voluntarily surrendered to gain probation." Id. at 610, 826 P.2d at 1322. Accordingly, we find that the district court correctly denied Buys' request for credit for 182 days served in order to complete the total of one year's confinement that was a condition of his withheld judgment and probation.

B. Incarceration in June and July, 1991
We turn next to Buys' request for credit for his incarceration that occurred in June and July 1991, pursuant to the order of incarceration issued in this case on the same date that Buys was arrested on a charge of statutory rape.
Idaho Code Sections 19-2602 and 19-2603 govern proceedings upon the report of a probation violation. Section 19-2602 authorizes the issuance of a bench warrant for the rearrest of the defendant upon a showing, to the satisfaction of the court, that the terms and conditions of probation have been violated by the defendant.[3] Section 19-2603 provides that if a probationer has been arrested and probation revoked as a result of a violation, the defendant's incarceration from the time of service of the bench warrant will count as part of the sentence.[4] Jail time served upon arrest for a probation violation does not fall within the Banks exception for incarceration that is voluntarily accepted as a condition of probation. Thus, this Court in State v. Peterson, 121 Idaho 775, 828 P.2d 338 (Ct.App.1992), held that a defendant was entitled to credit on his sentence for two periods of jail time served between the arrests for and disposition of two separate probation violations.
The district court did not allow credit for Buys' incarceration in June and July of 1991, because the court did not consider this an arrest for a probation violation. Rather, the district court stated that this was "discretionary time" served as a condition of probation and therefore was not creditable against Buys' sentence under the holding in Banks. We conclude that the district court erred in holding that this incarceration was served as a condition of Buys' probation.
Buys' probation conditions were set out in the order withholding judgment of January 30, 1989, and Buys signed an agreement by which he accepted those terms. Those conditions included no provision that Buys could be required to serve jail time at the discretion of the court or of his probation officer other than the one year of incarceration that had been fully served prior to June 1991. Insofar as the record reveals, the conditions of probation adopted in January 1989 were never modified prior to Buys' arrest in June 1991, except to give him credit for the 183 days previously spent in jail. Therefore, when the order for incarceration of June 7, 1991 was issued, there existed no condition of Buys' probation that would have allowed the State or the court to require that he serve discretionary jail time. It follows that the court's characterization of this confinement as discretionary time is inaccurate, and the reasoning of Banks that a defendant cannot *425 receive credit for confinement served voluntarily as an accepted condition to obtain probation has no application to Buys' incarceration in June and July of 1991.
The order of June 7, 1991, appears to be the functional equivalent of a bench warrant issued as a consequence of an alleged violation of probation terms. From its content, we surmise that the order was drafted by and issued at the request of Buys' probation officer. It states:
To: The Sheriff of Bonneville County
The above named defendant has been ordered to serve discretionary time in jail as set forth below. You are hereby ordered to receive the said defendant for incarceration for 30 days. The discretionary time is to be served for the following reason(s): Mr. Buys has been arrested for the Rape of a Minor. Probation is currently conducting our investigation of this incident. Thirty days of jail time is requested for investigation; a probation violation will be filed.
The order had an effect upon Buys' liberty even though he was also arrested pursuant to a warrant for the new offense of statutory rape, for Buys would have been eligible for release on bond in the rape case if he had not been subject to the instant order requiring his incarceration for a full thirty days. We conclude that the June 7, 1991, order for incarceration was in substance and effect a bench warrant for Buys' arrest in connection with an alleged probation violation. Therefore, under I.C. § 19-2603, he is entitled to credit for the period served in jail upon that order.
On July 8, 1991, the day following expiration of the ordered thirty-day incarceration, the district court issued a bench warrant in this case calling for Buys' arrest for a probation violation relating to his failure to follow his program schedule. He is also entitled to credit under I.C. § 19-2603 for any further jail time served as a consequence of that bench warrant.
Buys claims that he served a total of thirty-two days in confinement under the June 7, 1991 order and the July 8, 1991 bench warrant. Because the record before us does not reflect when Buys was released from jail, we will remand this matter to the district court to determine the number of days which should be credited on Buys' sentence.

C. Incarceration in November and December, 1993
Finally, Buys asserts that there should be counted against his sentence forty-five days in jail served under a similar order of incarceration issued by the district court on November 10, 1993. This claim, however, is without merit. The order of incarceration to which Buys refers was issued in the rape case. There is no corresponding order in the record of the present case. Therefore, any jail time served pursuant to the November 10, 1993 order is not attributable to the offense for which Buys stands convicted in the present case. In this case, a bench warrant for Buys' arrest was issued on January 6, 1994, based upon a December 28, 1993, report of probation violations. Buys was given credit for the time served between the filing of this probation violation report and entry of the judgment of conviction and sentence. He has not demonstrated entitlement to credit in the present case for any additional jail time served in 1993.

CONCLUSION
We affirm the district court's denial of credit on Buys' sentence for time served by Buys to complete the one-year period of incarceration that was imposed as a condition of probation. We also affirm the court's denial of additional credit for Buys' incarceration in 1993, which was served pursuant to the November 10, 1993 order of incarceration in the rape case. However, we reverse the district court's decision insofar as it denied credit to Buys for confinement in jail during June and July 1991 under the court's June 7, 1991 order for incarceration and the July 8, 1991 bench warrant. The case is remanded to the district court for determination of the number of days to be applied against Buys' sentence for this period of incarceration.
WALTERS, C.J., and PERRY, J., concur.
NOTES
[1]  Idaho Code Section 19-2601(3) provides in part:

Whenever any person shall have been convicted, or enter a plea of guilty, in any district court of the State of Idaho, of or to any crime against the laws of the state, except those of treason or murder, the court in its discretion, may:
. . . .
(3) Withhold judgment on such terms and for such time as it may prescribe and may place the defendant on probation.
[2]  In its response to Buys' motion for additional credit for time served, the State noted that the total credit should have been 279 days (183 plus 96), and that Buys therefore received five days more credit than that to which he was entitled. The State waived the discrepancy.
[3]  I.C. § 19-2602 states:

If it is proved to the satisfaction of the court that the terms and conditions upon which the defendant was placed on probation by the court or any of them have been violated or for any other cause satisfactory to the court, the court may, at any time within the longest period for which the defendant might have been originally sentenced by judgment of the court, issue a bench warrant for the rearrest of the defendant.
[4]  I.C. § 19-2603 states:

When the defendant is brought before the court in such case, it may, if judgment has been withheld, pronounce any judgment which it could originally have pronounced, or, if judgment was originally pronounced but suspended, the original judgment shall be in full force and effect and may be executed according to law, and the time such person shall have been at large under such suspended sentence shall not be counted as a part of the term of his sentence, but the time of the defendant's sentence shall count from the date of service of such bench warrant. (Emphasis added.)
