
554 A.2d 656 (1988)
STATE of Vermont
v.
Dean COE.
In re Dean COE.
Nos. 87-537, 88-239.
Supreme Court of Vermont.
September 30, 1988.
*657 Walter M. Morris, Jr., Defender Gen., and William A. Nelson, Appellate Defender, Montpelier, for petitioner-appellant.
Philip Danielson and Robert Andres, Chittenden County Deputy State's Attys., Burlington, for respondent-appellee.
Before ALLEN, C.J., PECK and DOOLEY, JJ., BARNEY, C.J. (Ret.) and ELLISON, District Judge, Specially Assigned.
ALLEN, Chief Justice.
These consolidated appeals raise the question whether a defendant is entitled to sentence credit, following probation revocation, for time spent incarcerated in another jurisdiction on the charge that led to the revocation. Defendant was denied such credit in both the district and superior courts, and this appeal followed.
On December 9, 1983, after pleading guilty to sexual assault, defendant was sentenced to a term of three to five years, all suspended but eight months with an order of probation. He was released on probation on March 2, 1984, under the condition, among others, that he not be convicted of another crime. Probation was subsequently transferred to New York, defendant's home state. On September 4, 1985, defendant was convicted of assault on an unrelated New York charge, and Vermont authorities were notified of the conviction on September 30. A probation violation complaint was filed, but no Vermont arrest warrant was obtained until December 20, 1985; this warrant was sent to New York authorities on January 9, 1986. Upon completion of his New York sentence, defendant was returned to Vermont on or about March 24, 1986, and incarcerated pending the probation violation proceedings.
On May 13, 1986, defendant's probation was revoked by the Chittenden District Court, and he was ordered to serve the balance of his previously suspended three to five year term. He requested credit for the time he had served in New York, but this request was denied.
While his appeal from the district court's ruling was still pending, defendant filed a petition for post-conviction relief in the Chittenden Superior Court, again seeking credit for the time he had been incarcerated following his New York conviction for assault. The superior court denied the petition on the ground that the issue had been waived through counsel's failure to argue the same theory in the district court. Defendant appealed from the decision of the superior court, and his subsequent motion to consolidate the two appeals was granted.

I.
The primary issue presented on appeal is whether Vermont's presentence credit statute, 13 V.S.A. § 7031(b), entitles defendant to sentence credit for the time he was incarcerated in New York following his conviction for assault.[1] Section 7031(b) provides that:

