opinion: SANDERS v. UNITED STATES.
  No. 202.
  Argued February 25, 1963.
  Decided April 29, 1963.
  Fred M. Vinson, Jr., by appointment of the Court, 371 U. S. 806, argued the cause and filed a brief for petitioner.
  Beatrice Rosenberg argued the cause for the United States. With her on the brief were Solicitor General Cox, Assistant Attorney General Miller and Sidney M. Glazer.
  Mr. Justice Brennan
  delivered the opinion of the Court.
  We consider here the standards which should guide a federal court in deciding whether to grant a hearing on a motion of á federal prisoner under 28 U. S. C. § 2255. Under that statute, a federal .prisoner who claims that his sentence was imposed in violation of the Constitution or laws of the United States may seek relief from the sentence by filing a motion in the sentencing court stating the facts supporting his claim. “[A] prompt hearing” on the motion is required “[u]nless the motion and the files and records of the case conclusively show that the prisoner is entitled to no relief . . . .” The section further provides that “[t]he sentencing court shall not be required to entertain a second or successive motion for similar relief on behalf of the same prisoner.”
  The petitioner is serving a 15-year sentence for robbery of a federally insured bank in violation of 18 U. S. C. §2113 (a). He filed two motions under § 2255. The first alleged no facts but only bare conclusions in support of his claim. The second, filed eight months after the first, alleged facts which, if true, might entitle him to relief. Both motions were denied,'without hearing, by the District Court for the' Northern District of California. On appeal from the denial of the second motion, the Court of Appeals for the Ninth Circuit affirmed. 297 F. 2d 735. We granted leave to proceed in forma pauperis and cer-tiorari. 370 U. S. 936.
  On January 19, 1959, petitioner was brought before the United States District Court for the Northern District of California, and was handed a copy of a proposed information charging him with the robbery. He appeared without counsel. In response to inquiries of the trial judge, petitioner stated that he. wished t<? waive assistance of counsel and to proceed by information rather than indictment; he signed a waiver of indictment, and then pleaded guilty to the charge in the information. On February 10 he was sentenced. Before sentence was pronounced, petitioner said to the judge: “If possible, your Honor, I would like to go to Springfield or .Lexington for addiction. cure. I have been using narcotics off and on for quite a while.” The judge replied that he was “willing to recommend that.”
  On Jánuary 4, 1960, petitioner, appearing pro se, filed • his first motion.. He alleged no facts but merely the conclusions that (1) the “Indictment” was invalid, (2) “Appellant was denied adequate assistance of Counsel as guaranteed by the Sixth Amendment,” and (3) the sentencing court had “allowed the Appellant to be intimidated and coerced into filtering [sic] a plea without Counsel, and any knowledge of the charges lodged against the Appellant.” He filed with the motion an application for a writ of habeas corpus ad testificandum requiring the. prison authorities to produce him before the court to testify in support of his motion. On February 3 the District Court denied both the motion and the application. In a memorandum accompanying the denial, the court explained that the motion, “although replete with conclusions, sets forth no facts upon which such conclusions can be founded. For this reason alone, this motion may be denied without a hearing.” Nevertheless, the court stated further that the motion “sets forth nothing but unsupported charges, which are completely refuted by the files and records of this case. Since the motion and the files and records of the case conclusively show that the prisoner is entitled to no relief, no hearing on the motion is necessary.” No appeal was taken by the petitioner from this denial.
  On September 8 petitioner, again appearing pro se, filed his second motion. This time he alleged that, at the time of his trial and sentence he was mentally incompetent as a result of narcotics administered to him while he was held in the Sacramento County Jail pending trial. He stated in a supporting affidavit that he had been confined in the jail from on or about January 16, 1959, to February 18, 1959; that during this period and during the period of his “trial” he had been intermittently under the influence of narcotics; and that the narcotics had been administered to him by the medical authorities in attendance at the jail because of his being a known addict. The District Court denied the motion without hearing, stating: “As there is no reason given, or appárent tó this Court, Why petitioner could not, and should hot, have raised the issue of mental incompetency at the time of his first motion, the Court will refuse, in the exercise of its statutory discretion, to entertain the present petition.” (Footnote omitted.) The court also' stated that “petitioner’s complaints are without merit in fact.” On appeal from the order denying this motion, the Court of Appeals for the Ninth Circuit affirmed. 297 F. 2d 735 (1961). The Court of Appeals said in a per curiam opinion: “Where, as here, it is ápparent from the record that at the time of filing the first motion the movant knew the facts on which the second motion is based, yet in the second motion set forth no reason why .he was previously unable-to assert the new ground and did not allege that he had previously been unaware of the significance of the relevant facts, the district court, may, in its discretion, decline to entertain the second motion.” 297 F. 2d, at 736-737.
  We reverse. We hold that the sentencing court should, have granted a hearing oh the second motion.
  I.
  The statute in'terms requires that a' prisoner shall be granted a hearing on a motion which alleges sufficient facts to support a claim for relief unless the motion and the files and records of the case “conclusively show” that the claim is without merit. This is the first case in which ' we have been called upon to determine what significance, in deciding whether to grant a hearing, the. sentencing court should attach to. any record of proceedings on prior '.motions for relief which may be among the files and records of the case, in light of the provision that: “The sentencing court shall not be required to entertain a second or successive motion-, for similar relief on behalf of the same prisoner.” This provision has caused uncertainty in the District Courts, see Bistram v. United States, 180 F. Supp. 501 (D. C. D. N. Dak.), aff’d, 283 F. 2d 1 (C. A. 8th Cir. 1960), and has provoked a conflict between circuits: with the decision of the Court of Appeals for the Ninth Circuit in the instant case, compare, e. g., Juelick v. United States, 300 F. 2d 381 (C. A. 5th Cir. 1962); Smith v. United States, 106 U. S. App. D. C. 169, 270 F. 2d 921 (1959). We think guidelines to the proper construction of the provision are to be found in its history.
  At common law, the denial by a court or judge of an application for habeas corpus was not res' judicata. King v. Suddis, 1 East 306, 102 Eng. Rep. 119 (K. B. 1801); Burdett v. Abbot, 14 East 1, 90, 104 Eng. Rep. 501, 535 (K. B. 1811); Ex parte Partington, 13 M. & W. 679, 153 Eng. Rep. 284 (Ex. 1845); Church, Habeas Corpus (1884), § 386; Ferris and Ferris, Extraordinary Legal Remedies (1926), § 55. “A person detained in custody might thus proceed from court to court until he obtained his liberty.” Cox v. Hakes, 15 A. C. 506, 527 (H. L., 1890) That this was a principle of our law of habeas corpus as well as the English was assumed to be thé case from the earliest days of federal habeas corpus jurisdiction.. Cf. Ex parte Burford, 3 Cranch 448 (Chief Justice Marshall). Since then,, it has become settled in an unbroken line of decisions. Ex parte Kaine, 3 Blatchf. 1, 5-6 (Mr. Justice Nelson in Chambers); In re Kaine, 14 How. 103; Ex parte Cuddy, 40 F. 62, 65 (Cir. Ct. S. D. Cal. 1889) (Mr. Justice Field); Frank v. Mangum, 237 U. S. 309, 334; Salinger v. Loisel, 265 U. S. 224, 230; Waley v. Johnston, 316 U. S. 101; United States ex rel. Accardi v. Shaughnessy, 347 U. S. 260, 263, n. 4; Heflin v. United States, 358 U. S. 415, 420 (opinion of Mr. Justice Stewart) (dictum); Powell v. Sacks, 303 F. 2d 808 (C. A. 6th Cir. 1962). Indeed, only the other day we remarked upon “the familiar principle that res judicata is inapplicable in habeas proceedings.” Fay v. Noia, 372 U. S. 391, 423.
  It has been suggested, see Salinger v. Loisel, supra, at 230-231, that this principle derives from the fact that at common law habeas corpus judgments were not appeal-able. But its roots would seem to go deeper. Conventional notions of finality of litigation have no place where life or liberty is at stake and infringement of constitutional rights is alleged. If “government . . . [is] always [to] be accountable to the judiciary for a man’s imprisonment,” Fay v. Noia, supra, at 402, access to the courts on habeas must not be thus impeded. The inapplicability of res judicata to habeas, then, is inherent in the very role and function of the writ.
  A prisoner whose motion Under § 2255 is denied will often file another, sometimes many successive motions. We are aware that in consequence the question whether to grant a hearing on a successive motion can be troublesome — particularly when the- motion is prepared without the assistance of counsel and contains matter extraneous to the prisoner’s ease. But the problem is not new, and our decisions under habeas corpus have identified situations where denial without hearing is proper even though a second or successive application states a claim for relief. One such situation is that involved in Salinger v. Loisel, supra. There, a first application for habeas corpus had been denied, after hearing, by one District Court, and the denial was affirmed by the Court, of Appeals. The prisoner then filed subsequent applications, all identical to the first, in a different District Court. We indicated that the subsequent applications might properly have been denied simply on the basis that the first denial had followed a full hearing on the merits. We there announced a governing principle; while reaffirming the inapplicability of res judi-cata to habeas, we said: “each application is to be dis.-posed of in the exercise of a sound judicial discretion guided and controlled by a consideration of whatever has a rational bearing on the propriety of the discharge sought.Among the matters which may be considered, and even given controlling weight, are .... a prior refusal to discharge on a like application.” 265 U. S., at 231. The Court quoted approvingly from Mr. Justice Field’s opinion in Ex parte Cuddy, supra, at 66: “ ‘The action of the court or justice on the second application will naturally be affected to some degree by the character of the court or officer to whom the first application was made, and the fullness of the consideration given to it.’ ” 265 U. S., at 231-232. The petitioner’s successive applications were properly denied because he sought to retry a.claim previously fully considered and decided against him. Similarly, nothing in § 2255 requires that •& sentencing court grant. a hearing on a successive motion alleging a ground for-relief already fully considered on a prior motion and decided against the prisoner.
  Another such situation is that which was presented in Wong Doo v. United States, 265 U. S. 239. In Wong Doo the prisoner in his first application for habeas corpus tendered two grounds in support of his position. A hearing was held but the petitioner offered no proof of his second ground, even though the return to the writ had put it in issue. .Relief was denied and the denial affirmed by the Circuit Court of Appeals. Later, he filed a second application relying exclusively on the second ground. Relief was denied. We upheld the denial: “The petitioner had full opportunity to offer proof of , . [the second ground] at the hearing on the first petition; and, if he was intending to’rely on that ground, good faith required that he produce the proof then. To reserve the proof for use in attempting to support a later petition, if the first failed, was to make an abusive use of the writ of' habeas corpus. No reason for not presenting the.proof at the outset is offered. It has not been embodied in the record, but what is said of it there and in the briefs shows that it was accessible all the'time.” 265 U. S., at 241. Similarly, the prisoner who on a prior motion under' § 2255 ’ has deliberately withheld a ground for relief need not be heard if he asserts that ground in a successive-motion; his action is inequitable — an abuse of the remedy — and the court may in its discretion deny him a hearing.
  The interaction of these, two principles — a successive application on a ground heard and denied on a prior application, and abuse of the writ — was elaborated in Price v. Johnston, 334 U. S. 266, 287-293. The petitioner had for the first time in his fourth application alleged the knowing use of perjured testimony by the prosecution.. But the Court held that regardless of the number of prior applications, the governing principle announced in Salinger v. Loisel could not come into play because the fourth application relied on a ground not previously heard and determined. Wong Doo was distinguished on the ground that-there the proof had been “accessible at all times” to’the petitioner, which demonstrated his bad faith, 334 U. S., at 289; in Price, by contrast, for aught the record disclosed petitioner might have been justifiably ignorant of newly alleged facts or unaware of their legal significance. The case also decided an.important procedural question • with regard to abuse of remedy as justification for denial of a hearing, namely, that the burden is on the Government to plead abuse of the writ. “[I]f the Government chooses hot to deny the allegation [of knowing use of perjured testimony] or to question its sufficiency and de-' sires instead to claim that the prisoner has abused the writ of habeas corpus, it rests with the Government to make, that claim .with clarity and particularity in its return to. the order to show cause.” Id., at 292. The Court reasoned that it would be unfair to- compel the habeas applicant, typically unlearned in the law and unable to procure legal assistance in drafting his application, to plead an elaborate negative.
  Very shortly after the Price decision, as part of the 1948 revision of the Judicial Code, the Court’s statement in Salinger of the governing principle in the treatment of a successive application was given statutory form. 28 U. S. C. § 2244. There are several things to be observed about this codification.
  First, it plainly was not intended to change, the law as -judicially evolved. ■ Not only does the Reviser’s Note disclaim-any sudh' intention, but language in the.original bill which would have injected res judicata into federal'habeas corpus was deliberately eliminated from the Act as finally passed. See S. Rep. No. 1559, 80th Cong., 2d Sess. 9Moore, Commentary on the United States Judicial Code (1949), 436-438. Moreover, if. construed, to. derogate from the traditional liberality of the writ of habeas corpus, see pp. 7-8, supra, § 2244 might raise serious constitutional questions. Cf. Fay v. Noia, supra, at 406.
  Second, even with respect to successive applications on which hearings may be denied because the ground asserted was previously heard and decided, as in Salinger, § 2244 is faithful to the Court’s phrasing of the principle in' Salinger, and does.not enact a rigid rule.' The judge is permitted, not compelled, to decline to entertain such an application, and .then only if he “is satisfied that the ends of justice will not be served” by inquiring into the merits.
  Third, § 2244 is addressed only to the problem of successive applications based on grounds previously heard and decided. It does.not cover a second or successive application containing a ground “not theretofore presented and determined,” and so does not touch the problem of abuse of the writ. In Wong Doo, petitioner’s second ground had been presented.but not determined on his prior application; § 2244 would be inapplicable in such a situation. On the other hand, § 2244 was obviously not intended to- foreclose judicial application of the abuse-of-writ principle as developed in Wong Doo and Price.
  Section 2255 of the Judicial Code, under which the instant case arises, is of course also a product of the 1948 revision — enacted, in the language of the Reviser’s Note, to provide “an expeditious remedy for correcting erroneous sentences [of federal prisoners] without resort to habeas corpus.” It will be noted that although § 2255 contains a parallel provision to § 2244, there is an apparent verbal discrepancy. Undér § 2255, it is enough, in order to invoke the court’s discretion to decline to reach the merits, that the prisoner is seeking “similar relief” for the second time. This language might seem to empower the sentencing court to apply res judicata virtually at will,, since even if a second motion is predicated on a completely different ground from the first, the prisoner ordinarily will be seeking the same “relief.” Note, 59 Yale L. J. 1183, 1188, n. 24 (1950). But the language cannot be taken literally. In United States v. Hayman, 342 U. S. 205, the prisoner vigorously contended that § 2255 was an unconstitutional suspension of the writ of habeas corpus. The Court avoided the constitutional question by holding that § 2255 was as broad as habeas corpus:
  “This review of the history of Section 2255 shows that it was passed at the instance of the Judicial Conference to meet practical difficulties that had arisen in administering the habeas corpus jurisdiction of the federal courts. Nowhere in the history of Section 2255 do we find any purpose to impinge upon prisoners’ rights of collateral attack upon their convictions. On the contrary, the sole purpose was to minimize the difficulties encountered in habeas corpus hearings by affording the same rights in another and more convenient forum.” 342 U. S., at 219. (Emphasis supplied.) Accord, United States v. Morgan, 346 U. S. 502, 511; Smith v. United States, 88 U. S. App. D. C. 80, 187 F. 2d 192 (1950); Heflin v. United States, 358. U. S. 415, 421 (opinion of Mr. Justice Stewart).
  As we said just last Term, “it conclusively appears from the historic context in which § 2265 was enacted that the legislation was intended simply to provide in the sentencing court a remedy exactly commensurate with that which had previously been available by habeas corpus in the court of the district where the prisoner was confined.” Hill v. United States, 368 U. S. 424, 427.
  • Plainly, were the prisoner invoking § 2255 faced with the bar of res judicata, he would not enjoy the “same rights” as the habeas corpus 'applicant,, or “a remedy exactly commensurate with” habeas. Indeed, if he were subject to any substantial procedural hurdles which made his remedy under § 2255 less swift and imperative than féderal habeas corpus, the gravest constitutional doubts would, be engendered, as the Court in Hayman implicitly recognized. And cf. pp. 11-12, supra. We therefore hold that the “similar relief” provision of § 2255. is to be deemed the material équívalent of § 2244. See Smith v. United States, 106 U. S. App. D. C. 169, 173, 270 F. 2d 921, 925 (1959); Longsdorf, The Federal Habeas Corpus Acts Original and Amended, 13 F. R. D. 407, 424 (1953). We are helped to this conclusion by two further considerations.
  . First, there is no indication in the legislative history to the 1948 revision of the Judicial Code that Congress intended to treat the problem of successive applications differently under habeas corpus- than under the new motion procedure; and it is difficult to see what logical or practical basis there could be for such' a distinction.
  Second,’even assuming the constitutionality of incorporating res judicata in § 2255, such a provision wofild •probably prove to be completely ineffectual, in light of the further provision in the section that habeas corpus remains available to a federal prisoner if the remedy by motion is “inadequate or ineffective.”. A prisoner barred by res judicata would seem as a consequence to have an “inadequate or ineffective” remedy under § 2255 and thus be entitled to proceed in. federal habeas corpus — where, of course, § 2244 applies. See Smith v. United States, sura, 106 U. S. App. D. C., at 174, 270 F. 2d, at 926.
  II.
  We think the judicial and statutory evolution of the principles governing successive applications for federal habeas corpus and motions under § 2255 has reached the point at which the formulation of basic rules to guide the. lower federal courts is both feasible and desirable. Compare Townsend v. Sain, 372 U. S. 293, 310. Since the motion procedure is the substantial .equivalent of federal habeas corpus, we see no need to differentiate the two for present- purposes. It should be noted that these rules are not operative in cases where the second or successive application is shown, on the basis of the application, files, and records of the case alone, conclusively to be without merit. 28 U. S. C. §§ 2243, 2255. In such a case the application should be denied without a hearing.
  A.'Successive Motions on Grounds Previously Heard and Determined.
  Controlling weight may be given to denial'of a prior application for federal habeas corpus or § 2255 relief only if (1) the same ground presented in the subsequent application was determined adversely to the applicant' on the prior application, (2) the prior determination was on the merits, and (3) the ends of justice would not be served by reaching the merits of the subsequent application.
  (1) By “ground,” we mean simply a sufficient: legal-basis for granting the relief sought by the applicant. For' example, the contention that an involuntary confession was admitted in evidence against him is a distinct ground for federal collateral relief. But a claim of involuntary confession predicated on alleged psychological coercion does not raise a different “ground” than does one predicated on alleged physical coercion. In other words, identical grounds may often be proved by different factual allegations. So also, identical grounds may often be supported by different legal arguments, cf. Wilson v. Cook, 327 U. S. 474, 481; Dewey v. Des Moines, 173 U. S. 193, 198, or be couched in different language, United States v. Jones, 194 F. Supp. 421 (D. C. D. Kan. 1961) (dictum), aff'd mem., 297 F. 2d 835 (C. A. 10th Cir.1962), or vary in immaterial respects, Stilwell v. United States Marshals, 192 F. 2d 853 (C. A. 4th Cir. 1951) (per curiam). Should doubts arise in particular cases as to whether two grounds are different or the same, they should be resolved in favor of the applicant.
  (2) The prior denial must have rested on. an adjudication of the merits of the ground presented in the subsequent application. See Hobbs v. Pepersack, 301 F. 2d 875 (C. A. 4th Cir. 1962). This means that if factual issues were raised in the prior application, and it was not denied on the basis that the files and records conclusively resolved these issues, an evidentiary hearing was held. See Motley v. United States, 230 F. 2d 110 (C. A. 5th Cir. 1956); Hallowell v. United States, 197 F. 2d 926 (C. A. 5th Cir. 1952).
  (3) Even if the same ground was rejected on the mérits on a prior application, it is open to the applicant to show that' the ends of. justice would be served by permitting the redetermination of the ground. If factual issues are involved, the applicant is entitled to a new hearing upon showing that the evidentiary hearing on the prior application was not full and fair; we canvassed the criteria of a full and fair evidentiary hearing recently in Townsend v. Sain, supra, and that discussion need not be repeated .here. If purely legal questions are involved, the applicant may be entitled to a new hearing upon showing an intervening change in the law or some other justification for haying failed to raise a crucial point or argument in the prior .application. Two further points should be noted. First, the foregoing enumeration is not intended to be exhaustive; the test is “the ends of justice” and it cannot be too finely particularized. Second, the burden is on the applicant to show that, although the ground of the new application was determined against him on the merits on a prior application, the ends of justice would be served by a redetermination of the ground.
  B. The Successive Application Claimed to be an Abuse op Remedy.
  No matter ho.w many prior applications for federal collateral relief a prisoner has made, the principle elaborated, in Subpart A, supra, cannot' apply if a different ground is presented by the new application. So too, it cannot apply if the same ground was earlier presented but not adjudicated on the merits. In either case, full consideration of the merits of the new application can be avoided only if there has been an abuse of the writ or motion remedy; and this the Government has the burden of pleading. See p. 11, supra.
  To say that it is open to the respondent to show that a second or successive application is abusive is simply to recognize that “habeas corpus has traditionally been regarded as governed by equitable principles. United States ex rel. Smith v. Baldi, 344 U. S. 561, 573 (dissenting opinion). Among them is the principle that a suitor’s conduct in relation to the matter at hand may disentitle him to the relief he seeks. ' Narrowly circumscribed, in conformity to the historical role of the writ of habeas corpus as an effective and imperative remedy for detentions contrary to fundamental law, the principle is unexceptionable." Fay v. Noia, supra, at 438. Thus, for • example, if a prisoner deliberately withholds one of two grounds for federal collateral relief at the time of filing his first application, in the hope of being granted two hearings rather than one or for some other such reason, he may be deemed to have waived his right to a hearing on a second application presenting the withheld ground. The same may be true if, as in Wong Doo, the prisoner deliberately abandons one of his grounds at the first hearing. Nothing in the traditions of habeas corpus requires the federal courts to tolerate needless piecemeal litigation, or to entertain collateral proceedings whose only purpose is to vex, harass, or delay.
  We need not pause over the test governing whether a second or successive application may be deemed an abuse by the prisoner of the writ or motion remedy. The Court’s recent opinions in Fay v. Noia, supra, at 438-440, and Townsend v. Sain, supra, at 317, deal at length with the circumstances under which a prisoner may be foreclosed from federal collateral relief. The principles developed in those decisions govern equally here.
  A final qualification, applicable to both A and B of the foregoing discussion, is in order. Thé principles governing both 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. Even as to such an application, the federal judge clearly has the power — and, if the ends of justice'demand, the dutv — to reach the merits. Cf. Townsend v. Sain, supra, at 312, 318. We are confident that this power will bfe soundly-applied.
  III.
  Application of the foregoing principles to the instant case presents no difficulties. Petitioner’s first motion under § 2255 was denied because it stated only bald legal conclusions with no supporting factual allegations. The court had the power to deny the motion on this ground, see Wilkins v. United States, 103 U. S. App. D. C. 322, 258 F. 2d 416 (C. A. D. C. Cir. 1958), although the better course might have been to direct petitioner to amend his motion, see Stephens v. United States, 246 F. 2d 607 (C. A. 10th Cir. 1957) (per curiam). But •the denial, thus based, was not on the merits. It was merely a ruling that petitioner’s pleading was deficient; To be sure, the district judge stated, in a footnote to his memorandum: “The Court has reviewed the entire file . . . which includes the previous proceeding, and a transcript of the proceedings at the time petitioner entered his plea, and ... is of the view that petitioner’s complaints are without merit in fact.” But the “files and records of the ease,” including the transcript, could not .“conclusively show” that the claim alleged in the second motion entitled the petitioner to no relief. The crucial allegation of the second motion was that petitioner’s alleged mental incompetency was the result of administration of narcotic drugs during the period petitioner was held-in the Sacramento County Jail pending trial in the instant case. However regular the proceeding's at which he signed a waiver of indictment, declined assistance' of- counsel, and pleaded guilty might appear . from the transcript, it still might be -the case that petitioner did not make ah intelligent and understanding waiver of his constitutional rights. See Machibroda v. United States, 368 U. S. 487; Moore v. Michigan, 355 U. S. 155; Pennsylvania ex rel. Herman v. Claudy, 350 U. S. 116; Taylor v. United States, 193 F. 2d 411 (C. A. 10th Cir. 1952). Cf. Von Moltke v. Gillies, 332 U. S. 708. For the facts on which petitioner’s claim in his second application is predicated are outside the record. This is so even though the judge who passed on the two motions was the same judge who presided at the hearing at which petitioner made the waivers, and the later hearing at which he was sentenced. Whether or not petitioner was under the influence of narcotics would not necessarily have been apparent to the trial judge. Petitioner appeared before him without counsel and but briefly. That the judge may have thought that he acted with- intelligence and understanding in responding to .the judge’s inquiries cannot “conclusively show,” as the statute requires, that there is no merit in his present claim. Cf. Machibroda v. United States, supra, at 495. If anything, his request before sentence that the judge send him to a hospital “for addiction cure” cuts the other way. Moreover, we are' advised in the Government’s brief that the probation officer’s report made to the judge before sentence (the report is not part of the record in this Court) disclosed that petitioner received medical treatment for withdrawal symptoms while he was in jail-prior to sentencing.
  On remand, a hearing will be required. This is not to say, however, that it will automatically become necessary to produce petitioner at the hearing to enable him to testify. Not every colorable allegation entitles a federal prisoner to a trip to the sentencing court. Congress,' recognizing- the administrative burden involved in the transportation of prisoners to and from a hearing in the sentencing court, provided in § 2255 that the application may be entertained and determined “without requiring the production of the prisoner at the hearing.” This does not mean that a prisoner can be prevented from testifying in support of a substantial claim where his testimony would be material. However, we think it clear that the sentencing court has discretion to ascertain whether the claim is substantial before granting a full evidentiary hearing. In this connection, the sentencing court might find it useful to appoint counsel to represent the applicant. Cf. Coppedge v. United States, 369 U. S. 438, 446. Also, it will be open to the respondent to attempt to show that petitioner’s failure to claim mental incompetency in his first motion was an abuse of the motion remedy, within the principles of Wong Doo and Price v. Johnston, dis-entitling him to a hearing on the merits. We leave to the District Court, in its sound discretion, the question whether the issue of abuse of the motion remedy, if advanced by respondent, or the issue on the merits, can under the circumstances be tried without having the prisoner present. As we said only last Term:
  “What has been said is not to imply that a movant [under § 2255] must always be allowed'to appear in a district court for a full hearing if the record does not conclusively and' expressly belie his claim, no matter how vague, conclusory, or palpably incredible his allegations may be. • The langúagé of the statute does not strip the district courts of all discretion to exercise their common sense. Indeed, the statute itself recognizes that there are times when allegations of facts outside the record can be fully investigated without requiring the personal presence of the prisoner. Whether the petition in the present case can appropriately be disposed of without'the presence of the petitioner at the hearing is a question to be resolved in the further proceedings in the District Court.
  “There will always be marginal cases, and this case is not far from the line. But the. specific and detailed factual assertions of the petitioner, while improbable, cannot at this juncture be said to be incredible.- If the allegations are true, the petitioner is clearly entitled to relief. . . .” Machibroda v. United States, supra, at 495-496. (Footnote omitted.)
  The need for great care in criminal collateral procedure is well evidenced by the instant case. Petitioner was adjudged guilty of a crime carrying a heavy penalty in a summary proceeding at which he was not represented by counsel Very possibly, the proceeding was constitutionally adequate. But by its stimmary nature, and because defendant was unrepresented by counsel, a presumption of adequacy is obviously less compelling than it would be had there been a full criminal trial. Moreover, the nature of the proceeding was such as to preclude direct appellate review. In such a case it is imperative . that a fair opportunity for collateral relief be afforded. An applicant for such relief ought not to be held to the niceties of lawyers’ pleadings or bé cursorily dismissed because his claim seems unlikely to prove meritorious. That his application is vexatious or repetitious, or that his claim lacks any substance, must be fairly demonstrated.
  Finally, we remark that the imaginative handling of a prisoner’s first motion would in general do much to anticipate and avoid the problem of a hearing on a second or successive motion. The judge is not required to limit his decision on the first motion to the grounds narrowly alleged, or to deny the motion out of hand because the allegations are vague, conelusional, or inartistieally expressed. He is free to adopt any appropriate means for inquiry into the legality of the prisoner’s detention in order to ascertain all. possible grounds upon which the prisoner might claim to be entitled to relief. Certainly such an inquiry should be made if the judge grants a hearing on the first motion and allows the prisoner to be present. The disposition of all grounds for relief ascertained in this way may then be spread on the files and records of the case. Of course, to the extent the files and records “conclusively show” that the prisoner is entitled to . no relief on any such grounds, no hearing on a second or successive motion, to the extent of such grounds, would be necessary.
  The judgment of the Court of Appeals is reversed and the case is remanded to the District Court for a hearing consistent with this opinion.
  It is so ordered.
  Mr. Justice White concurs in the result.
  Section 2255 provides:.
  “A prisoner in 'custody under sentence of á court established by Act of Congress claiming the right to be released upon the ground that the sentence was imposed in violation of the Constitution or laws of the United States, or that the court was without jurisdiction to impose such sentence, or that the sentence was in excess of the maximum authorized by law, or is otherwise subject to collateral attack, may. move the court which imposed the sentence to vacate, set aside dr correct the sentence.
  “A motion for such relief may be made at any time.
  “Unless the motion and the files and records of the case conclusively show that the prisoner is entitled to no relief, the. court shall cause notice thereof to be served upon the United States attorney, grant a prompt hearing thereon, determine the issues and make findings of fact and conclusions of law with respect thereto. If the court finds that the judgment was rendered without jurisdiction,- of that the sentence imposed was not authorized by law or otherwise open to collateral attack, or that there has been such a denial or infringement'of the constitutional rights of the prisoner as to render the judgment vulnerable to collateral attack, the court shall vacate and set the judgment aside and shall discharge the prisoner or resentence him or grant a new trial or correct the sentence as -may appear appropriate.
  “A court' may entertain and determine such motion without requir- . ing the production of the prisoner at the hearing.
  “The sentencing court shall not be required to entertain a second or successive motion for similar relief on behalf of the same prisoner.
  “An appeal may be taken to the court of appeals from the order entered on the motion as from a final judgment on application for a writ of habeas-corpus.
  “An application for a writ of habeas corpus in behalf of a prisoner who is authorized to apply for relief by motion pursuant, to this section, shall not be entertained if it appears that the applicant has failed to apply for relief, by motion, to the court which sentenced him, or that such court has denied him relief, unless it also appears that the remedy by motion is inadequate or ineffective to test the legality of his detention.”
  Petitioner makes no claim that the procedure employed by the District Court was not adequate to advise him of his constitutional rights 'to assistance of counsel, grand jury indictment, and trial by jury.
  “This case has already been before the Court of Queen’s Bench, on the return of a habeas corpus, and before my Lord Chief Baron at' chambers, on a subsequent application for a similar writ. In both instances the discharge'was refused. The defendant, however, has a right to the opinion of every court as to the propriety of his imprison-’ ment, and therefore we have thought it proper to examine attentively the provisions of the statute, without considering ourselves as concluded by these decisions.” Ex parte Partington, supra, 13 M. & W., at 683-684, 153 Eng. Rep., at 286.
  See also Church, supra, §389. The traditional English practice has recently been curtailed by statute. Administration of Justice Act, 1960, 8 & 9 Eliz. II, c. 65, § 14 (2).
  Section 2244 proyides:
  “No circuit or district judge shall be required to entertain an application for a writ of habeas corpus-to inquire into the detention of a person pursuant to-a judgment of a court of the United-States,'or of any State, if it appears that the legality of such detention has been determined by a judge-or court of the United States on a prior application for a writ of habeas corpus and the petition presents no new ground not theretofore presented and determined, and the judge or court is satisfied that the ends of justice will not be served .by’ such inquiry.” ■
  Article 1, §9, cl. 2, of the Federal Constitution provides: “The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it.”
  The Court of Appeals in Hayman had held § 2255 unconstitutional. 187 F. 2d 456 (C. A. 9th Cir. 1950), amendexl, id., at 471 (1951). The same, position'had been taken in a Note, in the. Yale Law Journal, “Section 2255 of the Judicial Code: The Theatened Demise of Habeas Corpus,” 59 Yale L. J. 1183 (1950). In this Court, a powerful constitutional attack was mounted by respondent’s assigned counsel, Mr. Paul A. Freund.
  The discussion in this opinion relates, of course,. solely to the problem of successive applications for federal collateral relief. For the principles -which govern where the prior application is not for federal collateral relief, see Fay v. Noia, supra, and Townsend v. Sain, supra.
