
139 P.3d 771 (2006)
143 Idaho 169
STATE of Idaho, Plaintiff-Respondent,
v.
Timothy M. COVERT, Defendant-Appellant.
No. 31988.
Court of Appeals of Idaho.
June 14, 2006.
Molly J. Huskey, State Appellate Public Defender; Diane M. Walker, Deputy Appellate Public Defender, Boise, for appellant.
Hon. Lawrence G. Wasden, Attorney General; Thomas R. Tharp, Deputy Attorney General, Boise, for respondent.
PERRY, Chief Judge.
Timothy M. Covert appeals from the district court's order denying his motion for credit for time served. We reverse and remand.
In December 2003, Covert pled guilty to possession of methamphetamine. I.C. § 37-2732(c)(1). The district court sentenced Covert to unified term of seven years, with a minimum period of confinement of three years. The district court retained jurisdiction for 180 days. After Covert successfully completed the retained jurisdiction program, the district court suspended Covert's sentence and placed him on probation for a period of four years.
*772 On January 25, 2005, Covert's probation officer discovered marijuana and a methamphetamine pipe in Covert's car and other paraphernalia in Covert's bedroom. The probation officer requested the assistance of a police officer, who arrested Covert for possession of a controlled substance and possession of drug paraphernalia. Covert was also arrested at the same time on an agent's warrant. On January 27, the probation officer filed a report alleging Covert had violated the terms of his probation. The probation officer indicated that Covert was being held in jail on an agent's warrant[1] and requested that the district court issue a bench warrant to replace the agent's warrant. On February 2, the district court issued a bench warrant, which was served on Covert on February 7. Covert admitted to violating the terms of his probation. On March 14, the district court revoked Covert's probation and imposed the previously suspended sentence.
Covert filed a motion for credit for time served. Covert alleged that he was entitled to credit for various periods of incarceration, which the district court granted. Covert also alleged that he was entitled to credit for the period between January 25 and March 14. The district court denied Covert's motion as to that period, concluding that "the Idaho Appellate Courts have ruled there shall be no credit given for time served in custody on probation violation." Covert appeals.
Whether the district court properly applied the law governing credit for time served is a question of law over which we exercise free review. State v. Brashier, 130 Idaho 112, 113, 937 P.2d 424, 425 (Ct.App. 1997). We defer to the trial court's findings of fact, however, unless those findings are unsupported by substantial and competent evidence in the record and are therefore clearly erroneous. State v. Davis, 139 Idaho 731, 734, 85 P.3d 1130, 1133 (Ct.App.2003).
If a probationer has been arrested for a probation violation, the defendant's incarceration from the time of service of the bench warrant will count as part of the sentence. See I.C. § 19-2603; State v. Lively, 131 Idaho 279, 280, 954 P.2d 1075, 1076 (Ct. App.1998). Thus, a defendant is entitled to credit for those periods of incarceration prior to disposition of a probation violation allegation, which were not served voluntarily as a condition of probation. Lively, 131 Idaho at 280-81, 954 P.2d at 1076-77. However, a defendant is not entitled to credit for time served after the commencement of probation if the incarceration was imposed as a condition of probation. State v. Banks, 121 Idaho 608, 610, 826 P.2d 1320, 1322 (1992); State v. Buys, 129 Idaho 122, 125-26, 922 P.2d 419, 422-23 (Ct.App.1996).
Covert contends that he was incarcerated as a result of the agent's warrant and, thus, he is entitled to credit for time served from January 25 until his sentence was imposed on March 14. The state concedes that Covert is entitled to credit for time served for the period of incarceration prior to disposition of the probation violation allegation. However, the state contends that Covert was not entitled to credit until the bench warrant was served and contests only the fourteen days between January 25 and February 7.
Section 19-2603 indicates that the time spent in custody following service of the bench warrant shall count toward the defendant's sentence. In Buys, the court entered an order providing for the defendant's incarceration for a period of thirty days to facilitate an investigation into an alleged probation violation. Although the defendant was arrested pursuant to a warrant in an unrelated case, he would have been eligible for release on bond if he had not been subject to the order requiring his incarceration for thirty days. This Court therefore concluded that the incarceration order had an effect upon the defendant's liberty and, in substance and effect, was a bench warrant for the defendant's arrest in connection with the alleged probation violation. Buys, 129 Idaho at 128, 922 P.2d at 425. Accordingly, the defendant was entitled to credit for time served on the incarceration order. Id.
Similarly, where the arresting officer delivers a probationer to the county jail with an agent's warrant, that warrant is sufficient for the detention of the probationer. I.C. § 20-227. *773 In this case, Covert was arrested for possession of a controlled substance and paraphernalia. Covert would have been eligible for release on bond in the possession case if not for the agent's warrant, which authorized the jail to detain him in this case. Thus, the agent's warrant was the functional equivalent of a bench warrant, and Covert was entitled to credit for time served between January 25 and March 14.
We conclude that the district court erred in denying Covert's motion for credit for time served as to the period he was awaiting disposition of the probation violation. Accordingly, we reverse the district court's order denying credit for time served and remand this case for an amended judgment awarding him said credit.
Judge LANSING and Judge GUTIERREZ, concur.
NOTES
[1]  The agent's warrant does not appear in the record on appeal.
