This case presents the question whether a prisoner is entitled to credit on one criminal sentence for time served under another criminal sentence that was later vacated.
The plaintiff sought a declaratory judgment regarding the computation of time under the prison sentence he is currently serving in the Massachusetts Correctional Institution at Norfolk. The parties submitted a statement of agreed facts which a judge of the Superior Court adopted as his findings of fact. We summarize these facts as supplemented by the record that was before us in Commonwealth v. Manning, 367 Mass. 605 (1975).
On September 29, 1972, the plaintiff was charged by Norfolk County indictments (the Norfolk indictments) with assault with intent to rape and rape, assault and battery, sodomy, and the commission of an unnatural and lascivious act. On October 10, 1972, he pleaded not guilty to these charges and was released on bail.
On January 17, 1973, the plaintiff was arrested on an entirely separate charge which led to an indictment in Suffolk County (the Suffolk indictment), apparently for committing an unnatural and lascivious act. On that day he was remanded to the Suffolk County jail in lieu of bail, and he remained there for fourteen days, until January 31,1973.
From January 25 to February 1, 1973, he was tried and then found guilty by a Norfolk County jury on all four Norfolk indictments. He received sentences of from five to ten years on the rape charge, five to seven years to be served concurrently on the sodomy charge, and three to five years to be served concurrently on the unnatural and *389lascivious act charge. The assault and battery charge was filed. On February 1, 1973, the plaintiff was committed to the Massachusetts Correctional Institution at Walpole and began serving these Norfolk sentences. He meanwhile appealed these convictions.
On May 2,1974, the plaintiff was convicted on the unrelated Suffolk indictment. He was sentenced to a term of from three to five years, minus fourteen days’ credit under G. L. c. 279, § 33A, to be served from and after the Norfolk sentences.
All of the Norfolk sentences were reversed on appeal. On May 16, 1974, the conviction on the rape indictment was reversed by the Appeals Court because of erroneous evidentiary rulings. Commonwealth v. Manning, 2 Mass. App. Ct. 838 (1974). On May 2, 1975, the remaining convictions were reversed by this court for evidentiary errors. Commonwealth v. Manning, 367 Mass. 605 (1975).
On remand the plaintiff, on June 10, 1975, pleaded guilty to the Norfolk unnatural act charge and received a suspended sentence of from three to five years and two years’ probation to be served from and after the Suffolk sentence he was then serving.2
These facts have produced a whirlpool of argument about the computation of the plaintiff’s sentence. The defendants have given the plaintiff credit for time served after May 2,1974, when the Suffolk sentence was imposed, and they have also given him credit for the fourteen days served prior to the imposition of the Norfolk sentence. As recomputed, the plaintiff’s sentence is considered to have begun on April 18, 1974.3
*390The plaintiff argues that G. L. c. 279, § 33A, and G. L. c. 127, § 129B,4 entitle him to credit on the Suffolk sentence for the entire period of time served since his arrest and incarceration on the Suffolk indictment, that is, from January 17, 1973, to the present. He claims that the time served under the vacated Norfolk sentences, even though prior to the imposition of the Suffolk sentence on May 2, 1974, must be credited to the Suffolk sentence. His contention is that otherwise he will have served “dead time,” i.e., time served under an invalid sentence for which no credit is given. See Watson v. Henderson, 350 F. Supp. 249, 251 (N.D. Ga. 1972); Wagner, Sentence Credit for “Dead Time,” 8 Grim. L. Bull. 393 (1972).
The defendants argue that when the first of the two consecutive sentences was reversed, the second sentence took effect from the day of its imposition, May 2, 1974. Time served on the vacated sentences prior to the imposition of the second sentence, it is argued, cannot be the basis of credit toward the later Suffolk sentence. They assert, in effect, that this result is required by precedent and is necessary to prevent multiple credits for time that has already been once credited to the plaintiff’s ultimate suspended Norfolk sentence.
The trial judge adopted the defendants’ view by confirming their recomputation of April 18,1974, as the effective date of the Suffolk County sentence, and denying credit for the fifteen months served under the vacated Norfolk sentences. The plaintiff appealed to the Appeals Court, and we transferred the case on our own motion. *391G. L. c. 211A, § 10 (A). We reverse and order that the plaintiff’s sentence be recomputed to account for the time served under the invalidated Norfolk sentences.
The plaintiff’s argument depends largely on his reading of two statutes. General Laws c. 127, § 129B, as appearing in St. 1961, c. 74, provides as follows: “The sentence of any prisoner in any correctional institution of the commonwealth or in any house of correction or jail, who was held in custody awaiting trial shall be reduced by the number of days spent by him in confinement prior to such sentence and while awaiting trial, unless the court in imposing such sentence had already deducted therefrom the time during which such prisoner had been confined while awaiting trial” (emphasis added). Of like effect is G. L. c. 279, § 33A, as appearing in St. 1961, c. 75: “The court on imposing a sentence of commitment to a correctional institution of the commonwealth, a house of correction, or a jail, shall order that the prisoner be deemed to have served a portion of said sentence, such portion to be the number of days spent by the prisoner in confinement prior to such sentence awaiting and during trial” (emphasis added).
These statutes grant a prisoner credit for time served in jail up to the imposition of sentence. If the statutes are read literally, and the original Norfolk sentences are ignored, the plaintiff’s argument has force. He was arrested on a Suffolk charge on January 17,1973, and he remained in jail continuously until May 2, 1974, when he was convicted on that charge. Had no intervening, later vacated sentence been interposed, these two statutes would undoubtedly apply and would compel jail time credit (“days spent... ‘awaiting and during trial,’ ” G. L. c. 279, § 33A). See Commonwealth v. Grant, 364 Mass. 272, 274-276 (1974); 1955 Senate Doc. No. 750 at 75; Stearns, petitioner, 343 Mass. 53, 56 (1961) (“There can be no doubt that [G. L. c. 127] § 129B applies to the time spent in jail between the day of arrest and the day the indictment was reached for trial”). If the intervening Norfolk sentences had not existed, credit would be required as a matter of course.
*392If the intervening Norfolk sentences had been valid, however, there is equally no doubt that the plaintiff would not be entitled to have time served on the Norfolk sentences attributed to the “from and after” Suffolk sentence. In Needel, petitioner, 344 Mass. 260, 262 (1962), we held that the jail time credit statutes did not apply to confinement pursuant to a sentence for an unrelated crime: “The statutory purpose [of G. L. c. 127, § 129B] was not to allow deductions for time served under sentence for another crime, but was to afford relief to those not convicted and not serving any sentence but who because of inability to obtain bail, for example, were held in custody awaiting trial.” In Libby v. Commissioner of Correction, 353 Mass. 472 (1968), we relied on Needel, petitioner, supra, and refused to grant credit on a Norfolk County sentence for time spent in custody pursuant to a Suffolk County sentence on an unrelated charge. Had the original Norfolk sentences not been reversed, the plaintiff’s argument would have no merit in the present case.
No statute settles whether this case is to be treated as if the reversed sentences were never imposed or as if the reversed sentences are to be given some effect for the purpose of computing credit. Indeed, the defendants do not even address the plaintiff’s statutory argument in their brief. At the very least, however, the jail time credit statutes suggest a legislative policy of requiring automatic, and not discretionary, credit for time served5 if the statutes apply. While it is not so clear that these statutes were intended to provide credit where there is an intervening sentence, we confront this problem with a strong indication by the Legislature that a prisoner is entitled to credit for the time he has spent in prison.
Both parties seek support from Brown v. Commissioner of Correction, 336 Mass. 718 (1958). In the Brown case, *393the plaintiff was convicted on three Middlesex County indictments on May 13, 1952, and received three consecutive sentences, each from five to seven years. On September 23, 1952, he was convicted on five Suffolk indictments and was sentenced to five concurrent sentences, each from three to five years, to be served from and after the Mid-dlesex sentences. This court set aside the three Middlesex convictions in March of 1957. Brown pleaded guilty to two of the three Middlesex indictments on April 30, 1957, and was placed on probation for one year on each.
The question for decision was whether, as the plaintiff contended, the Suffolk sentences commenced when imposed on September 23, 1952, or, as the correctional officials contended, the Suffolk sentences commenced when the plaintiff ultimately pleaded guilty in April, 1957, following the reversal of the Middlesex convictions. We held that the Suffolk sentences began when imposed and that such a rule “is the better and more humane view, for only in this way can a prisoner receive credit, not as matter of grace, but as of right, for time served under an erroneous conviction.” Id. at 721.
By recomputing the plaintiff’s sentence as beginning when it was imposed, the defendants here have adhered to the letter of the Brown holding. Yet the Brown case did not require this court to reach the questions presented in this case. The relief sought in Brown was limited to credit from the imposition of the Suffolk sentences and that relief was sufficient. The plaintiff in Brown was entitled to immediate release based on that date, so the additional question of credit for time served before the imposition of sentence was not presented.6 Moreover, the Brown case was decided entirely on when a “from and after” sentence would commence, and was not concerned with the jail time credit statutes which strongly indicate *394the appropriateness of credit in the present circumstances.
Finally, in Brown v. Commissioner of Correction, this court rejected “an overly legalistic approach in matters of this sort,” id. at 722, and adopted a rule that would remedy the injustice of a prisoner serving time for which he receives no credit. Liberty is of immeasurable value; it will not do to read statutes and opinions blind to the possible injustice of denying credit.7
The defendants’ arguments against this result must be dealt with. The defendants argue that the judge clearly took into account the time served under the erroneous sentence when the plaintiff was resentenced on the Norfolk offense to three to five years, suspended, and placed on probation for two years. This statement has no support in the statement of agreed facts and we will not construct an irrebuttable presumption to that effect.8 There is no basis in the record for assuming that the suspended sentence can be accounted for by a grant of credit rather than, for example, by a plea bargain based on a reappraisal of the case after a substantial lapse of time. In any event, *395even if the judge took into consideration the time already served, two reasons, set forth in Brown v. Commissioner of Correction, supra, still require credit. First, without such a rule as we adopt, a defendant cannot insist on credit as a matter of right. Id. at 721. Second, consideration in resentencing would not provide credit where a prisoner is acquitted upon retrial of a case instead of pleading guilty as here. Id. The plaintiff here is serving a Suffolk sentence and it is the computation of that sentence that is disputed. There is no doubt that the plaintiff has received a sentence, albeit suspended, for the Norfolk charge. Whenever a defendant has served a portion of a sentence on a conviction which has been reversed and he is resentenced, the judge should take care to have the record disclose what consideration has been given to the time already served. This is even more important when other sentences have been imposed subsequent to the one which has been reversed. Nothing before us permits a decision that credit has already been given on any sentence. Hence, the argument that the plaintiff is receiving a windfall or double credit must fail.
The defendants also seem to argue that the result we reach permits a prisoner to “bank time” against future offenses.9 This indeed would be a matter of concern; it is not our intention to grant prisoners license to commit future criminal acts with immunity. Indeed, the fear of authorizing “a line of credit for future crimes,” Sills v. Peyton, mem. dec. 12,045 (4th Cir. 1968), as quoted in Miller v. Cox, 443 F.2d 1019, 1021 (4th Cir. 1971), has *396troubled a number of courts. See Meadows v. Blackwell, 433 F.2d 1298, 1299 (5th Cir. 1970); Tucker v. Peyton, 357 F.2d 115,118 (4th Cir. 1966); Sancinella v. Henderson, 380 F. Supp. 1393 (N.D. Ga.), aff’d, 502 F.2d 784 (5th Cir. 1974).
Such concerns are not appropriate here. The Suffolk crime, for which the defendants imply the plaintiff seeks to bank time, was committed before the plaintiff was incarcerated. Indeed, he was originally arrested and imprisoned first on the Suffolk charge, and then tried on the Norfolk charges. Credit allowed when the subsequent conviction is for an offense committed before the reversal of the first sentence in no way permits credit for future criminal acts. See Agata, Time Served Under A Reversed Sentence Or Conviction — A Proposal and A Basis for Decision, 25 Mont. L. Rev. 3, 46-47 (1963).
Finally, the defendants argue that “[n]o appellate court has ever held that a sentence consecutive to an invalid sentence can take effect prior to the date of its imposition.” This may be incorrect. See Lamb v. Page, 482 P.2d 615 (Okla. Crim. App. 1971). But see Floyd v. State, 540 P.2d 1195 (Okla. Crim. App. 1975); Anderson v. Anderson, 513 P.2d 345 (Okla. Crim. App. 1973); Martin v. Page, 484 P.2d 1319, 1321 (Okla. Crim. App. 1971). Cf. United States ex rel. DiRienzo v. New Jersey, 423 F.2d 224, 226-227 (3d Cir. 1970). More importantly, this statement misconstrues the problem. Of course no court would hold that a sentence takes effect before it is imposed. The problem is not when a sentence is imposed but rather what to do to or for a prisoner who has served time under a sentence that is reversed. The jail time credit statutes indicate legislative policy that credit be granted. Familiar equitable principles require an interpretation that does not leave a prisoner having served bad or dead time for which no credit is given. A prisoner who had proceedings free from error would have time served credited to a sentence. A prisoner should not be penalized or burdened by denial of a credit simply because he had successfully appealed a criminal conviction. North Carolina v. Pearce, 395 U.S. 711 *397(1969). See Whalen, Resentence Without Credit for Time Served: Unequal Protection of the Laws, 35 Minn. L. Rev. 239 (1951); Van Alstyne, In Gideon’s Wake: Harsher Penalties and the “Successful” Criminal Appellant, 74 Yale L.J. 606 (1965). The result we reach neutralizes the effect of the erroneous Norfolk sentences on the valid Suffolk sentence, and causes the plaintiff to serve no more and no less than he should pursuant to the Suffolk sentence.
A general rule of sentence credit, analogous to that which we deem appropriate as a matter of fairness in this particular case, has been adopted by the National Advisory Commission on Criminal Standards and Goals (1973),10 and by the American Bar Association in its Standards Relating to Sentencing Alternatives and Procedures (1968).* 11
The judgment is reversed and the case is remanded for further proceedings in accordance with this opinion.
So ordered.
The remaining Norfolk indictments were disposed of as follows: the assault and battery charge was filed after the plaintiff’s guilty plea; the rape and sodomy charges were filed with the plaintiff’s not guilty pleas left outstanding.
An abbreviated account of the sequence of events may clarify the controversy: 1. January 17 to February 1, 1973 (fourteen days). The plaintiff held in jail awaiting trial on the Suffolk charge. This period has been credited to the Suffolk sentence. 2. February 1, 1973. The Norfolk sentences were imposed. 3. February 1, 1973, to May 2, 1974 (456 days). The plaintiff held in custody following the Norfolk con*390victions. This period is in dispute. The plaintiff claims this time should be credited to his Suffolk sentence. 4. May 2, 1974. The plaintiff convicted on the Suffolk charge. The defendants claim this day, with fourteen days’ credit, is when the plaintiff began serving the Suffolk sentence. 5. May 16, 1974; May 2, 1975. Norfolk convictions reversed by the Appeals Court and by the Supreme Judicial Court, respectively. 6. June 10, 1975. On remand, the plaintiff pleaded guilty to two Norfolk charges, sentenced on one charge to three to five years suspended, from and after the Suffolk sentence.
While the plaintiff’s complaint asserted sundry constitutional claims, those claims have not been argued or briefed and will not be considered.
General Laws c. 279, § 33A, inserted by St. 1955, c. 770, § 101, permitted the sentencing court to grant credit “in its discretion.” Statute 1958, c. 173, removed this discretion by adding the current imperative language.
One commentator suggested at the time that Brown be extended to “award credit for time served from the commencement of a prior erroneous conviction” (emphasis in original). Note, 38 B.U.L. Rev. 623, 625 (1958).
The classic language in King v. United States, 98 F.2d 291, 293-294 (D.C. Cir. 1938), though not squarely applicable to the facts of this case, bears repetition: “The Government’s brief suggests, in the vein of The Mikado, that because the first sentence was void appellant ‘has served no sentence but has merely spent time in the penitentiary;’ that since he should not have been imprisoned as he was, he was not imprisoned at all. The brief deduces the corollary that his non-existent punishment cannot possibly be ‘increased.’ As other corollaries it might be suggested that he is liable in quasi-contract for the value of his board and lodging, and criminally liable for obtaining them by false pretenses. We cannot take this optimistic view.”
Both parties agreed at oral argument that a remand to inquire whether the trial judge silently gave credit was inappropriate in this case. See the cases under the Federal sentence crediting statute, 18 U.S.C. §3568 (1970), on the matter of presumptions. Stapf v. United States, 367 F.2d 326, 330 (D.C. Cir. 1966) (“Wherever it is possible, as a matter of mechanical calculation, that credit could have been given, we will conclusively presume it was given”). Swift v. United States, 436 F.2d 390, 392 (8th Cir. 1970), cert. denied, 403 U.S. 920 (1971). Holt v. United States, 422 F.2d 822, 823 (7th Cir. 1970). Brotherton v. United States, 420 F.2d 1357 (10th Cir. 1970). But see Faye v. Gray, 541 F.2d 665, 667-668 (7th Cir. 1976); Padgett v. United States, 387 F.2d 649 (4th Cir. 1967). Many cases are collected in Durkin v. Davis, 538 F.2d 1037,1039-1040 (4th Cir. 1976).
In Bauers v. Yeager, 261 F. Supp 420, 424 (D.N.J. 1966), the court stated: “[T]he situation could be created wherein a person might have several years of prison time to apply to a sentence for a crime that he has not yet committed or for which he has not yet been prosecuted.” In Davis v. Attorney Gen., 432 F.2d 777, 778 (5th Cir. 1970), the court stated that “[t]he basis of appellant’s contention is that while serving time under an invalid sentence he managed to earn credit against a future unrelated sentence for a crime not yet perpetrated. We cannot accept such a proposition. An allowance for prison time previously served under a void commitment does not reduce sentences imposed as a result of new and different crimes.”
Standard §5.8 (2) provides that “[w]here an offender is serving multiple sentences, either concurrent or consecutive, and he successfully invalidates one of the sentences, time spent in custody should be credited against the remaining sentence.”
Standard § 3.6 (c) provides that “[i]f a defendant is serving multiple sentences, and if one of the sentences is set aside as the result of direct or collateral attack, credit against the maximum term and any minimum term of the remaining sentences should be given for all time served since the commission of the offenses on which the sentences were based.”