On March 28, 2001, the defendant pleaded guilty to two drug-related offenses1 and the trial judge sentenced him to five to six years at the the Massachusetts Correctional Institution at Cedar Junction on the first charge, and to two and one-half to three years on the second charge, to be served on and after completion of the first sentence. At sentencing, the defendant received credit for 286 days spent in custody awaiting trial. G. L. c. 279, § 33A. The trial judge stayed the defendant’s sentence until April 16, 2001, and simultaneously held the defendant without bail until that date. The defendant did not receive credit for the nineteen days during which his sentence was stayed but he was in custody. We agree that the *251judge should have allowed the defendant’s subsequent motion to correct the mittimus to reflect credit for these nineteen days.
The opposition of the Commonwealth is founded on its reading of G. L. c. 279, § 33A, as appearing in St. 1961, § 75, which states:
“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.”
Although the Commonwealth is correct in arguing that the language of the applicable statute provides that credit shall be granted to a defendant upon “imposing a sentence” only for time served “in confinement prior to such sentence awaiting and during trial,” the statute does not deal with the situation in which execution of the sentence is stayed but the defendant remains in custody by virtue of his bail being revoked during the stay. Here, where the statute does not strictly control, considerations of fairness and fair treatment of the defendant guide the determination whether to give jail credit. Commonwealth v. Grant, 366 Mass. 272, 275 (1974). Chalifoux v. Commissioner of Correction, 375 Mass. 424, 427-428 (1978). Commonwealth v. McLaughlin, 431 Mass. 506, 520 (2000). Commonwealth v. Boland, 43 Mass. App. Ct. 451, 453-454 (1997). We reject “an overly legalistic approach” toward jail credit matters, Manning v. Superintendent, Mass. Correctional Inst., Norfolk, 372 Mass. 387, 394 (1977), quoting from Brown v. Commissioner of Correction, 366 Mass. 718, 722 (1958), and rely on the “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.” Manning v. Superintendent, Mass. Correctional Inst., Norfolk, supra. See Commonwealth v. Carter, 10 Mass. App. Ct. 618, 620 (1980) (“statutory purpose [in providing jail credit] was to afford relief to persons who because of inability to obtain bail were held in custody”).
Here, there is obviously no claim or possibility that the *252defendant is banking time or getting double credit. Compare Manning v. Superintendent, Mass. Correctional Inst., Norfolk, 372 Mass. at 395-396; Commonwealth v. Milton, 427 Mass. 18, 24-25 (1998). There is a strong policy against defendants serving “dead time.” See Piggott v. Commissioner of Correction, 40 Mass. App. Ct. 678, 682 (1996). If denied credit for the time held in custody without the possibility of bail, the defendant would serve dead time for the relevant nineteen-day period.
The issue of the effect of a stay of execution of sentence on the time to be served was identified in Commonwealth v. McLaughlin, 431 Mass. at 514-515, in which the trial judge sentenced the defendant to prison and then stayed execution of the sentences until his release from civil commitment at Bridge-water State Hospital. The Supreme Judicial Court noted that the defendant was entitled to credit for time spent in custody (jail and hospital) before trial (between when the crimes occurred and when the sentences were imposed) and for time spent while serving his sentence (time committed to the hospital after he had started to serve his sentence). Ibid. This left uncredited a gap of time “between trial and execution of sentence .... To allow the denial of credit because of this fortuity would create an anomaly raising questions of basic fairness.” Id. at 515. Further, “[a] statutory scheme that permitted outcomes of this sort would raise difficult questions of due process and equal protection.” Ibid.2 Although McLaughlin dealt with the underlying context of civil commitment for mental illness, the reason*253ing is applicable to the present situation in which the trial judge stayed the execution of sentence, but simultaneously revoked bail, such that the defendant remained confined without the ability to obtain bail during that time.
The order denying the motion to correct the mittimus is reversed. A new order shall enter correcting the mittimus to reflect an additional nineteen days of jail credit.
So ordered.
Distribution or manufacture of a class B substance, second or subsequent offense (G. L. c. 94C, § 32A), and possession of a controlled substance near or within school property (G. L. c. 94C, § 32J).
In Commonwealth v. McLaughlin, 431 Mass. at 514, the Supreme Judicial Court held the stay was unwarranted, “without reaching any constitutional questions.” We need not rest our decision in this case on the legality of the stay of execution. It was represented at oral argument by the defendant (the Commonwealth did not argue) that the stay was granted at the defendant’s request to enable him to remain in custody outside the State prison system for some administrative complications. Although such requests are made from time to time under Mass.R.Crim.P. 31(a), 378 Mass. 902 (1979), the use of a stay of execution for this purpose, where the defendant is in custody and no appeal is pending, is of dubious validity and unnecessary. See Commonwealth v. McLaughlin, supra at 517-518. The purpose of permitting a defendant to remain briefly in his place of pretrial custody can be accomplished without the confusion created by the issuance of a stay by simply announcing the sentence and then deferring the imposition of sentence of the defendant until a stated date, at which time the defendant can be brought back into court and sentence there and then imposed.