
497 So.2d 603 (1986)
Ross AARON
v.
STATE.
7 Div. 703.
Court of Criminal Appeals of Alabama.
October 14, 1986.
Ross Aaron, pro se.
Charles A. Graddick, Atty. Gen., and J. Elizabeth Kellum, Asst. Atty. Gen., for appellee.
BOWEN, Presiding Judge.
This is an appeal from the denial of petition for writ of habeas corpus. Ross Aaron is an inmate at the St. Clair Correctional Facility serving sentences totaling 120 years for theft convictions in Jefferson County. He filed a habeas corpus petition seeking to have dismissed a detainer lodged against him by Calhoun County involving a charge of forgery.
The District Attorney of St. Clair County moved to dismiss the petition because, even if the requested relief were granted, Aaron was not entitled to immediate release. The circuit court granted the State's motion and dismissed the petition.
The petition was improperly dismissed. It has been stated that the long-established rule in this state is that habeas corpus is not available until the prisoner is entitled to immediate release. Ex parte Miller, 54 Ala.App. 590, 591, 310 So.2d 890 (1975). "Where a petitioner for the writ is held under another unsatisfied sentence the petition will be dismissed, for the issue of a *604 writ of habeas corpus and hearing thereon would be a futile and fruitless act because, by virtue of the prior unsatisfied sentence, the petitioner cannot be considered unlawfully detained and could not rightfully be enlarged." Phillips v. State, 40 Ala.App. 698, 701, 122 So.2d 551 (1960). See also Washington v. State, 405 So.2d 62, 65 (Ala. Cr.App.1981) (Bookout, J., dissenting).
That traditional rule has been eroded by the expansion of the constitutional guarantees of the convicted and imprisoned. Williams v. Davis, 386 So.2d 415 (Ala. 1980), held that a petition for writ of habeas corpus is the proper method by which an inmate can challenge a disciplinary hearing depriving him of good time credit even if the inmate would not be entitled to immediate release upon restoration of his good time. Fielding v. State, 409 So.2d 964, 965 (Ala.Cr.App.1981).
An accused's right to speedy trial remains undiminished even when he is already serving a prison sentence. Smith v. Hooey, 393 U.S. 374, 89 S.Ct. 575, 21 L.Ed.2d 607 (1969); Byrd v. Martin, 754 F.2d 963 (11th Cir.1985); Smith v. State, 409 So.2d 958 (Ala.Cr.App.1981).
"At first blush it might appear that a man already in prison under a lawful sentence is hardly in a position to suffer from `undue and oppressive incarceration prior to trial.' But the fact is that delay in bringing such a person to trial on a pending charge may ultimately result in as much oppression as is suffered by one who is jailed without bail upon an untried charge. First, the possibility that the defendant already in prison might receive a sentence at least partially concurrent with the one he is serving may be forever lost if trial of the pending charge is postponed. Secondly, under procedures now widely practiced, the duration of his present imprisonment may be increased, and the conditions under which he must serve his sentence greatly worsened, by the pendency of another criminal charge outstanding against him.
"And while it might be argued that a person already in prison would be less likely than others to be affected by `anxiety and concern accompanying public accusation,' there is reason to believe that an outstanding untried charge (of which even a convict may, of course, be innocent) can have fully as depressive an effect upon a prisoner as upon a person who is at large. Cf. Klopfer v. North Carolina, supra, 386 U.S. [213] at 221-222, 87 S.Ct. [988] at 992-993 [18 L.Ed.2d 1 (1967)]. In the opinion of the former Director of the Federal Bureau of Prisons,
"`[I]t is in their effect upon the prisoner and our attempts to rehabilitate him that detainers are most corrosive. The strain of having to serve a sentence with the uncertain prospect of being taken into the custody of another state at the conclusion interferes with the prisoner's ability to take maximum advantage of his institutional opportunities. His anxiety and depression may leave him with little inclination toward self-improvement.'
"Finally, it is self-evident that `the possibilities that long delay will impair the ability of an accused to defend himself' are markedly increased when the accused is incarcerated in another jurisdiction. Confined in a prison, perhaps far from the place where the offense covered by the outstanding charge allegedly took place, his ability to confer with potential defense witnesses, or even to keep track of their whereabouts, is obviously impaired. And, while `evidence and witnesses disappear, memories fade, and events lose their perspective,' a man isolated in prison is powerless to exert his own investigative efforts to mitigate these erosive effects of the passage of time." Smith, 393 U.S. at 378-80, 89 S.Ct. at 577-78, 21 L.Ed.2d at 611-12.
See Braden v. 30th Judicial Circuit Court of Kentucky, 410 U.S. 484, 489, n. 4, 93 S.Ct. 1123, 1126, n. 4, 35 L.Ed.2d 443 (1973) ("Since the Alabama warden acts here as the agent of the Commonwealth of Kentucky in holding the petitioner pursuant to the Kentucky detainer, we have no difficulty *605 concluding that petitioner is `in custody' for purposes of 28 U.S.C. § 2241(c)(3)."); Byrd v. Martin, 754 F.2d 963, 965 (11th Cir.1985) ("A prisoner may bring a [federal] habeas petition attacking a conviction in another state which may subject him to future custody in that state.").
Pending trial, the remedy for illegal confinement by reason of the erroneous postponements of trial is habeas corpus where a motion for discharge has been denied and no other remedy is available. Blake v. State, 448 So.2d 968, 969 (Ala.Cr. App.1984); 21A Am.Jur.2d Criminal Law § 871 (1981). From the allegations of Aaron's habeas corpus petition, his motion to dismiss has apparently been denied. Since there was no answer or return denying the allegations of fact in the petition, those allegations remain unrefuted and must be taken as true. Ex parte Hawkins, 475 So.2d 489, 491 (Ala.Cr.App.1985). He has no other remedy available.
Consequently, we hold that an intrastate detainer acts as a limited type of "custody" to which habeas corpus may be directed. This same principle is recognized regarding interstate detainers. In re Shapiro, 14 Cal.3d 711, 122 Cal.Rptr. 768, 537 P.2d 888, 890, n. 3 (1975).
The fact that Aaron would not be entitled to immediate release even if his petition were granted did not justify the dismissal of the habeas corpus petition. The judgment of the circuit court dismissing Aaron's petition is reversed. This cause is remanded for action not inconsistent with this opinion.
REVERSED AND REMANDED.
All Judges concur.
