814 F.2d 859
Hector RIVERA, Plaintiff,v.Vincent SANTIROCCO, 42nd Precinct, Shield # 24233 and NewYork City Police Department, Jointly, Severally,and Individually, Respectively, Defendants,New York State Department of Correctional Services andEugene Lefevre, Intervenors-Appellants,United States Bureau of Prisons and United States MarshalsService, Intervenors-Appellees.Mark DUPREE, Plaintiff-Appellee,v.Wilson WALTERS, K. Lido, L. Williams, T. Dinkins, M. Lee, T.Cutts, Y. Reyes, R. Washington, E. Gurriero, individuallyand in their official capacities as Correctional Officers ofthe State of New York, Defendants,United States Bureau of Prisons and United States MarshalsService, Intervenors-Appellants,New York State Department of Correctional Services,Intervenor-Appellee.
Nos. 384, 798, Docket Nos. 86-2294, 86-2401.
United States Court of Appeals,Second Circuit.
Argued in No. 384 Nov. 6, 1986.Submitted in No. 798 Feb. 2, 1987.Decided March 23, 1987.

Jo Ann M. Becker, Asst. Atty. Gen. of N.Y.  (Robert Abrams, Atty. Gen. of N.Y., Howard L. Zwickel, Asst. Atty. Gen. of N.Y., of counsel), for N.Y. State Dept. of Correctional Services and Eugene Lefevre.
Peter C. Salerno, Asst. U.S. Atty., S.D.N.Y.  (Rudolph W. Giuliani, U.S. Atty. for S.D.N.Y., Steven E. Obus, Asst. U.S. Atty., of counsel), for U.S. Bureau of Prisons and U.S. Marshals Service.
Clifford James, New York City (Shea & Gould, New York City, Douglas Burns, of counsel), for plaintiff-appellee Mark DuPree.
Before LUMBARD, OAKES, and KEARSE, Circuit Judges.
LUMBARD, Circuit Judge:


1
These two appeals, consolidated for decision, present the same question:  Whether a federal district court, having issued a writ of habeas corpus ad testificandum, has the power to direct the United States Marshals Service to take custody of a state prisoner produced under the writ, and the United States Bureau of Prisons to house him, during trial of that prisoner's civil rights action against state officials under 42 U.S.C. Sec. 1983.  We believe that it does.

I.

2
Hector Rivera, an inmate of the Clinton Correctional Facility in the custody of the New York State Department of Correctional Services (DOCS), filed his civil rights action in the Southern District on January 3, 1983.  As amended in 1985, his complaint alleged that he was denied medical care for a broken ankle for four hours after his arrest in 1981.  He named as defendants four New York City police officers and the New York City Police Department.


3
On May 21, 1986, Rivera's appointed counsel filed a motion requesting the court to order Rivera transferred from Clinton to the Metropolitan Correctional Center (MCC), a federal facility in New York City, five days prior to trial and housed there until the trial concluded.  Rivera's counsel requested the transfer to allow him to meet with Rivera in preparation for trial and to facilitate Rivera's presence and testimony at the trial.  On May 23, 1986, Judge Cannella signed a writ of habeas corpus ad testificandum.    The writ ordered DOCS to bring Rivera to the MCC on June 4, 1986, to transport him between the MCC and the federal courthouse during the trial scheduled to begin on June 9, and to "bear the cost of implementation of the terms of this writ."


4
On May 29, 1986, DOCS wrote to Judge Cannella protesting his order.1   On May 30, the United States Attorney's Office, counsel for the United States Marshals Service and the United States Bureau of Prisons (collectively "the federal intervenors"), responded, also by letter, claiming that the court had no authority to order the MCC to house the inmate when the federal government was not a party to the suit.  After a conference chaired by former Chief Judge Motley failed to resolve the dispute, Judge Cannella permitted DOCS and the federal intervenors to intervene and issued a writ of habeas corpus ad testificandum directing the state to maintain custody of the prisoner during trial.  Judge Cannella reserved decision until the trial on the state's application for an order requiring the Marshals to guard Rivera in the courthouse.  Trial has been postponed pending this appeal.

II.

5
Mark DuPree, presently confined at Attica Correctional Facility, brought suit in the Southern District under 42 U.S.C. Secs. 1981, 1983, and 1985(3) and the Eighth and Fourteenth Amendments against eight New York State correctional officers and the warden of Ossining Correctional Facility.  He alleged that he had been "struck by one or all of the defendants Correctional Officers, and did receive threats of further physical harm."    On September 9, 1986, Judge Sweet issued an order directing the superintendent of the state facility where DuPree was then incarcerated to produce DuPree in court for trial on September 15.  The order required the state to transport DuPree back and forth from a state facility to court each day during trial.


