
273 N.W.2d 177 (1979)
STATE of South Dakota, Plaintiff and Respondent,
v.
Albert LOOZE, Defendant and Appellant.
No. 12457.
Supreme Court of South Dakota.
Argued September 14, 1978.
Decided January 4, 1979.
Richard Wendt, Asst. Atty. Gen., Pierre, for plaintiff and respondent; William J. Janklow, Atty. Gen., Le Ann Larson Finke, Asst. Atty. Gen., Pierre, on the brief.
Steven W. Sanford, of Braithwaite & Cadwell, Sioux Falls, for defendant and appellant.
MORGAN, Justice.
The sole issue presented on this appeal is whether appellant was entitled to dismissal of the complaint against him for violation of his rights under the Interstate Agreement on Detainers (IAD) adopted by the legislature as Chapter 150 of the 1972 Session Laws and codified as SDCL Chapter 23-24A. The basis for his request for imposition of the sanction of dismissal is the failure of the state, having received custody of him under the IAD, to complete the prosecution of the state charge before he was returned to the federal authorities pursuant to a federal court's writ of habeas corpus ad prosequendum. We affirm the conviction.
*178 The factual background relevant to the issue is virtually undisputed. Appellant was charged by complaint, dated February 20, 1976, with having issued an insufficient funds check in excess of $100.00, in violation of SDCL 22-41-1.1. During the spring of 1976, appellant was incarcerated in the Federal Penal Facility at El Reno, Oklahoma. During that time, the State of South Dakota (State) filed a detainer with the El Reno prison officials. Subsequently, appellant was transferred to another federal facility in Odessa, Texas. He escaped from that facility and was eventually taken into custody in South Dakota. He was placed in the custody of the United States Marshal and incarcerated in the Minnehaha County Jail, Sioux Falls, South Dakota, pending transfer back to the El Reno facility. While he was so incarcerated, the State obtained from the Circuit Court of the Second Judicial Circuit, Minnehaha County, a writ of habeas corpus ad prosequendum addressed to the United States Marshal and the sheriff of Minnehaha County commanding them to produce appellant for proceedings in relation to the State's charge. Pursuant to this writ, appellant was arraigned in circuit court and a trial date was scheduled. During this period, he continued to be held in federal custody in the Minnehaha County Jail. Prior to the trial date, the United States District Court for the Western District of Texas, Midland-Odessa Division, issued a writ of habeas corpus ad prosequendum to the United States Marshal in South Dakota requiring production of appellant for proceedings in Midland, Texas, on the escape charge. The writ further directed that the prisoner be returned to the custody of the United States Marshal, Sioux Falls, South Dakota, upon termination of the Texas proceedings. Pursuant to the federal writ, appellant was taken to Texas where he pled guilty to the escape charge and was again sentenced to the El Reno Federal Penal Facility. He was held there until he was returned to South Dakota in November to stand trial. He then remained in the Minnehaha County Jail until his transfer to the South Dakota State Penitentiary after his conviction in January, 1978.
The IAD has been adopted in nearly every state and in the federal jurisdiction. While this is a case of first impression before this Court, numerous cases have been written on the various aspects of the IAD, most of which agree that it is designed "[t]o implement the right to a speedy trial and to minimize the interference with a prisoner's treatment and rehabilitation ...."[1]
The IAD is triggered by the filing of a detainer by a state, thereinafter termed the "receiving state," with the state which has the prisoner in custody. The latter state is thereafter referred to as the "sending state." Under the Act, there are three alternative procedures. First, the prisoner may request disposition of the charges contained in the detainer. In so doing, he waives extradition but places the obligation on the receiving state to try him and return him to the sending state within 180 days of his request for disposition. The second alternative is where the receiving state follows up the filing of the detainer with a written request that the sending state make the prisoner available for prosecution of the charges stated in the detainer. The sending state must then either disapprove the request within thirty days or approve it. If it is approved, the receiving state is obliged to complete the trial of the matter within 120 days from the arrival of the prisoner in the receiving state's jurisdiction. If he is returned to the sending state before completion of the prosecution, the Act requires the imposition of the sanction of dismissal. The third alternative is where neither the prisoner nor the receiving state requests disposition. The matter then goes its usual route and the receiving state will simply be notified prior to release of the prisoner upon completion of his term in the sending state.
With respect to federal prisoners under the first two alternatives, the receiving state is entitled to temporary custody as *179 provided in the Act, or the prisoner may be retained in federal custody at the place of trial.
In reviewing the fact situation, we note first of all that at no time did appellant request disposition of the South Dakota charges. Appellant's contention is that the State, by filing the detainer with the federal authorities and subsequently issuing and serving the writ of habeas corpus ad prosequendum, chose the second alternative and was therefore required to try him within 120 days and before returning him to the sending state. He then contends that his return to the federal authorities for prosecution in Texas was a "return to the sending state" which requires imposition of the sanction of dismissal of the State's charges. We disagree.
We hold that the provisions of the IAD do not apply to appellant because the provisions of the IAD state that it applies only to a "prisoner" who is "serving a term of imprisonment" (Article IV(e)SDCL 23-24A-26). Appellant, at the time the State's writ was served, was merely a detainee in the Minnehaha County Jail, awaiting transfer to the appropriate federal authority to answer to charges of escape. This is borne out by the subsequent acts of the federal officials in exercising federal sovereignty to issue a writ of habeas corpus ad prosequendum and removing appellant to Texas for proceedings on the escape charge, after which he was returned to South Dakota for disposition of the State's charge.
We agree with the Third Circuit Court of Appeals in the recent case of United States v. Dobson, 585 F.2d 55, decided August 2, 1978, wherein that Court held:
[A] pretrial detainee `has no immediate interest in any institutional treatment or program of rehabilitation' [citations omitted]. This lack of interest obviously stems from the uncertain and contingent nature of a confinement which is dependent both upon the outcome of trial and the imposition of a jail sentence ...
Also, the Sixth Circuit Court of Appeals, in United States v. Roberts, 548 F.2d 665 (6th Cir. 1977), stated:
[T]he Agreement is only concerned that a sentenced prisoner who has entered into the life of the institution to which he has been committed for a term of imprisonment not have programs of treatment and rehabilitation obstructed by numerous absences in connection with successive proceedings related to pending charges in another jurisdiction. (548 F.2d at 670, 671)
By absenting himself from the hospitality of the federal authorities at Odessa, appellant himself interfered with his program of treatment and rehabilitation.[2] Appellant was not moved to Sioux Falls in response to the State's detainer or writ. He was there because he had escaped from a Texas institution and had the misfortune to be recaptured there. While there he was in federal custody at all times. Federal authorities permitted the State to proceed with the prosecution without change of custody. The federal authorities then issued a writ returning appellant to Texas to face a charge other than that for which he had previously been incarcerated. No detainer was ever filed by the federal authorities. Since appellant was at all times in their custody, they hardly needed one. The State had no right to contest the removal.[3] The thirty-day disapproval period did not exist. Thus, we do not have a case of shuttling back and forth which interfered with appellant's treatment and rehabilitation programs and which the IAD forbids.
Nor can appellant complain that he was not given a speedy trial. When the South Dakota detainer was filed, he did not elect to exercise his option to request disposition. When he was later recaptured in South Dakota and readily available to South Dakota authorities, they moved with dispatch to prosecute their case. They were only prevented from doing so by the fact that the federal authorities were likewise moving *180 with dispatch to prosecute their newly acquired escape charge. He was then returned to South Dakota, by direction of the federal writ, to stand trial.
So, while the IAD must be applied liberally to effectuate the purposes for which it was adopted, such liberal interpretation does not extend the Act beyond its clear intent, as would be necessary to sustain appellant's contention.
Alternatively, assuming arguendo that the IAD was triggered by the State's action of filing the writ of habeas corpus ad prosequendum, the right to dismissal upon which appellant relies arises when the "trial is not had ... prior to the prisoner's being returned ... pursuant to SDCL 23-24A-27,...." (Emphasis added.) SDCL 23-24A-27 provides: "At the earliest practicable time consonant with the purposes of this agreement, the prisoner shall be returned to the sending state." There can be no question but what appellant was not returned to the federal authorities in the context of that provision, rather he was "taken" by superior authority exercised outside the strictures of the Act.
Accordingly, we affirm the conviction.
WOLLMAN, C. J., and DUNN and PORTER, JJ., concur.
ZASTROW, J., concurs specially.
ZASTROW, Justice (concurring specially).
I concur in the result on the alternative grounds stated in the majority opinion. It appears to me that the provisions of the Interstate Agreement on Detainers applied to the defendant when he was turned over to the South Dakota authorities on June 8, 1977. Had South Dakota voluntarily returned him to the federal authorities before the state trial, SDCL 23-24A-26 would have required dismissal of these charges. However, because the defendant's return to the federal authorities was done under a Federal District Court writ of habeas corpus ad prosequendum, it was not a voluntary return under SDCL 23-24A-27 and thus dismissal was not required under SDCL 23-24A-26.
NOTES
[1]  United States v. Sorrell, 562 F.2d 227, 229 (3rd Cir. 1977), citing United States ex rel. Esola v. Groomes, 520 F.2d 830, 833 (3rd Cir. 1975).
[2]  United States ex rel. Esola v. Groomes, supra.
[3]  The federal supremacy clause still applied for there was no federal detainer filed to trigger the IAD.
