Opinion OF THE COURT
VAN DUSEN, Circuit Judge.
This appeal challenges a district court order, 320 F. Supp. 1246, dismissing a petition for a writ of habeas corpus for lack of jurisdiction. William Richard Meck, a Private in the United States Army, brought a petition for a writ of habeas corpus in the Eastern District of Pennsylvania, seeking release from the custody of the Army. In this petition Meck alleged that he had been unlawfully denied a conscientious objector discharge because the Army had failed to properly process his application for this discharge. In denying the petition on jurisdictional grounds, the district court concluded that Meck was not "in custody" within the Eastern District of Pennsylvania at the time that suit was brought. For the reasons stated below, we disagree with this conclusion and find that there was jurisdiction in the district court to consider Meck's claim for a writ of habeas corpus.
Meck was inducted into the United States Army on June 20, 1969. After completing basic and advanced training, he was assigned to the Overseas Replacement Station, Fort Lewis, Washington. The petition avers that at this point petitioner's feelings against violence and the use of force crystalized into a fixed belief and, as a result, in January 1970 he applied for discharge as a conscientious objector pursuant to Army Regulation 635-20.1 This application was denied on March 18, 1970. On April 13, 1970, Meck submitted a second application for discharge in which he challenged the denial of the first application on the grounds that he had not received fair interviews from the chaplain and the hearing officer. In connection with this second application, Meck was interviewed by a chaplain, a hearing officer, and his unit commander, all of whom recommended that his second application be approved. On June 16, 1970, however, Meck's commanding officer returned this second application and refused to process it further.2
At this point Meck determined to take the matter out of the hands of the Army. On June 19, 1970, allegedly fearing immediate shipment overseas, Meck went absent without leave from his duty station at Fort Lewis, Washington. On June 24, 1970, while he was still absent without leave, his attorneys filed a petition for a writ of habeas corpus and a motion for a temporary restraining order in the United States District Court for the Western District of Washington. The motion for a temporary restraining order was denied after a hearing, and petitioner did not prosecute that suit for a writ of habeas corpus any further.3
Meck, however, was still absent without leave from the Army and he remained so until August 5, 1970. On that date he voluntarily surrendered himself to the military authorities at Valley Forge General Hospital, Phoenixville, Pa. Also on August 5, 1970, Meck's attorneys filed a petition for a writ of habeas corpus and a motion for a temporary restraining order in the District Court for the Eastern District of Pennsylvania. The motion for a temporary restraining order was granted by the district court on August 5, 1970, pending a hearing on the merits on August 19, 1970. After this hearing and the filing of briefs by the parties, however, the district court denied the writ on the ground that it had no jurisdiction under 28 U.S.C. § 2241(a) because petitioner was not "in custody" within the district court's jurisdiction. The district court concluded that under the relevant Army regulations the commanding officer at the Valley Forge General Hospital had no authority to accept "custody" of petitioner when he turned himself in on August 5, 1970; instead, the Army regulations were interpreted to place Meck under the command of the commanding officer of Fort George G. Meade, Maryland.
The terms under which a writ of habeas corpus may be issued are controlled by federal statute. Section 2241 (c) (1) of Title 28, U.S.C., provides that the writ may be extended to "a prisoner" who is "in custody under or by color of the authority of the United States." Thus, in any petition for habeas corpus, the court is confronted with a threshold question whether the petitioner is "in custody" for purposes of establishing the subject matter jurisdiction of the court. It is clear, however, that a member of the armed services who is unlawfully detained, restrained or confined in the service is "in custody" within the meaning of 28 U.S.C. § 2241(c) (1).4 Therefore we conclude that the district court had subject matter jurisdiction of the petition filed by Meck on August 5, 1970.5
The provision of section 2241(a) limiting the power of a federal court to grant the writ of habeas corpus to cases "within their respective jurisdictions" necessitates consideration of these two issues: whether there existed jurisdiction over the person of the petitioner and whether there existed jurisdiction over the person of petitioner's custodian. The first issue was discussed explicitly in Ahrens v. Clark, 335 U.S. 188, 68 S. Ct. 1443, 92 L. Ed. 1898 (1948), in which the Supreme Court held that as a prerequisite to a court's jurisdiction to issue a habeas writ the petitioner must be confined or detained within the territorial jurisdiction of the court. In the instant case, the district court reasoned that Meck was not in custody within the Eastern District of Pennsylvania, notwithstanding the fact that at the time that suit was brought he had turned himself in and was physically confined at an Army installation located in the Eastern District of Pennsylvania,6 because the officer having ultimate administrative responsibility for his disposition was in Maryland.7
In Ahrens the Court held that the District Court for the District of Columbia had no jurisdiction to consider the application of persons detained at Ellis Island, New York, even though they were held by order of the Attorney General, who was amenable to service in the District of Columbia. The Court reasoned that it "would take compelling reasons to conclude that Congress contemplated the production of prisoners from remote sections, perhaps thousands of miles from the district court that issued the writ";8 that the "opportunities for escape afforded by travel, the cost of transportation, the administrative burden of such an undertaking negate such a purpose";9 and finally that the jurisdictional limitation was originally included in the Act of 1867 to allay fears that the habeas statute would allow a "district judge in Florida to bring before him some men convicted and sentenced and held under imprisonment in the State of Vermont or in any of the further States."10 At the time that his petition was filed, Meck was physically confined within the Eastern District of Pennsylvania.11 If his actual presence at the district court hearing was required,12 he did not have to be transported many miles into another jurisdiction, with the attendant costs and opportunities for escape. We conclude, therefore, that the district court had jurisdiction of the person of the petitioner within the terms of 28 U.S.C. § 2241.13
We also find that the district court had personal jurisdiction over the "custodian," since the Commanding Officer of the Valley Forge General Hospital was within the Eastern District of Pennsylvania. In Schlanger v. Seamans, 401 U.S. 487, 91 S. Ct. 995, 28 L. Ed. 2d 251 (1971), an Air Force enlisted man assigned to Moody Air Force Base, Georgia, was given permissive temporary duty to attend Arizona State University for study. Shortly before his graduation and while he was still in Arizona, he filed an application for habeas corpus in Arizona. The Court held that the Arizona District Court had no jurisdiction over the habeas petition because, while his custodian -- the Commander of Moody Air Force Base -- was a respondent in the action, he was not subject to the court's jurisdiction. The Court appears to have considered a controlling question to be whether a respondent such as the Commanding Officer at the Valley Forge Hospital was "in the chain of command."14 Accepting this as an appropriate standard in the circumstances of this case, we find that under the applicable Army Regulations, the Commanding Officer of the Valley Forge General Hospital was in petitioner's chain of command at the time that the application for the writ of habeas corpus was made on August 5, 1970,15 and that, therefore, a proper custodian was within the territorial jurisdiction of the court when the petition for habeas corpus was filed on August 5, 1970.16
For the foregoing reasons, we find that the district court had jurisdiction of Meck's petition for a writ of habeas corpus. We therefore remand the case to the district court to consider whether petitioner's conduct and the factual situation render it appropriate for the district court to grant him the relief he seeks and, if so, whether petitioner is entitled to relief on the merits. We express no opinion on the above-mentioned matters, since they are not now directly before us. We note, however, that the issuance of the writ of habeas corpus by the federal courts is governed by equitable principles and that a petitioner's conduct may disentitle him to the relief he seeks. See Sanders v. United States, 373 U.S. 1, 83 S. Ct. 1068, 10 L. Ed. 2d 148 (1963); Fay v. Noia, 372 U.S. 391, 438, 83 S. Ct. 822, 9 L. Ed. 2d 837 (1963); cf. Johnson v. Laird, 432 F.2d 77, 79 (9th Cir. 1970).17
One final issue remains. In his original pleading filed with the court below on August 5, 1970, Meck made an alternative claim for a writ of mandamus directing the respondents to accept and process his second application for a conscientious objector discharge pursuant to the provisions of DOD 1300.6 and AR 635-20. Jurisdiction was alleged to exist under 28 U.S.C. § 1361.18 The district court made no mention of this claim. Although the parties have presented arguments on the jurisdictional19 and substantive20 issues involved in this claim, we do not consider it appropriate at this time to express an opinion. The matter can be fully explored and decided in the first instance by the district court on remand if the claim becomes relevant.
Accordingly, the district court order filed September 15, 1970, will be vacated and set aside, and the case will be remanded to the district court for further proceedings in accordance with this opinion.
1. This Army Regulation was promulgated pursuant to a Defense Department directive (DOD No. 1300.6) requiring each branch of the Armed Services to establish a procedure for dealing with conscientious objector discharge requests. For a discussion of the procedures adopted by the Army, see Brown v. McNamara, 387 F.2d 150, 151 (3d Cir. 1967), cert. denied sub nom. Brown v. Clifford, 390 U.S. 1005, 88 S. Ct. 1244, 20 L. Ed. 2d 105 (1968).
2. AR 635-20, paragraph 5, provides that a commander is authorized to return a second or subsequent application submitted by a soldier "when review reveals that it is substantially the same as a previous application disapproved by Headquarters, Department of the Army."
3. On August 24, 1970, the respondents in the Washington action filed a motion to dismiss for lack of jurisdiction. On September 8, 1970, the petitioner filed a motion to withdraw the action without prejudice. On September 11, 1970, this motion was granted by the District Court for the Western District of Washington. It does not appear, however, that the Pennsylvania district court was aware of these facts at the time that its Memorandum and Order was filed on September 15, 1970.
4. See, e.g., Schlanger v. Seamans, 401 U.S. 487, 489, 91 S. Ct. 995, 28 L. Ed. 2d 251 (1971); United States ex rel. Rudick v. Laird, 412 F.2d 16 (2d Cir.), cert. denied 396 U.S. 918, 90 S. Ct. 244, 24 L. Ed. 2d 197 (1969); Hammond v. Lenfest, 398 F.2d 705 (2d Cir. 1968); Brown v. McNamara, 387 F.2d 150 (3d Cir. 1967), cert. denied sub nom. Brown v. Clifford, 390 U.S. 1005, 88 S. Ct. 1244, 20 L. Ed. 2d 105 (1968).
5. On August 5, 1971, Meck was released from active duty in the Army and assigned to the U. S. Army Reserve Control Group, USAAC, St. Louis, Missouri. Apparently Meck expects to be assigned to an Army Reserve Unit in Philadelphia sometime within 90 days of August 5. This change in status, however, does not render the case moot in view of the continuing obligations of a member of the Army Reserve. See Hammond v. Lenfest, 398 F.2d 705 (2d Cir. 1968) (naval reservist ordered to active duty); Nason v. Secretary of the Army, 304 F. Supp. 422 (D.Mass.1969) (doctor commissioned in the Reserves but not attached to any reserve unit and deferred from active duty); Silberberg v. Willis, 420 F.2d 662 (1st Cir. 1970) (reservist on orders to active duty); Bohnert v. Faulkner, 438 F.2d 747 (6th Cir. 1970) (reservist). See also Gillette v. United States, 401 U.S. 437, 440 n. 2, 91 S. Ct. 828, 28 L. Ed. 2d 168 (1971), where the Court said: "Since petitioner Negre is no longer on active duty in the Army, the dispute . . . lacks the same intensity that was present at the time that Negre commenced his habeas action. However, some possibility of Vietnam duty apparently remains, and the Government seems to concede that the case has not been mooted. We therefore pursue the matter no further." Cf. Carafas v. LaVallee, 391 U.S. 234, 88 S. Ct. 1556, 20 L. Ed. 2d 554 (1968) (habeas appeal not rendered moot even if the appellant is unconditionally released after serving his prison sentence); Jones v. Cunningham, 371 U.S. 236, 83 S. Ct. 373, 9 L. Ed. 2d 285 (1963) (a prisoner released on parole can maintain his habeas corpus action).
6. When Meck surrendered to the military authorities at Valley Forge General Hospital on August 5, 1970, the Hospital Judge Advocate, Michael Briggs, acknowledged his surrender and he was confined at the Office of the Provost Marshal there. Sometime later, Meck was transferred to the brig at the Philadelphia Naval Base, where he was confined until September 16, 1970, the day after the district court had dismissed his petition, when he was transferred to Fort Meade, Maryland.
7. The district court relied upon an Army Regulation (AR 630-10, § 51) and three First Army Regulations (1A Reg. 11-6, Appendices A, B, Map #A-17; 1A Reg. 190-2, § 25; 1A Reg. 190-5, § 6). But see AR 630-10, § 52, note 15, infra.
8. 335 U.S. at 191, 68 S. Ct. at 1444.
10. 335 U.S. at 192, 68 S. Ct. at 1445.
11. On September 16, 1970, the day after the district court dismissed his petition, Meck was physically transferred to Fort Meade, Maryland, and placed under the authority of its Commanding Officer. This transfer, however, does not deprive this court of jurisdiction over the appeal. See Rule 23 of the Federal Rules of Appellate Procedure; Ex Parte Endo, 323 U.S. 283, 65 S. Ct. 208, 89 L. Ed. 243 (1944). The matter is not entirely free from doubt inasmuch as it is not clear that a suitable respondent with custody remained in this jurisdiction. See Jones v. Cunningham, 371 U.S. 236, 243-244, 83 S. Ct. 373, 9 L. Ed. 2d 285 (1963); see also Ahrens v. Clark, 335 U.S. 188, 193, 68 S. Ct. 1443, 92 L. Ed. 1898 (1948). However, Rule 23 of the Federal Rules of Appellate Procedure makes it clear that the transfer of petitioner to another's custody may not be a means of depriving the court of jurisdiction once it has attached. See Hudson v. Hardy, 137 U.S.App.D.C. 366, 424 F.2d 854, 856 n. 5 (1970); cf. United States ex rel. Meadows v. State of N. Y., 426 F.2d 1176, 1182 (2d Cir. 1970): "The jurisdiction of a district court is not defeated when a petitioner who has commenced a proceeding while present in the district is involuntarily removed during its pendency." Furthermore, on October 23, 1970, the Supreme Court granted Meck's motion for a stay of proceedings and injunction pending appeal, after the Solicitor General had assured the Court that the Secretary of the Army would insure compliance with this court's disposition of the case.
12. 28 U.S.C. § 2243 (1964) provides that the petitioner's presence at a hearing is not required if "the application for the writ and the return present only issues of law."
13. Most courts have reached the same result on similar facts. See e.g. Davish v. Commanding Officer, Civ. Action No. 70-497 (E.D.Pa., Aug. 21, 1970) (Marine who had gone AWOL from Camp Pendleton and turned himself in to the Naval Station in Philadelphia); United States ex rel. Crane v. Laird, 315 F. Supp. 837 (D.Or.1970) (Army enlisted man assigned to the Overseas Replacement Station, Oakland, Cal., who was AWOL and turned himself in to civilian authorities at his home in Eugene, Oregon). But see Morales Crespo v. Perrin, 309 F. Supp. 203 (D.P.R.1970) (Army enlisted man assigned to Oakland, Cal., who was AWOL and turned himself in to military authorities at his home in Puerto Rico). Respondents rely upon the decisions in United States ex rel. Rudick v. Laird, 412 F.2d 16 (2d Cir. 1969), and Jarrett v. Resor, 426 F.2d 213 (9th Cir. 1970). These cases are, however, distinguishable on their facts, since both involved habeas petitions submitted by soldiers while on authorized leave between duty stations, rather than petitions filed by AWOL soldiers who had turned themselves in to military authorities. In the former case the soldiers arguably are not in custody within the court's jurisdiction, since they were free to depart during the period of their leave. But see United States ex rel. Lohmeyer v. Laird, 318 F. Supp. 94 (D.Mary.1970). But Meck was not free to leave the Valley Forge General Hospital after he had turned himself in to the military authorities there on August 5, 1970. He was apparently in actual physical custody and if he had left he might have been charged with the offense of breach of arrest or escape from custody (see Article 95, Uniform Code of Military Justice) or been considered absent without leave (see Article 86, Uniform Code of Military Justice).
14. See 401 U.S. at 487-489, 91 S. Ct. 995.
15. AR 630-10, § 52, provides that: "If the individual [absentee] is returned to military control at a station other than from where he absented himself, the commander of the installation who received the absentee will -- "a. Attach the individual, effective the date of return to military control, pending clarification of status and disposition, or "b. Assign the individual, effective the date of his return to military control, if he had been dropped as a deserter prior to such return." Since Meck apparently had been dropped as a deserter from his unit at Fort Lewis, Washington, subsection b. would apply and he would be assigned by the Commanding Officer at the Valley Forge General Hospital.
16. See note 11, supra.
17. In Sanders the Court made it clear that a federal court may refuse to consider the merits of a second or successive application for the writ of habeas corpus if the petitioner's conduct has amounted to "an abuse of the writ," notwithstanding the fact that the grounds presented in the earlier writ were not adjudicated on the merits. See 373 U.S. at 17-18, 83 S. Ct. 1068. The Court also stated that the federal trial judge has the primary responsibility in this area: "The principles governing * * * justifications for denial of a hearing on a successive application are addressed to the sound discretion of the federal trial judges. Theirs is the major responsibility for the just and sound administration of the federal collateral remedies, and theirs must be the judgment as to whether a second or successive application shall be denied without consideration of the merits." 373 U.S. at 18, 83 S. Ct. at 1079. In addition to the principles of abuse of the writ developed in Sanders and the deliberate by-pass of previously available remedies discussed in Fay v. Noia, supra, the principle of comity may also apply to foreclose habeas corpus relief in a federal district court to a petitioner who has been denied preliminary relief in a habeas corpus action which is pending in another federal district court. See Birnbaum v. Harris, 222 F. Supp. 919, 920 (W.D.Miss.1963); cf. H. N. Hart & H. Wechsler, The Federal Courts and the Federal System, 1055-57 (1953). Since habeas corpus actions are governed by equitable principles (see Fay, supra, at p. 438 of 372 U.S. 391, 83 S. Ct. 822, 9 L. Ed. 2d 837) and counsel for Meck in the U. S. District Court for the Western District of Washington presumably advised him of all the consequences of instituting suit there, principles of equitable election may have some application to Meck's subsequent attempt to sue in Pennsylvania, with the resultant waste in judicial time. See G. Serrell, The Equitable Doctrine of Election (1891); 12 Pa.Law Enc., Election of Remedies 583-84 (1959); 28 C.J.S. Election p. 1054 (1941).
18. 28 U.S.C. § 1361 provides as follows: "The district courts shall have original jurisdiction of any action in the nature of mandamus to compel an officer or employee of the United States or any agency thereof to perform a duty owed to the plaintiff."
19. Although not explicitly dealt with by the parties, personal jurisdiction over the Secretary of the Army -- a named respondent in this suit -- appears to exist pursuant to 28 U.S.C. § 1391(e). See Metz v. United States, 304 F. Supp. 207 (W.D.Pa.1969); Byse & Fiocca, "Section 1361 of the Mandamus and Venue Act of 1962 and 'Nonstatutory' Judicial Review of Federal Administrative Action," 81 Harv.L.Rev. 308, 310 & n. 6 (1967).
20. See e.g. Jarrett v. Resor, 426 F.2d 213, 216 (9th Cir. 1970), where the court said: "[A] writ may not issue under section 1361 unless it appears that the claim is clear and certain and the duty of the officer is ministerial and so plainly prescribed as to be free from doubt." See also Feliciano v. Laird, 426 F.2d 424 (2d Cir. 1970).