choices: involuntary confession habeas corpus plea bargaining: the constitutionality of and/or the circumstances of its exercise retroactivity (of newly announced or newly enacted constitutional or statutory rights) search and seizure (other than as pertains to vehicles or Crime Control Act) search and seizure, vehicles search and seizure, Crime Control Act contempt of court or congress self-incrimination (other than as pertains to Miranda or immunity from prosecution) Miranda warnings self-incrimination, immunity from prosecution right to counsel (cf. indigents appointment of counsel or inadequate representation) cruel and unusual punishment, death penalty (cf. extra legal jury influence, death penalty) cruel and unusual punishment, non-death penalty (cf. liability, civil rights acts) line-up discovery and inspection (in the context of criminal litigation only, otherwise Freedom of Information Act and related federal or state statutes or regulations) double jeopardy ex post facto (state) extra-legal jury influences: miscellaneous extra-legal jury influences: prejudicial statements or evidence extra-legal jury influences: contact with jurors outside courtroom extra-legal jury influences: jury instructions (not necessarily in criminal cases) extra-legal jury influences: voir dire (not necessarily a criminal case) extra-legal jury influences: prison garb or appearance extra-legal jury influences: jurors and death penalty (cf. cruel and unusual punishment) extra-legal jury influences: pretrial publicity confrontation (right to confront accuser, call and cross-examine witnesses) subconstitutional fair procedure: confession of error subconstitutional fair procedure: conspiracy (cf. Federal Rules of Criminal Procedure: conspiracy) subconstitutional fair procedure: entrapment subconstitutional fair procedure: exhaustion of remedies subconstitutional fair procedure: fugitive from justice subconstitutional fair procedure: presentation, admissibility, or sufficiency of evidence (not necessarily a criminal case) subconstitutional fair procedure: stay of execution subconstitutional fair procedure: timeliness subconstitutional fair procedure: miscellaneous Federal Rules of Criminal Procedure statutory construction of criminal laws: assault statutory construction of criminal laws: bank robbery statutory construction of criminal laws: conspiracy (cf. subconstitutional fair procedure: conspiracy) statutory construction of criminal laws: escape from custody statutory construction of criminal laws: false statements (cf. statutory construction of criminal laws: perjury) statutory construction of criminal laws: financial (other than in fraud or internal revenue) statutory construction of criminal laws: firearms statutory construction of criminal laws: fraud statutory construction of criminal laws: gambling statutory construction of criminal laws: Hobbs Act; i.e., 18 USC 1951 statutory construction of criminal laws: immigration (cf. immigration and naturalization) statutory construction of criminal laws: internal revenue (cf. Federal Taxation) statutory construction of criminal laws: Mann Act and related statutes statutory construction of criminal laws: narcotics includes regulation and prohibition of alcohol statutory construction of criminal laws: obstruction of justice statutory construction of criminal laws: perjury (other than as pertains to statutory construction of criminal laws: false statements) statutory construction of criminal laws: Travel Act, 18 USC 1952 statutory construction of criminal laws: war crimes statutory construction of criminal laws: sentencing guidelines statutory construction of criminal laws: miscellaneous jury trial (right to, as distinct from extra-legal jury influences) speedy trial miscellaneous criminal procedure (cf. due process, prisoners' rights, comity: criminal procedure)