Mr. Justice Stewart
delivered the opinion of the Court.
In 1954 a jury in a Federal District Court found the petitioner guilty of transporting a kidnapped person in interstate commerce in violation of 18 U. S. C. § 1201, and of transporting a stolen automobile in interstate commerce in violation of 18 U. S. C. § 2312. The petitioner was represented by court-appointed counsel at his trial. When, with counsel, he appeared before the District Judge for sentencing, the petitioner was not asked whether he wished to make a statement in his own behalf. The District Judge, after noting his familiarity with the petitioner’s character and history, imposed consecutive prison sentences of twenty years and three years for the two offenses of which the jury had found the petitioner guilty. There was no appeal.
The present litigation began in 1959 with the filing of a motion to vacate sentence under 28 U. S. C. § 2255. Among various grounds for relief asserted, the motion alleged that the petitioner at the time of sentencing had been “denied the right under Rule 32 (a) of Federal Rules of Criminal Procedure, Title 18 U. S. C. to have the opportunity to make a statement in his own behalf and to present any information in mitigation of punishment.” The District Court denied the motion without explicitly discussing the Rule 32 (a) claim. 186 F. Supp. 441. The Court of Appeals affirmed, per curiam, 282 F. 2d 352. We granted certiorari “limited to the question of whether petitioner may raise his claim under Federal Criminal Rule 32 (a) in the proceeding which he has now brought.” 365 U. S. 841.
Rule 32 (a) in pertinent part provides: “Before imposing sentence the court shall afford the defendant an opportunity to make a statement in his own behalf and to present any information in mitigation of punishment.” The meaning of this Rule was before the Court last Term in Green v. United States, 365 U. S. 301. Although there was no Court opinion in the Green case, eight members of the Court concurred in the view that Rule 32 (a) requires a district judge before imposing sentence to afford every convicted defendant an opportunity personally to speak in his own behalf. There thus remains no doubt as to what the Rule commands. Moreover, the present record makes clear that this petitioner was not given an express opportunity to make a personal statement at the time he was sentenced. This case, therefore, is totally unembarrassed by any such factual controversy as divided the Court in Green. The only issue presented is whether a district court’s failure explicitly to afford a defendant an opportunity to make a statement at the time of sentencing furnishes, without more, grounds for a successful collateral attack upon the judgment and sentence. We hold that the failure to follow the formal requirements of Rule 32 (a) is not of itself an error that can be raised by collateral attack, and we accordingly affirm the judgment of the Court of Appeals.
Section 2255 of Title 28, U. S. C., provides that a prisoner in custody under sentence of a federal court may file a motion in the “court which imposed the sentence to vacate, set aside or correct the sentence.” The statute states four grounds upon which such relief may be claimed: (1) “that the sentence was imposed in violation of the Constitution or laws of the United States;” (2) “that the court was without jurisdiction to impose such sentence;” (3) “that the sentence was in excess of the maximum authorized by law;” and (4) that the sentence “is otherwise subject to collateral attack.”
The circumstances which led Congress in 1948 to enact this legislation were reviewed in detail by Chief Justice Vinson, writing for the Court in United States v. Hayman, 342 U. S. 205. It is unnecessary to review again here this legislative history, with which Chief Justice Vinson, as Chairman of the Judicial Conference of the United States, was particularly familiar. Suffice it to say that it conclusively appears from the historic context in which § 2255 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. See Heflin v. United States, 358 U. S. 415, 421 (concurring opinion).
“[A] 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.” United States v. Hayman, 342 U. S., at 219. (Emphasis added.)
The failure of a trial court to ask a defendant represented by an attorney whether he has anything to say before sentence is imposed is not of itself an error of the character or magnitude cognizable under a writ of habeas corpus. It is an error which is neither jurisdictional nor constitutional. It is not a fundamental defect which inherently results in a complete miscarriage of justice, nor an omission inconsistent with the rudimentary demands of fair procedure. It does not present “exceptional circumstances where the need for the remedy afforded by the writ of habeas corpus is apparent.” Bowen v. Johnston, 306 U. S. 19, 27. See Escoe v. Zerbst, 295 U. S. 490; Johnson v. Zerbst, 304 U. S. 458; Walker v. Johnston, 312 U. S. 275; Waley v. Johnston, 316 U. S. 101.
In Sunal v. Large, 332 U. S. 174, the Court held that the remedy of habeas corpus was unavailable in circumstances far more compelling than are presented here. There the petitioners at their criminal trial had been denied an opportunity to present a defense which subsequent decisions of this Court had held should clearly have been available to them. What was said in that case is apposite here :
“We are dealing here with a problem which has radiations far beyond the present cases. The courts which tried the defendants had jurisdiction over their persons and over the offense. They committed an error of law .... That error did not go to the jurisdiction of the trial court. Congress, moreover, has provided a regular, orderly method for correction of all such errors by granting an appeal to the Circuit Court of Appeals and by vesting us with certiorari jurisdiction. It is not uncommon after a trial is ended and the time for appeal has passed to discover that a shift in the law or the impact of a new decision has given increased relevance to a point made at the trial but not pursued on appeal. ... If in such circumstances, habeas corpus could be used to correct the error, the writ would become a delayed motion for a new trial, renewed from time to time as the legal climate changed. Error which was not deemed sufficiently adequate to warrant an appeal would acquire new implications. . . . Wise judicial administration of the federal courts counsels against such course, at least where the error does not trench on any constitutional rights of defendants nor involve the jurisdiction of the trial court.” 332 U. S., at 181-182.
It is to be noted that we are not dealing here with a case where the defendant was affirmatively denied an opportunity to speak during the hearing at which his sentence was imposed. Nor is it suggested that in imposing the sentence the District Judge was either misinformed or uninformed as to any relevant circumstances. Indeed, there is no claim that the defendant would have had anything at all to say if he had been formally invited to speak. Whether § 2255 relief would be available if a violation of Rule 32 (a) occurred in the context of other aggravating circumstances is a question we therefore do not consider. We decide only that such collateral relief is not available when all that is shown is a failure to comply with the formal requirements of the Rule.
It is suggested that although the petitioner denominated his motion as one brought under 28 U. S. C. § 2255, we may consider it as a motion to correct an illegal sentence under Rule 35 of the Federal Rules of Criminal Procedure. This is correct. Heflin v. United States, 358 U. S. 415, 418, 422. But, as the Rule’s language and history make clear, the narrow function of Rule 35 is to permit correction at any time of an illegal sentence, not to re-examine errors occurring at the trial or other proceedings prior to the imposition of sentence. The sentence in this case was not illegal. The punishment meted out was not in excess of that prescribed by the relevant statutes, multiple terms were not imposed for the same offense, nor were the terms of the sentence itself legally or constitutionally invalid in any other respect.
Affirmed.
In an earlier motion filed under 28 U. S. C. § 2255 the petitioner claimed that he had been prevented by government agents from appealing the judgment of conviction. The District Court denied the motion. The Court of Appeals set aside the District Court’s order and directed that a hearing be had on the motion. 256 F. 2d 957. After a hearing before a different district judge, the motion was again denied. The Court of Appeals affirmed. 268 F. 2d 203.
The majority of the Court in the Green case did not decide whether the issue of a Rule 32 (a) violation could be raised on collateral attack, or whether such a violation “would constitute an error per se rendering the sentence illegal.” 365 U. S., at 303.
“A prisoner in custody under sentence of a 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 or correct the sentence.” 28 U. S. C. § 2255.
See Parker, Limiting the Abuse of Habeas Corpus, 8 F. R. D. 171.
The Courts of Appeals, at least since the Hayman decision, appear to have consistently understood the substantive scope of § 2255 to be the same as that of habeas corpus. See, e. g., Larson v. United States, 275 F. 2d 673 (C. A. 5th Cir.); Black v. United States, 269 F. 2d 38 (C. A. 9th Cir.); Taylor v. United States, 229 F. 2d 826, 832 (C. A. 8th Cir.); Kreuter v. United States, 201 F. 2d 33, 35 (C. A. 10th Cir.).
See Van Hook v. United States, 365 U. S. 609, for the relief afforded on direct appeal in a case where the sentencing judge disregarded the mandate of Rule 32 (a).
Rule 35 provides in pertinent part: “The court may correct an illegal sentence at any time.”
As has been pointed out, Rule 35 “was a codification of existing law and was intended to remove any doubt created by the decision in United States v. Mayer, 235 U. S. 55, 67, as to the jurisdiction of a District Court to correct an illegal sentence after the expiration of the term at which it was entered.” Heflin v. United States, 358 U. S., at 422 (concurring opinion).
Compare Heflin v. United States, supra. In that case Rule 35 was invoked in a situation where we unanimously recognized that the only issue was whether “the sentence imposed was illegal on its face.” 358 U. S., at 418 (Court opinion), 422 (concurring opinion). Heflin involved the imposition of separate consecutive sentences for a single offense.