Van Dusen, Aldisert and Gibbons, Circuit Judges.
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.*fn1 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.*fn2
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.*fn3
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).*fn4 Therefore we conclude that the district court had subject matter jurisdiction of the petition filed by Meck on August 5, 1970.*fn5
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,*fn6 because the officer having ultimate administrative responsibility for his disposition was in Maryland.*fn7
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";*fn8 that the "opportunities for escape afforded by travel, the cost of transportation, the administrative burden of such an undertaking negate such a purpose";*fn9 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."*fn10 At the time that his petition was filed, Meck was physically confined within the Eastern District of Pennsylvania.*fn11 If his actual presence at the district court hearing was required,*fn12 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.*fn13
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."*fn14 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,*fn15 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.*fn16
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).*fn17
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.*fn18 The district court made no mention of this claim. Although the parties have presented arguments on the jurisdictional*fn19 and substantive*fn20 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 ...