opinion: Per Curiam.
  This is an application for a writ of habeas corpus brought in the United States District Court for the Southern District of Texas alleging unlawful detention under a sentence of imprisonment following a trial in the state court in which petitioner was, according to his claim, denied due process of law as guaranteed by the Due Process Clause of the Fourteenth Amendment of the United States Constitution. After hearing, the District Court dismissed the petition. The Court of Appeals for the Fifth Circuit, with one judge dissenting, affirmed the order of dismissal, 258 F. 2d 937, to which opinion reference is made for the facts. A petition for certiorari to review this judgment presented so impressive a showing for the exercise of this Court’s discretionary jurisdiction that the case was brought here with leave to the petitioner to proceed in forma pauperis, 359 U. S. 924, and his motion for the assignment of counsel was'duly granted. 359 U. S. 951.
  Before the case could come to be heard here, the petitioner was released from the state prison after having served his sentence with time off for good behavior. The case has thus become moot, and the Court is without jurisdiction to deal with the merits of petitioner’s claim. “The purpose of the proceeding defined by the statute [authorizing the writ of habeas corpus to be issued] was to inquire into the legality of the detention, and the only judicial relief authorized was the discharge of the prisoner or his admission to bail.” McNally v. Hill, 293 U. S. 131, 136. “Without restraint of liberty, the writ will not issue.” Id., 138. See also Johnson v. Hoy, 227 U. S. 245. “It is well settled that this court will not proceed to adjudication where there is no subject-matter on which the judgment of the court can operate.” Ex parte Baez, 177 U. S. 378, 390. We have applied these principles to deny the writ of certiorari for mootness on the express ground that petitioner was no longer in respondent’s custody in at least three cases not relevantly different from the present one. Weber v. Squier, 315 U. S. 810; Tornello v. Hudspeth, 318 U. S. 792; Zimmerman v. Walker, 319 U. S. 744. In all these cases there was custody as the basis for habeas corpus jurisdiction until the cases reached here. In Weber, the respondent’s custody ceased because the petitioner had received the benefits of the United States Parole Act. In Tornello the petitioner had been pardoned, and was no longer in the custody of anyone. In Zimmerman petitioner had been unconditionally released and was also no longer in the custody of anyone. These cases demonstrate that it is a condition upon this Court’s jurisdiction to adjudicate an application for habeas corpus that the petitioner be in custody when that jurisdiction can become effective. It is precisely because a denial of a petition for certiorari without more has no significance as a ruling that an explicit statement of the reason for a denial means what it says. Accordingly, the writ of certiorari is dismissed for want of jurisdiction.
  Since the case has become moot before the error complained of in the judgment below could be adjudicated, the case is remanded to the Court of Appeals to vacate its judgment and to direct the District Court to vacate its order and dismiss the application.
  It is likewise true that “a motion for relief under 28 U. S. C. § 2255 [relevant only to federal sentences] is available only to attack a sentence under which a prisoner is in custody.” 358 U. S., at 420. Contrary to the unconsidered assumption in Pollard v. United States, 352 U. S. 354, this was decided after full deliberation only a year ago. See the opinion of Mr. Justice Douglas, 358 U. S., at 418, and the opinion of Mr. Justice Stewart for the Court on this point, 358 U. S., at 420, in Heflin v. United States, 358 U. S. 415. Of course Rule 35 of the Federal Rules of Criminal Procedure is not available for state sentences.