6
On September 15, state correctional officers complied with the order and produced DuPree before the court.  Through counsel, DOCS advised Judge Sweet that it wished the Marshals Service to assume custody.  The state guards further advised the court that if they were required to maintain custody, they did not believe that it would be safe to remove DuPree's restraints;  they claimed to be unfamiliar with the layout of the courthouse and noted DuPree's history of violent behavior.  After soliciting the views of the United States Attorney's Office, which is located in a building annexed to the courthouse, the court ordered custody transferred to the Marshal during the day, and to the Bureau of Prisons at night.  On November 5, 1986, the court permitted DOCS and the federal intervenors to intervene, and, on the same day, the federal intervenors appealed.  Judge Sweet postponed trial pending appeal of this issue.

III.

7
In Pennsylvania Bureau of Correction v. United States Marshals Service, 474 U.S. 34, 106 S.Ct. 355, 88 L.Ed.2d 189 (1985), the Supreme Court faced an issue similar to the one now before us.  Writing for an eight-member majority,2 Justice Powell held that a district court did not have the power to compel the United States Marshals Service to transport state prisoners from state correctional facilities to the federal courthouse to testify in a Sec. 1983 action by a state prisoner against county officials.  After noting that the Marshals have a duty to comply with the lawful orders and writs of the federal courts, under 28 U.S.C. Secs. 567 and 569(b), the court found that these statutes do not provide a separate source of judicial authority to issue such orders or writs.  "The courts' authority to issue such writs, however, must derive from some independent statutory source."    106 S.Ct. at 359.  Starting his search for such a source with the federal habeas statute, 28 U.S.C. Sec. 2243,3 Justice Powell noted that it specifically commanded the custodian of the prisoner--the state of Pennsylvania--to produce the prisoner in court, "but extends that duty to no other."    Id.  As the Marshals were not custodians of the inmate at the time the writ issued nor was the federal government a party to the litigation, the habeas statute did not provide a basis for the court's order compelling the Marshals to produce the inmate before the court.


8
The Court also examined the state's claim that the All Writs Act, 28 U.S.C. Sec. 1651(a),4 authorized the court's order, and concluded:  "The All Writs Act is a residual source of authority to issue writs that are not otherwise covered by statute.  Where a statute specifically addresses the particular issue at hand, it is that authority, and not the All Writs Act, that is controlling."    Id. at 361.  Because the habeas statute specifically directed the custodian to produce the inmate, it preempted use of the All Writs Act.  The Court therefore found no authority for the district court's order, and affirmed the Third Circuit's decision reversing it.    Pennsylvania Bureau teaches two lessons:  A district court's power to issue a writ must derive from an "independent statutory source";  and the All Writs Act may not serve as the source of a district court's power when another statute deals directly with the issue.  With these lessons in mind, we proceed to the issue before us.


9
The power of the district court to order the Marshals Service to take custody of prisoners during their attendance at trial is apparent.  Although the Supreme Court did not address that issue in Pennsylvania Bureau, 106 S.Ct. at 358 n. 3 ("The Marshals have conceded that they are responsible for the custody of state prisoners in the federal courthouse as witnesses or parties."), the Third Circuit did consider it.  Relying upon 28 U.S.C. Sec. 569(a) ("The United States Marshal of each district ... may in the discretion of the respective courts, be required to attend any session of the court."), that court held:


10
This statute quite clearly authorizes the district court to require the attendance of the Marshal at any judicial proceeding, including any proceeding at which the testimony of a state prisoner may be required.  It seems plain, then, that the court has authority to direct the Marshal to take prisoners into custody during the time their attendance at court is required.


11
Garland v. Sullivan, 737 F.2d 1283, 1287 (3d Cir.1984), (quoting Story v. Robinson, 689 F.2d 1176, 1180 (3d Cir.1982)), aff'd sub nom.  Pennsylvania Bureau of Correction v. United States Marshals Service, 474 U.S. 34, 106 S.Ct. 355, 88 L.Ed.2d 189 (1985).  We agree.


12
We next examine the power of the court to order the Bureau of Prisons to house the inmate at the MCC, and the Marshals to transport him between the courthouse and the MCC, during trial.  DOCS argues that when it brings the subject of the writ before the court, its obligation under the writ ends.  Physical custody, and consequently the responsibility for the safe-keeping of the inmate, then shifts to the district court until it remands the prisoner back to the state.  While the district court retains responsibility for the prisoner, the argument goes, the habeas statute has no application;  the court may therefore look to the All Writs Act, 28 U.S.C. Sec. 1651, for the power to act within the resulting statutory vacuum.  We agree.