*658 The sentence of imprisonment of any person convicted of an offense shall commence to run from the date on which the person is received at the correctional facility for service of the sentence. The court shall give the person credit toward service of his sentence for any days spent in custody in connection with the offense for which sentence was imposed.
(Emphasis added). Defendant's argument is two-fold. First, he maintains that, because his New York incarceration was attributable in part to the Vermont arrest warrant, he should be given credit from the date of the warrant, December 20, 1985, until his return to Vermont on March 24, 1986, a total of ninety-five days. Second, he contends that he should also be credited with all days spent in the New York jail after his conviction on September 4, 1985, because Vermont authorities were fully apprised of the conviction and delayed probation violation proceedings deliberately in order to deny him the presentence credit.
Defendant's claims depend upon the meaning of the words "in connection with" as they are used in § 7031(b). In In re Lampman, 135 Vt. 226, 373 A.2d 547 (1977), this Court considered the statute's application in another context. There, the defendant had been serving a prison sentence in a state correctional facility when he escaped; he was apprehended, arraigned on the escape charge, and pleaded not guilty. Bail was set, but the defendant could not meet it. Twenty days later, he changed his plea and was sentenced to a term of one to two years, to be served concurrently with the sentence he had already been serving. No credit against the new sentence was given, however, for the twenty day period of incarceration preceding sentencing. The defendant petitioned for sentence review, citing § 7031(b), but the superior court denied relief. This Court reversed on the basis of the plain meaning of the statute, observing that:
The 20 days here in question, even though part of a previous sentence, were also spent in custody in connection with the escape charge. . . . The detention was not solely attributable to want of bail [on the escape charge], but it was certainly in connection with such want, and within the terms of the statute. By way of illustration, a pardon for the first offense, however unlikely, would not have released appellant from detention. . . .
Id. at 228, 373 A.2d at 548 (emphasis in original). Defendant here notes thatafter the Vermont warrant was issueda New York pardon for his assault conviction would not have released him from detention, and he urges that Lampman therefore establishes his claim for presentence credit.
We believe that defendant's contention pushes the "plain meaning" of the presentence credit statute too far. Where incarceration in another jurisdiction is involved, and where that incarceration results from conviction of an entirely unrelated offense, the meaning of the phrase "in connection with" is not at all plain.
In such circumstances, the federal courts and several state courts have applied a "sole basis" rule in multiple jurisdiction sentence credit cases. The federal presentence credit statute, like Vermont's, provides that a criminal defendant shall be given "credit toward service of his sentence for any days spent in custody in connection with the offense or acts for which sentence was imposed." 18 U.S.C.A. § 3568 (emphasis added). The federal courts have held that a federal prisoner cannot be given credit for time spent in state custody on an unrelated charge unless "`the continued state confinement [is] exclusively the product of such action by federal law-enforcement officials as to justify treating the state jail as the practical equivalent of a federal one.'" United States v. Winter, 730 F.2d 825, 826 (1st *659 Cir.1984) (quoting Shaw v. Smith, 680 F.2d 1104, 1106 (5th Cir.1982)). If, for example, a federal detainer becomes the sole basis for continued state custody, then the prisoner is entitled to credit against the subsequent federal sentence. Id. at 826-27; see also Davis v. Attorney General, 425 F.2d 238, 240 (5th Cir.1970) (if defendant is denied release on state bail because of a federal detainer, then the continued custody is "in connection with" the federal offense); and Annotation, When Is Federal Prisoner Entitled, Under 18 USCS § 3568, to Credit for Time Spent in State Custody "In Connection With" Offense or Acts for which Federal Sentence Was Imposed, 47 A.L.R.Fed. 755 (1980).
Most state courts that have decided this question have applied a similar rule under their presentence credit statutes. See State v. Horrisberger, 133 Ariz. 569, 570, 653 P.2d 26, 27 (Ct.App.1982) (where defendant was in custody of other states on charges brought in those states, "holds" placed by Arizona were irrelevant under sentence credit statute because defendant was never able to satisfy conditions of release imposed by other states); State v. Akbar, 419 N.W.2d 648, 650 (Minn.Ct.App. 1988) (sentence credit is not allowed for time spent in out-of-state incarceration unless such incarceration is solely in connection with the Minnesota offense) (citing State v. Brown, 348 N.W.2d 743, 748 (Minn.1984)); Keffer v. Reid, 100 A.D.2d 549, 550, 473 N.Y.S.2d 479, 480 (1984) (where defendant seeks sentence credit for jail time spent in another jurisdiction, he must demonstrate that the custody resulted solely from a New York detainer); and Commonwealth v. Bortner, 230 Pa.Super. 64, 67, 326 A.2d 622, 623 (1974) (if defendant is detained in another state solely by reason of Pennsylvania charge and not by reason of separate charges in the other state, then he is entitled to presentence credit). But see People v. Ranson, 153 Mich.App. 157, 161, 395 N.W.2d 271, 273 (1986) (even though defendant was incarcerated in another state on unrelated charges, he is entitled to credit for time served in that state from the date that Michigan authorities placed a "hold" on him).
We adopt the "sole basis" rule. Where a Vermont defendant seeks presentence credit for days spent in custody in another jurisdiction, he bears the burden of establishing that the charge on which sentence is imposed was the sole basis of the custody at issue. See Keffer, 100 A.D.2d at 550, 473 N.Y.S.2d at 480. Here, defendant is entitled to credit for all days he spent in custody following the completion of his New York sentence. Because the record is not clear as to when that sentence was completed, we remand the case to ensure that the district court's sentence credit calculations are correct under the rule we adopt.

II.
Defendant also invokes constitutional guarantees of due process and prompt justice. Once the rule we adopt is applied to the facts of this case, defendant will have been afforded all of the process he is due under the statute. Moreover, the "sole basis" rule leaves no room for abuse by state authorities, and it promotes prompt justice.[2]
Remanded to the district court for proceedings consistent with this opinion.
NOTES
[1]  We need not dwell upon the procedural grounds cited by the superior court in denying post-conviction relief. Although it is generally true that an objection to sentencing cannot be raised for the first time on appeal, State v. Nash, 144 Vt. 427, 435, 479 A.2d 757, 762 (1984), this rule does not apply where the claim is that the sentence itself is illegal. See State v. Sparks, 102 N.M. 317, 325, 694 P.2d 1382, 1390 (1985) ("unauthorized sentence issue is jurisdictional and can be raised for the first time on appeal."); State v. Ohnmacht, 342 N.W.2d 838, 843 (Iowa 1983) ("[v]oid sentences are not subject to the usual concepts of waiver . . . ."); and Dailey v. State, 471 So.2d 1349, 1350 (Fla. Dist. Ct. App. 1985) ("error of failure to credit jail time spent may be raised for the first time on direct appeal due to the mandatory requirement of [the presentence credit statute]. . . .").
[2]  Defendant also cites In re Hough, 143 Vt. 15, 458 A.2d 1134 (1983), and 13 V.S.A. § 7032(a) for the proposition that the district court was required to order that his reimposed Vermont sentence run concurrently with the New York sentence. We observe that neither Hough nor § 7032(a) have any application to a situation involving the criminal sanctions of another jurisdiction.
