The state appeals from an order granting Sassoon’s petition for the writ of habeas corpus. The habeas judge held that the indictment under which Sassoon was convicted should have been dismissed with prejudice under Article IV of the Interstate Agreement on *746Detainers, Code Ann. § 77-505b (e).
In response to a motion to dismiss the indictment filed by Sassoon, the state invoked Article IV of the Interstate Agreement on Detainers (Code Ann. § 77-505b) pursuant to which custody of Sassoon was obtained by the state for five days. On the fifth day, Sassoon was given a hearing on his motion to dismiss and was arraigned prior to being returned that afternoon to federal custody. Twenty-nine days later, Sassoon was returned to Clayton County for trial. Eight days later, after trial, conviction and the ordering of a presentence investigation, Sassoon was returned to federal custody. Twenty-two days later, Sassoon was returned to Clayton County for sentencing and was returned the same day to federal custody.
Sassoon appealed pro se and the Court of Appeals affirmed in Sassoon v. State, 138 Ga. App. 172 (225 SE2d 732) (1976). The evidence is in conflict as to whether or not Sassoon was aware of and familiar with the Interstate Agreement on Detainers at the time of his trial. Sassoon filed the present petition for the writ of habeas corpus over six months after the decision of the Court of Appeals.
The evidence is not in conflict that while in federal custody Sassoon had undergone surgery to relieve pain and to correct deformities from which he was suffering as a result of a bullet wound; that the surgery had not been successful; that Sassoon had requested additional surgery and drug therapy for relief of pain; that Sassoon had given his continuing consent to the federal authorities for the additional surgery to be performed at a later date to be chosen by the federal authorities depending upon the availability of the surgeons and the hospital facilities; that Sassoon in fact received this surgery during the period while he was in federal custody after conviction and before sentencing in Clayton County.
The state argues here as in the court below that Sassoon waived his rights under the agreement by requesting transfer back to federal custody. Sassoon denied he requested his return from state to federal custody after arraignment and prior to trial. The state introduced testimony of employees of the Clayton Counfy Sheriffs Office to the effect that Sassoon personally asked them to return him to federal custody so he would be *747available for medical treatment and the operation. The trial court found against the state on the conflicting evidence. This court does not reach the issue of waiver of rights on this appeal.
The evidence establishes without contradiction that no agreement had been entered into between the federal and state authorities that would have changed the obligation of the state pursuant to Article V of the Interstate Agreement on Detainers (Code Ann. § 77-506b (h)) to provide for the care of Sassoon while he was in state custody, nor is there any contention that the 120-day period for the commencement of trial after arrival of the prisoner in the receiving jurisdiction was exceeded by the state in violation of Article IV of the Interstate Agreement on Detainers. Code Ann. § 77-505b (c).
Although the petition for the writ alleged that the multiple transfers between jurisdictions interfered with Sassoon’s program of rehabilitation, this assertion was abandoned in the court below by the admissions of Sassoon’s counsel, first, that once Sassoon had been returned to the sending jurisdiction after arraignment and before trial, "the ensuing transfers were rendered irrelevant and mere surplusage” and, second, by his admission that Sassoon "does not ask this court to find that he has been denied the right to rehabilitate himself.”
Pretermitting questions of waiver, estoppel and impermissible collateral attack raised by the state as a result of Sassoon’s proceeding by way of petition for the writ of habeas corpus rather than by appeal, the single issue presented for decision is one of whether or not Sassoon’s rights under the Interstate Agreement on Detainers have been violated.
The purpose of the Interstate Agreement on Detainers as declared by the General Assembly is to encourage the expeditious and orderly (1) disposition of charges outstanding against a prisoner and (2) determination of the proper status of detainers based on untried indictments, informations or complaints in order to avoid obstructing programs of prisoner treatment and rehabilitation. Code Ann. § 77-502b. To that end, the Interstate Agreement on Detainers shall be liberally *748construed in favor of the prisoner so as to effectuate its purposes. Code Ann. § 77-510b. In order to minimize obstructions to programs of prisoner rehabilitation and treatment, the prisoner shall be returned by the receiving jurisdiction to the sending jurisdiction "at the earliest practicable time consonant with the purposes of this agreement.” Code Ann. § 77-506b (e). Sassoon was returned by the receiving jurisdiction to the sending jurisdiction "at the earliest practicable time” after arraignment since he was returned from state to federal custody during the same day on which he was arraigned. The issue presented for decision thus resolves itself into one of whether or not his transfer after arraignment but before trial was "consonant with the purposes of’ the Interstate Agreement on Detainers. Code Ann. § 77-506b (e).
Having been confronted by the state with unrebutted evidence that Sassoon could, had he wished, have continued participating in the small motor repairs course in which he was enrolled at the Atlanta Federal Penitentiary despite his transfers back and forth between federal and state custody, counsel for Sassoon frankly conceded in the court below that Sassoon was not asking the court to find that Sassoon had been denied the right to rehabilitate himself. Rather, Sassoon relied alone upon the explicit language of Code Ann. § 77-505b (e) that "if trial is not had on any indictment, information or complaint contemplated hereby prior to the prisoner’s being returned to the original place of imprisonment pursuant to Article V (e) hereof [§ 77-506b] such indictment, information or complaint shall not be of any further force or effect, and the court shall enter an order dismissing the same with prejudice.”
Assuming, without deciding, that the state technically violated Code Ann. § 77-505b (e) when it transferred Sassoon back to federal custody after arraignment and before trial, this court is not prepared to hold that such transfer violated Sassoon’s rights under the Interstate Agreement on Detainers since the result of the transfer was to enable Sassoon to participate in the rehabilitative educational program in which he was enrolled in the Atlanta Federal Penitentiary, as the *749uncontroverted evidence establishes and as Sassoon, through counsel, has admitted. This court declines to apply Code Ann. § 77-505b (e) mechanically contrary to the stated purposes of the Interstate Agreement on Detainers because such an application would be based upon a construction of the Agreement against, rather than in behalf of, the legitimate interest of Sassoon in receiving rehabilitative education while in federal custody. On the facts of the present case, Clayton County’s keeping Sassoon for trial, rather than returning him immediately after arraignment, would have interfered with Sassoon’s legitimate interest in participating in the program of rehabilitation in which he was enrolled. A brief removal of a prisoner to the receiving jurisdiction and his prompt return to the sending jurisdiction after arraignment and prior to trial is consonant with the intention of the Interstate Agreement on Detainers. United States v. Chico, 558 F2d 1047 (1977).
Justice Hill, concurring in Price v. State, 237 Ga. 352, 357 (227 SE2d 368) (1976), anticipated that intelligent prisoners will seek to use provisions of the Interstate Agreement on Detainers not for the purpose of protecting their legitimate interests but rather, to secure their release from custody. The present appeal presents just such an instance of attempted misuse of the Agreement.
The subsequent transfers of Sassoon from federal custody to state custody and back again are not in violation of Sassoon’s rights under Article IV of the Agreement (1) because Code Ann. § 77-505b (e) does not address itself to transfers from the receiving jurisdiction back to the sending jurisdiction either after trial or after sentencing; (2) because counsel for Sassoon admitted in the court below that such transfers are irrelevant to the issues presented in the present case; and (3) because, in any event, these transfers gave Sassoon the opportunity not only to resume participation in the small motors training course but, as well, enabled him to receive the operation and medical treatment he had been seeking. These brief detentions in state custody followed by his prompt return to federal custody were for his benefit rather than being to his detriment. United States v. Chico, 558 F2d 1047, 1049, supra. See also United States *750v. Scallion, 548 F2d 1168, 1170 (1977); United States v. Ford, 550 F2d 732, 742 (1977).
Argued November 22, 1977 Decided February 7, 1978 Rehearing denied February 21, 1978. Robert E. Keller, District Attorney, Michael D. Anderson, Assistant District Attorney, Arthur K. Bolton, Attorney General, John W. Dunsmore, Jr., Assistant Attorney General, for appellant. Gignilliat, Manchel, Johnson & Wiggins, Howard J. Manchel, for appellee.The court erred in granting the petition for the writ of habeas corpus.
Judgment reversed.
All the Justices concur, except Hall, J., who dissents.