
    UNITED STATES of America, Plaintiff-Appellant, v. Jerrol Glen WOODS, Defendant-Appellee.
    No. 85-1059.
    United States Court of Appeals, Ninth Circuit.
    Argued and Submitted Sept. 11, 1985.
    Decided Nov. 4, 1985.
    John W. Kennedy, Asst. U.S. Atty., Sacramento, Cal, Patty Merkamp Stemler, Dept, of Justice, Washington, D.C., for plaintiff-appellant.
    Sandra Gillies, Asst. Federal Public Defender, Sacramento, Cal., for defendant-ap-pellee.
    
      Before CHOY, HUG, and SCHROEDER, Circuit Judges.
   SCHROEDER, Circuit Judge.

The district court dismissed the indictment in this case and the government appeals. The district court held that dismissal was required under the “anti-shuttling” provision of the Interstate Agreement on Detainers, 18 U.S.C.App. III, § 2, Art. IV(e) (1982). It provides for dismissal when a transferred prisoner is returned before trial to the jurisdiction in which he was previously imprisoned. We reverse because the defendant in this case was never transferred pursuant to the Detainer Agreement. We agree with the two other circuits that have considered related issues and have concluded that the Agreement applies only when a prisoner is brought to federal court pursuant to a detainer. United States v. Roy, 771 F.2d 54 (2d Cir.1985); Johnson v. Williams, 666 F.2d 842 (3d Cir.1981).

The series of events which led to the district court’s dismissal of the indictment shows that the district court was faced with an unusual situation. The defendant, Woods, had been indicted in United States District Court on federal charges while he was serving a state court sentence in Nevada State Prison. In order to deliver him to federal custody for his arraignment, the district court issued a writ of habeas corpus ad prosequendum on October 23, 1984. Federal officials took temporary custody of Woods a few days later and transported him to Sacramento for the arraignment.

Then, for no apparent reason, and con-cededly by mistake, the United States Marshall’s Office in Sacramento prepared a detainer against Woods and sent it to the Nevada State Prison. Nevada received it on December 3, 1984. The detainer served no purpose because Woods was already in federal custody pursuant to the writ of habeas corpus ad prosequendum. The next day, however, because of delays in the federal trial date and for reasons wholly unrelated to the issuance of the detainer, the United States Marshall’s Office in Sacramento returned Woods to the Nevada Prison.

Woods therefore had been returned to Nevada authorities before the federal trial. He moved to dismiss the federal indictment on the theory that dismissal was required under the anti-shuttling provision of the Detainer Agreement. It provides:

If trial is not had on any indictment ... prior to the prisoner’s being returned to the original place of imprisonment pursuant to Article V(e) hereof, such indictment ... shall not be of any further force or effect, and the court shall enter an order dismissing the same with prejudice.

18 U.S.C.App. Ill, § 2, Art. IV(e) (1982).

The United States and 46 states are parties to the Agreement, which sets out procedures under which members may obtain custody of prisoners incarcerated in another member’s jurisdiction. United States v. Mauro, 436 U.S. 340, 343, 98 S.Ct. 1834, 1838, 56 L.Ed.2d 329 (1978). Article IV(e) is intended to prevent prisoners from being shuttled back and forth between institutions, a practice which is disruptive of rehabilitation and may work a denial of privileges earned at one institution. See Detainer Agreement, 18 U.S.C.App. III, § 2, Art. I (1982); United States v. Roy, 771 F.2d 54, 57 (2d Cir.1985).

The government, however, is not required to proceed pursuant to the Agreement when it wishes to obtain custody of an individual who is in the custody of another member. It can use a writ of habeas corpus ad prosequendum. United States v. Mauro, 436 U.S. 340, 361, 98 S.Ct. 1834, 1847, 56 L.Ed.2d 329 (1978). As the Second Circuit has observed, “[t]he Government may, if it wishes, forgo lodging a detainer and conduct the federal prosecution free of the Agreement’s provisions.” Roy, supra at 59.

Thus, the issue in this case is whether the Agreement applies when the prisoner is transferred under a writ of habeas corpus ad prosequendum but is returned after a detainer has been lodged.

The Third Circuit has squarely held that the Agreement does not apply when the receiving jurisdiction acquires custody by means other than a detainer. Johnson v. Williams, 666 F.2d 842, 844 (3d Cir.1981). This holding was echoed by the statement of the Second Circuit in Roy that if a prisoner is

initially brought to federal court pursuant to a writ [of habeas corpus ad prose-quendum] at a time when no detainer has been lodged, the Agreement does not apply.

771 F.2d at 58.

In this case, the federal government did lodge a detainer and then returned the prisoner before trial. However, because the government already had obtained custody of the prisoner through a writ process, the lodging of the detainer was a meaningless event insofar as the government’s initial custody was concerned. The prisoner was not brought to federal court pursuant to the Detainer Agreement. Therefore, consistent with the decisions of other courts concerning the applicability of that Agreement, we conclude that its provisions do not apply.

The judgment of the district court dismissing the indictment is reversed and the matter is remanded for further proceedings.  