¶ 1. Joseph Trepanier appeals a judgment convicting him of burglary and an order denying postconviction relief. The sole issue on appeal is whether Trepanier is entitled to additional sentence credit. The circuit court awarded Trepanier ten days of sentence credit, but it concluded he was not entitled to credit for 161 days during which he was unable to make cash bail on the burglary charge while he was also confined pursuant to a civil commitment order for contempt of court.1
¶ 2. We conclude that, even though Trepanier was in custody pursuant to the civil commitment order during the relevant 161 days, the custody was also in connection with the course of conduct for which the *664burglary sentence was imposed. Trepanier was therefore entitled to credit against the burglary sentence under Wis. Stat. § 973.155(l)(a).2 Accordingly, we reverse that portion of the judgment awarding Trepanier only ten days of sentence credit and the entirety of the order denying postconviction relief, and we remand with directions that the circuit court amend the judgment to reflect a total of 171 days of sentence credit against the burglary sentence.
BACKGROUND
¶ 3. Trepanier was arrested for burglary on November 11, 2012, and was placed in custody at the Sawyer County Jail. On November 12, cash bail was set at $500. At a bail modification hearing on November 20, Trepanier asked the circuit court to modify bail to a signature bond. The court denied Trepanier's request, based on his history of absconding from probation.
¶ 4. The following day — November 21, 2012 — a contempt hearing was held in an unrelated matter, Sawyer County case No. 2010CM59. In that case, a civil commitment order had been issued against Trepanier on March 9, 2012, for failure to pay a fine. Trepanier was found in contempt for nonpayment of the fine on April 18, 2012. Another commitment order was issued on October 25, 2012, due to Trepanier's continued failure to pay. At the November 21 hearing, the court imposed a six-month jail term as a sanction for Trepanier's continued nonpayment, with a purge condition requiring him to pay $1000. Trepanier began serving the six-month jail term immediately following the November 21 hearing.
*665¶ 5. A second bail modification hearing was held in the instant case on February 12, 2013. Trepanier asked the circuit court to reduce his cash bail to $250 or modify bail to a signature bond. The court denied those requests, based on Trepanier's "significant criminal history" and history of absconding. Trepanier subsequently pled no contest to the burglary charge on February 26.
¶ 6. At the sentencing hearing on April 30, 2013, defense counsel initially asserted Trepanier was entitled to sentence credit for the 171 days between his November 11, 2012 arrest and the date of sentencing. However, counsel subsequently conceded Trepanier was entitled to only ten days of credit because, beginning on November 11, 2012, Trepanier was "sitting on a contempt citation." The circuit court ultimately imposed and stayed a sentence of six years' initial confinement and six years' extended supervision and placed Trepanier on probation for six years, with one year of conditional jail time. Consistent with defense counsel's concession, the court awarded Trepanier ten days of sentence credit against both the underlying sentence and the conditional jail time.
¶ 7. After sentence was imposed, the prosecutor expressed "confus[ion]" about the amount of sentence credit, stating, "I'm not sure that the fact that [Trepanier] is sitting [on a civil commitment] . . . stops him from getting credit on this one because I believe he was sitting on a cash bond." In response, defense counsel stated, "He was on a cash bond. So if — I would ask that if the law allows him to have credit for that I would ask him to get credit. I mean, unless the contempt was made consecutive to this which I don't think it could be . .. ." The circuit court then interjected:
*666Well I tell you what. This sentence is consecutive to any contempt sentence that Mr. Trepanier has been serving. The time that he has spent in custody is first attributable to any contempt sentences that he was serving....
Mr. Trepanier has been not satisfying court obligations. He has not been looking for work. He has basically been doing drugs and stealing from people and not taking care of business like he is supposed to. No, this sentence is consecutive to any period of detention that he has been ordered to do previously as a contempt of court. So he only has 10 days['] credit in this matter. That is entirely appropriate.
¶ 8. Trepanier later moved for postconviction relief, requesting 161 additional days of sentence credit. The court denied Trepanier's motion, explaining the purpose of the commitment order was to coerce payment of Trepanier's unpaid fine, and to "credit [Trepanier's] time in custody against both the commitment order and the conditional jail time ... would completely obliterate" that purpose. Trepanier now appeals.
DISCUSSION
¶ 9. Application of the sentence credit statute, Wis. Stat. § 973.155, to a set of undisputed facts presents a question of law that we review independently. State v. Dentici, 2002 WI App 77, ¶ 4, 251 Wis. 2d 436, 643 N.W.2d 180. Under § 973.155(l)(a), a convicted offender is entitled to "credit toward the service of his or her sentence for all days spent in custody in connection with the course of conduct for which sentence was imposed."3
¶ 10. Here, it is undisputed that Trepanier was "in custody" for the full 171-day period between his *667November 11, 2012 arrest on the burglary charge and his April 30, 2013 sentencing. See Wis. Stat. § 973.155(l)(a). However, because Trepanier was also in custody pursuant to the unrelated civil commitment beginning on November 21, 2012, the State argues 161 days of Trepanier's presentence custody were not "in connection with the course of conduct" for which the burglary sentence was imposed. See id. The State therefore asserts the circuit court properly awarded Trepanier only ten days of sentence credit.4
*668¶ 11. Whether an offender is entitled to sentence credit for days of presentence custody during which the offender was also in custody pursuant to an unrelated civil commitment appears to be an issue of first impression. The State argues an offender is not entitled to credit under these circumstances pursuant to the rules articulated in State v. Boettcher, 144 Wis. 2d 86, 423 N.W.2d 533 (1988), and State v. Beets, 124 Wis. 2d 372, 369 N.W.2d 382 (1985). We agree with Trepanier that the State's reliance on Boettcher and Beets is misplaced.
¶ 12. The defendant in Boettcher was convicted of burglary. Boettcher, 144 Wis. 2d at 87. A three-year sentence was imposed and stayed, and the defendant was placed on probation. Id. The defendant was later arrested on a probation hold warrant for possessing a firearm in violation of his probation, and he was subsequently charged with being a felon in possession of a firearm. Id. at 88. He was released from custody on the firearm charge on a signature bond, but he remained in custody on the probation hold. Id. About three months after his arrest, his probation was revoked and he began serving his original three-year sentence on the burglary charge, with 100 days of sentence credit for the period from his arrest to the date of revocation. Id. at 88-89. Two days after his revocation, the defendant pled no contest to the firearm charge and received a one-year sentence, consecutive to the burglary sentence. Id. at 89. The circuit court awarded the defendant no credit against his sentence on the firearm charge. Id.
¶ 13. On appeal, the supreme court agreed the defendant was not entitled to credit against his sentence on the firearm charge, stating:
We conclude that dual credit is not permitted — that the time in custody is to be credited to the sentence first *669imposed — and that, where the sentences are consecutive, the total time to be served is thus reduced by the number of days in custody as defined by [Wis. Stat. § 973.155]. Credit is to be given on a day-for-day basis, which is not to be duplicatively credited to more than one of the sentences imposed to run consecutively.
Boettcher, 144 Wis. 2d at 87. The court further explained:
[C]ustody credits should be applied in a mathematically linear fashion. The total time in custody should be credited on a day-for-day basis against the total days imposed in the consecutive sentences. For ease in calculation and clarity in respect to subsequent exercise of court discretion, the credits should be applied to the sentence that is first imposed.
Id. at 100.
¶ 14. Boettcher stands for the proposition that, when an offender is serving consecutive sentences, he or she is entitled to sentence credit for a period of presentence confinement that is connected to both sentences only against the first sentence imposed. See State v. Wolfe, 2001 WI App 66, ¶ 5, 242 Wis. 2d 426, 625 N.W.2d 655. The State argues Boettcher applies here because Trepanier's burglary sentence was consecutive to his civil commitment. However, in Boettcher, the defendant sought sentence credit for a period when he was sitting in pretrial custody in two separate cases. Here, Trepanier seeks sentence credit for a period when he was sitting in pretrial custody in the burglary case and was simultaneously serving a civil commitment in an unrelated case. Thus, unlike the defendant in Boettcher, Trepanier is not seeking credit against consecutive confinements for a period he spent in pretrial custody in two separate cases. Boettcher is therefore inapplicable.
*670¶ 15. The State next argues Trepanier's request for additional sentence credit is foreclosed by Beets. There, Beets was on probation resulting from two convictions for delivery of a controlled substance. Beets, 124 Wis. 2d at 374. After May 5, 1982, he failed to report to probation authorities. Id. On June 26, 1982, he was arrested for burglary and taken into custody. Id. "Within a few days," he was also in custody on a probation hold, and on August 4, 1982, his probation was revoked. Id. at 374-75. On September 10, 1982, Beets was sentenced on the drug charges to concurrent three-year prison terms. Id. at 375. He was given credit against his sentences for the seventy-eight days from his June 26 arrest until the September 10 sentencing. Id.
¶ 16. Thereafter, Beets pled guilty to the burglary charge and was sentenced to a three-year prison term, concurrent with his sentences on the drug charges. Id. He was granted credit against his sentence on the burglary charge for the seventy-eight days from his June 26 arrest until his September 10 sentencing on the drug charges. Id. On appeal, Beets argued he was entitled to an additional 192 days of credit for "the period subsequent to his sentencing on the drug charges while he was awaiting, in prison, a hearing on the pending charge of burglary." Id. Beets reasoned that, even after the drug sentences were imposed, his custody remained "in connection with" the burglary because the burglary formed part of the basis for his probation revocation. Id. at 376.
¶ 17. The supreme court concluded Beets was not entitled to any additional sentence credit. The court explained:
[A]ny connection which might have existed between custody for the drug offenses and the burglary was *671severed when the custody resulting from the probation hold was converted into a revocation and sentence. From that time on, Beets was in prison serving an imposed and unchallenged sentence; and whether he was also awaiting trial on the burglary charge was irrelevant, because his freedom from confinement — his right to be at liberty — was not in any way related to the viability of the burglary charge. His ability to make bail on the burglary charge became immaterial. Even had the burglary charge been dismissed, he would still have been in confinement. Thus, there is no logical reason why credit should be given on the burglary charge for his service of sentence on a separate crime.
Id. at 379.
¶ 18. Under Beets, a defendant is not entitled to sentence credit for periods of presentence custody during which the defendant was serving an unrelated sentence. The State argues Beets applies to this case because Trepanier's civil commitment, like a sentence, severed any connection between Trepanier's custody and the course of conduct for which the burglary sentence was imposed. Trepanier, in turn, argues Beets is inapplicable because a civil commitment is not a sentence. See State v. Way, 113 Wis. 2d 82, 85-87, 334 N.W.2d 918 (Ct. App. 1983).
¶ 19. Although we ultimately agree with Trepanier that Beets is inapplicable, we reject his assertion that Beets does not apply because a civil commitment is not a sentence. Both this court and the supreme court have extended Beets to preclude sentence credit in cases where presentence custody was interrupted by an intervening period of custody that was not, technically, a sentence. See State v. Johnson, 2007 WI 107, ¶¶ 61, 63, 304 Wis. 2d 318, 735 N.W.2d 505 (applying Beets to preclude sentence credit for a period when the defendant was in custody pursuant to *672an unrelated juvenile commitment, which was not a sentence); State v. Harr, 211 Wis. 2d 584, 596, 568 N.W.2d 307 (Ct. App. 1997) (applying Beets to preclude sentence credit for a period when the defendant was committed after being adjudged not guilty by reason of insanity (NGI) of an unrelated crime, even though the NGI commitment was not a sentence). Accordingly, that a civil commitment is not a sentence does not necessarily mean Beets is inapplicable.
¶ 20. Nevertheless, we conclude Beets does not apply because the main reason for the supreme court's holding there is not present here. The supreme court emphasized in Beets that, after the defendant was sentenced on the drug charges, he would have remained in custody pursuant to those sentences even if the firearm charge had been dismissed. Beets, 124 Wis. 2d at 379. Similarly, in Johnson, the supreme court reasoned the defendant was not entitled to credit against his sentence for battery because, even if the battery had never occurred, he would still have been in custody during the relevant time period pursuant to an unrelated juvenile commitment. Johnson, 304 Wis. 2d 318, ¶¶ 63, 69-70, 76.
¶ 21. Thus, in both Beets and Johnson, the supreme court relied on the fact that the defendants would have been in custody even absent the underlying criminal charges. Conversely, Trepanier would not necessarily have been in custody absent the burglary charge — he could have obtained release from custody by paying the civil commitment's $1000 purge condition. The civil commitment is therefore distinguishable from the sentence in Beets and the juvenile commitment in Johnson.
¶ 22. The circuit court concluded giving Trepanier credit against his burglary sentence for the *673161 days he was also subject to the commitment order would be improper under Way. There, we held a court has authority to make a civil commitment and a criminal sentence consecutive to one another, even though the civil commitment is not itself a sentence. Way, 113 Wis. 2d at 86-87. We explained the purpose of a civil commitment is to coerce payment of an unpaid fine, and "if courts do not have the authority to make commitments consecutive, then the statutory power to order commitment for nonpayment of a fine would be meaningless." Id. at 87. The circuit court reasoned granting Trepanier credit against his burglary sentence for time spent in custody on the civil commitment would similarly undermine the commitment order's coercive effect.
¶ 23. We disagree. From the date Trepanier began serving his six-month jail term under the civil commitment order until he was sentenced on the burglary charge, Trepanier had an incentive to pay the $1000 purge condition — doing so was one step he needed to take to be released from jail. That Trepanier also needed to pay his $500 cash bail on the burglary charge in order to be released does not obviate the civil commitment's coercive effect. This is not a situation in which Trepanier had no reason to pay the $1000 purge condition because doing so would have no effect on his ability to get out of jail. Further, because the circuit court made Trepanier's burglary sentence consecutive to the six-month jail term, the commitment continued to have a coercive effect after Trepanier was sentenced. Neither the circuit court nor the State has explained why it was also necessary to deny Trepanier sentence credit against his burglary sentence in order for the commitment to serve its coercive purpose.
*674¶ 24. In summary, we conclude Trepanier was entitled to credit against his burglary sentence for the full 171 days he spent in custody from the date of his arrest on the burglary charge until his sentencing. We therefore reverse that portion of the judgment awarding Trepanier only ten days of sentence credit and the entirety of the order denying postconviction relief, and we remand with directions that the court amend the judgment to reflect a total of 171 days of sentence credit.
By the Court. — Judgment reversed in part; order reversed and cause remanded with directions.
For the remainder of this opinion, when we use the term "civil commitment," we are referring to a civil commitment for contempt of court.
All references to the Wisconsin Statutes are to the 2011-12 version unless otherwise noted.
Wisconsin Stat. § 973.155(l)(a) provides in full:
*667A convicted offender shall he given credit toward the service of his or her sentence for all days spent in custody in connection with the course of conduct for which sentence was imposed. As used in this subsection, "actual days spent in custody" includes, without limitation by enumeration, confinement related to an offense for which the offender is ultimately sentenced, or for any other sentence arising out of the same course of conduct, which occurs:
1. While the offender is awaiting trial;
2. While the offender is being tried; and
3. While the offender is awaiting imposition of sentence after trial.
Trepanier repeatedly asserts the circuit court erred by granting him sentence credit under Wis. Stat. § 973.155(l)(a) against his civil commitment. He argues sentence credit under § 973.155(l)(a) can only be applied to a sentence, a civil commitment is not a sentence, and, as a result, the court should have given him credit against his sentence on the burglary charge.
We reject this argument because the circuit court did not grant Trepanier sentence credit under Wis. Stat. § 973.155(l)(a) against the civil commitment. The court simply noted the time Trepanier spent in custody had already been applied to his civil commitment. Trepanier's assertion that § 973.155(l)(a) does not allow sentence credit to be awarded against a civil commitment is therefore irrelevant. The dispositive issue is whether, due to the civil commitment, Trepanier's custody ceased to be in connection with the course of conduct for which the burglary sentence was imposed.