
738 P.2d 769 (1987)
Roger ENDELL, Commissioner, Alaska Dept. of Corrections, Appellant,
v.
James E. JOHNSON, Appellee.
No. A-1718.
Court of Appeals of Alaska.
June 26, 1987.
*770 David Mannheimer, Asst. Atty. Gen., Office of Special Prosecutions and Appeals, Anchorage, and Ronald W. Lorensen, Acting Atty. Gen., Juneau, for appellant.
Amy Spare, Asst. Public Defender, and Dana Fabe, Public Defender, Anchorage, for appellee.
Before BRYNER, C.J., COATS and SINGLETON, JJ.

OPINION
BRYNER, Chief Judge.
James E. Johnson pled no contest and was convicted of driving while intoxicated (DWI) and driving while his license was suspended (DWLS). District Court Judge Michael L. Wolverton sentenced Johnson to 360 days in jail with 300 days suspended on the DWI charge and to 360 days with 270 days suspended on the DWLS charge. The sentences were to run concurrently. Johnson served the unsuspended portion of the sentences and was released on probation.
Johnson was arrested on new charges of DWI and driving while his license was revoked (DWLR) on September 16, 1985, and eventually pled no contest. He remained in custody on the new charges from the date of his arrest through his sentencing date, on January 20, 1986. On that date, District Court Judge Martha Beckwith sentenced Johnson to a term of 365 days with 90 days suspended for DWI and to a consecutive term of 365 days with 275 days suspended for DWLR.
Because of the new DWI and DWLR charges, the state also filed a petition to revoke Johnson's probation on his earlier DWI and DWLS convictions. A warrant was served on Johnson in jail on December 5, 1985, in connection with the probation revocation action. On February 5, 1986, about two weeks after Judge Beckwith sentenced Johnson on the new DWI and DWLR charges, Judge Wolverton revoked Johnson's probation on the earlier charges and ordered him to serve 180 days of the previously suspended sentence. The 180-day term was made consecutive to the sentence Judge Beckwith imposed for the new charges.
After serving the unsuspended portion of his sentence on the new DWI and DWLR charges, Johnson petitioned the superior court for a writ of habeas corpus. Johnson claimed that the time he had spent in jail prior to sentencing had only been credited against his sentence for the new DWI and DWLR convictions, and that he had been given no credit against his 180-day probation violation sentence for the time he had served between the date of his arrest on the probation violation charges  December 5, 1985, and the date of his sentencing on those charges  February 5, 1986. Johnson claimed that, under AS 12.55.025(c), he was entitled to have this period of time credited against the sentences he received in both his new and old cases. In response to Johnson's argument, the state maintained that, because Johnson's sentences in the new and old cases had been imposed consecutively, he was precluded under AS 12.55.025(c) from receiving credit for time served in both cases. According to the state, Johnson was entitled to credit only against the aggregate of his sentences.
Following a hearing, Superior Court Judge Karen L. Hunt granted Johnson's petition and ordered that he be credited in the probation revocation case with the time he had served from the date of his arrest in that case through the date of his sentencing on the new charges. The state has appealed Judge Hunt's ruling, arguing that *771 AS 12.55.025(c) must be interpreted to allow credit only against the aggregate of Johnson's consecutive terms.
Alaska Statute 12.55.025(c) provides:
Except as provided in (d) and (e) of this section, when a defendant is sentenced to imprisonment, the term of confinement commences on the date of imposition of sentence. A defendant shall receive credit for time spent in custody pending trial, sentencing, or appeal, if the detention was in connection with the offense for which sentence was imposed. A defendant may not receive credit for more than the actual time spent in custody pending trial, sentencing, or appeal. The time during which a defendant is voluntarily absent from official detention after the defendant has been sentenced may not be credited toward service of the sentence.
While the precise issue raised in the present case has never been addressed in Alaska, courts of other jurisdictions, construing similar credit-for-time-served statutes, have uniformly held that, when consecutive sentences are imposed for two or more offenses, periods of presentence incarceration may be credited only against the aggregate of all terms imposed: an offender who receives consecutive sentences is entitled to credit against only the first sentence imposed, while an offender sentenced to concurrent terms in effect receives credit against each sentence. See, e.g., United States ex rel. Derengowski v. United States Attorney General, 457 F.2d 812 (8th Cir.1972); State v. Cruz-Mata, 138 Ariz. 370, 674 P.2d 1368 (1983); State v. Hoch, 630 P.2d 143 (Idaho 1981); Simms v. State, 421 N.E.2d 698 (Ind. App. 1981); Cox v. State, 522 P.2d 173 (Kan. 1974); Commonwealth v. Carter, 10 Mass. App. Ct. 618, 411 N.E.2d 184 (1980); State v. Decker, 127 N.H. 468, 503 A.2d 796 (1985); State v. Aaron, 103 N.M. 138, 703 P.2d 915 (App. 1985); People ex rel. Bridges v. Malcolm, 44 N.Y.2d 875, 407 N.Y.S.2d 628, 379 N.E.2d 156 (1978); and Wilson v. State, 82 Wis.2d 657, 264 N.W.2d 234 (1978).
A contrary interpretation of AS 12.55.025(c) would be incompatible with the basic purpose of consecutive sentencing and might tend to defeat the intent of sentencing judges. Moreover, an interpretation contrary to that prevailing in other jurisdictions would lead to anomalous results. Offenders arrested on multiple charges who managed to secure release on bail and later received consecutive sentences would actually be penalized for posting bail; they would be required to serve the full length of their consecutive terms, whereas similarly situated offenders who did not post bail would be entitled to credit against each of their sentences.
In our view, there is nothing in the language of AS 12.55.025(c) that is inconsistent with the view uniformly adopted in other jurisdictions. Nor do we find that our prior decisions construing other aspects of this statute require a different view. See, e.g., Coates v. State, 721 P.2d 655 (Alaska App. 1986); Schwing v. State, 633 P.2d 311 (Alaska App. 1981). We conclude that the superior court erred in finding that AS 12.55.025(c) entitled Johnson to credit against each of his consecutive terms.[1]
We nevertheless recognize that the statutory language is to some extent ambiguous and that it may have been interpreted differently by Judge Wolverton when he decided to impose a consecutive 180-day sentence for Johnson's probation violation. The record is silent as to Judge Wolverton's understanding of the statute and as to his belief concerning the amount of credit Johnson would receive for the time he had previously served. It is possible that the judge decided to impose the consecutive 180-day sentence believing *772 that Johnson would receive credit for time served against that term, as well as against the term previously imposed for his new charges. Under the circumstances, we believe the interest of justice requires that Johnson be resentenced for the probation violation, in order to assure that his sentence reflects a correct understanding of the statute. On this narrow ground, we conclude that the superior court's order granting Johnson's petition for habeas corpus was appropriately entered.
The order of the superior court, as modified by the views expressed herein, is AFFIRMED. This case is REMANDED to the superior court for further proceedings consistent herewith.
NOTES
[1]  The substantial and uniform body of case law in other jurisdictions and the anomalous consequences of requiring separate credit against each of several consecutive sentences lead us to reject Johnson's argument to construe AS 12.55.025(c) narrowly, in favor of the accused. In rejecting this argument, we further note that the statute in question is primarily administrative in nature and is not truly penal. It neither defines an offense nor prescribes a punishment. There can be no legitimate claim that our interpretation of this statute could violate any reasonable reliance interest on Johnson's part.