13
Our quest for an independent statutory source for the district court's power begins with the federal habeas statute, 28 U.S.C. Sec. 2243.  The habeas statute states that the custodian--in this case, the state of New York--"shall be required to produce at the hearing the body of the person detained."    Plainly, the custodian's duty "to produce" the subject of the writ requires nothing more than that the subject be brought before the court.  The statutory language cannot support the federal intervenor's contention that the custodian's duty under the statute to "produce" an inmate also comprehends a duty to guard, transport, and house him.


14
This common-sense interpretation of the habeas statute finds support in the case law.  Over a century ago, in Barth v. Clise, 79 U.S.  (12 Wall.) 400, 20 L.Ed. 393 (1870), the Supreme Court held that a sheriff could not be held liable by the creditor of one of his prisoners for losses caused by the prisoner's escape after the sheriff had produced the prisoner under a writ of habeas corpus ad subjiciendum.    The court noted that, at common law, the authority of the writ superseded the authority of the original confinement once the custodian has produced the body of the person swearing out the writ.  "After that time, and until the case is finally disposed of, the safe-keeping of the prisoner is entirely under the control and direction of the court to which the return is made."   Id. at 402 (emphasis added).  Until he is returned to the state, the prisoner "may be bailed de die in diem, or be remanded whence he came, or be committed to any other suitable place of confinement under the control of the court."    Id.  See also United States ex rel. Carapa v. Curran, 297 F. 946, 955 (2d Cir.1924) (citing Barth and Justice Nelson's opinion in In re Kaine, 55 U.S.  (14 How.) 103, 14 L.Ed. 345 (1852), for the proposition that "pending the hearing on the application for the writ [of habeas corpus] the prisoner is entirely under the authority of the court issuing the writ....").5


15
While a prisoner who has been produced pursuant to a writ ad testificandum remains confined as a result of his original conviction--otherwise there would be no need to resort to the extraordinary measure of issuing a writ to secure his testimony--a writ of habeas corpus ad subjiciendum supersedes the original commitment so that the legitimacy of that commitment may be adjudicated.  However, this distinction does not effect the applicability of Barth's physical custody analysis to writs of habeas corpus ad testificandum.  See In re Liberatore, 574 F.2d 78, 89 (2d Cir.1978) (implying that a writ of habeas corpus ad testificandum affects a "temporary transfer of custody from the sovereignty having the prior jurisdiction.");   Johnston v. Marsh, 227 F.2d 528, 530 n. 4 (3d Cir.1955) ("When the prisoner came before the court [as required by the writ of habeas corpus ad testificandum ], the Judge, under common law doctrine, gained custody of him, the authority of the writ superseding that of the original commitment.").


16
We are not persuaded that United States v. Bailey, 585 F.2d 1087, 1103-04 (D.C.Cir.1978), reversed on other grounds, 444 U.S. 394, 100 S.Ct. 624, 62 L.Ed.2d 575 (1980), supports the government's position.  This case holds only that, because a prisoner is in custody "by virtue" of his original confinement even when he is loaned out pursuant to a writ of habeas corpus, he violates the terms of that original confinement if he attempts to escape.  Thus, Bailey does not deal with the physical custody of the prisoner during the term of the writ and is inapposite to the issue before us.  The other "escape" cases relied upon by both parties are also not on point.6


17
We conclude that the habeas statute has no application once the custodian has produced the prisoner before the court.  A statutory void therefore exists between the time the prisoner is presented to the court and the time the court remands the prisoner back to the state.  A district court may properly look to the All Writs Act, 28 U.S.C. Sec. 1651, to act within this void.  As explained by Justice Powell in Pennsylvania Bureau, the All Writs Act authorizes a federal court " 'to issue such commands ... as may be necessary or appropriate to effectuate and prevent the frustration of orders it has previously issued in its exercise of jurisdiction.' "    106 S.Ct. at 360, citing United States v. New York Telephone Co., 434 U.S. 159, 172, 98 S.Ct. 364, 372, 54 L.Ed.2d 376 (1977).  Here, no express statutory provision gives the district court the power to provide for the custody and care of the inmate now in its safe-keeping.  If the business of the court for which the prisoner's attendance has been commanded is to be transacted without undue interruption, the court must be able to make such orders as it may find necessary to ensure the attendance of the prisoner.  Under such circumstances, a federal court may use the All Writs Act as authority to order the Bureau of Prisons to house a prisoner, and the Marshals Service to transport the prisoner between the courthouse and the MCC, until he is remanded back to the state's custody.7


18
Finally, we note that strong practical considerations also support this result.   See Bailey, supra, 585 F.2d at 1104 ("Courts interpreting the term 'custody' in ... cases involving writs of habeas corpus have demonstrated a flexibility responsive to such considerations of policy and common sense.")  (footnote omitted).  Our decision provides the district courts with the maximum flexibility in scheduling and controlling the affairs of the court.  Principles of federalism as well as practical exigencies may limit a federal court's control over state officials.  However, as Judge Sweet noted, a federal court, during the term of the writ, may order the Marshal to produce an inmate with "a simple telephone call."


19
Furthermore, the resulting distribution of the costs--requiring the state to transport the prisoner to the courthouse and the federal government to assume the burden of his care and safe-keeping during the term of the writ--seems to be a fair apportionment of expenses.8   See Note, Transportation of State Prisoners to their Federal Civil Rights Actions, 53 Fordham L.Rev. 1211, 1228-29 (1985) ("The state is not unduly burdened when it transfers a prisoner ...;  such transfers occur regularly.  Nor is a great burden imposed on the United States Marshal, as it is unlikely that he will have to travel out of the municipality in which he is stationed.")  (footnotes omitted).    Pennsylvania Bureau certainly does not require that the federal government be completely insulated from assuming its share of the costs.  As the occasion for the prisoner's production and the duration of his attendance arise solely from an exercise of federal jurisdiction, it is hardly fitting for a federal court to compel a state to incur expenses beyond the production of the inmate and his return from court.

IV.

20
To summarize, once a state has complied with a writ of habeas corpus ad testificandum, the district court may properly issue such orders to the United States Marshals Service and the Federal Bureau of Prisons as, in the judgment of the court, will best assure the testimony and presence of the prisoner.9   For the foregoing reasons, DuPree v. Walters, docket no. 86-2401, is affirmed.  Rivera v. Santirocco, docket no. 86-2294, is remanded for proceedings consistent with this opinion.



1
 DOCS did not object to that portion of the writ which ordered it to transfer Rivera to the MCC


2
 Justice Stevens dissented.  He believed that the majority improperly required "an explicit statutory authorization of each exercise of judicial authority."    106 S.Ct. at 364.  Instead, he argued, "the nature of the shared mission of the federal courts and the federal Marshals should provide the standard for resolving the dispute."    Id.  As "the District Court's order in this case was fully consistent with the historic relationship between the federal court and the federal marshal," id. at 365-66, he concluded that it should be upheld


3
 The statute states, in relevant part:
The writ, or order to show cause shall be directed to the person having custody of the person detained.
* * *
... the person to whom the writ is directed shall be required to produce at the hearing the body of the person detained.


4
 The All Writs Act provides in pertinent part:  "The Supreme Court and all the courts established by Act of Congress may issue all writs necessary or appropriate in aid of their respective jurisdictions and agreeable to the usages and principles of law."


5
 However, in Curran, we declined to interpret literally the statement in Barth that a prisoner under the court's authority "may be bailed" as allowing the court to bail a prisoner without explicit statutory authority.  We therefore denied the application of the relator, who was being held by the immigration officials, for bail pending her appeal of the district court's dismissal of her habeas corpus petition.  This result did not depend upon the custody issue, but upon the unwillingness of the court to grant bail without a specific grant of power from Congress


6
 The parties also discuss two other "escape" cases.   United States v. Viger, 530 F.2d 846 (9th Cir.1976);  United States v. Stead, 528 F.2d 257 (8th Cir.1975), cert. denied, 425 U.S. 953, 96 S.Ct. 1730, 48 L.Ed.2d 197 (1976).  In both cases the prisoner had been remanded back to the state from the federal court's custody before his escape.  Therefore, these cases do not bear upon the question of who has custody of the prisoner during the term of the writ


7
 Of course, the Marshal and the Bureau of Prisons have a duty to comply with the lawful orders of a federal court.  18 U.S.C. Sec. 4042 ("The Bureau of Prisons, under the direction of the Attorney General, shall ... provide for the safekeeping, care, and subsistence of all persons ... held as witnesses or otherwise.");    28 U.S.C. Secs. 567 ("Under regulations prescribed by the Attorney General, each United States Marshal shall be allowed ... (2) the expense of transporting prisoners....");  569(b) ("United States Marshals shall execute all lawful writs, process and orders issued under authority of the United States....")


8
 As compliance with writs of habeas corpus ad testificandum may be very costly, the district courts should consider alternatives to reduce the burdens compliance imposes, including:  using a prisoner's deposition in place of his trial testimony, arranging the trial schedule to reduce the amount of time a prisoner must be away from his place of confinement, and, in some cases, taking testimony at the prison, or transferring the place of trial to the federal courthouse nearest the state prison


9
 There may well be circumstances where the most appropriate, and least expensive, solution would be to house a prisoner at some state or local facility, at the expense of the federal government.  If there is presently no statutory authority for such an arrangement, the matter is worthy of consideration by the Congress


