Appellant appeals from the denial of a writ of habeas corpus under 28 U.S.C. § 2254. As a state prisoner, he was convicted in Supreme Court, New York County, on September 19, 1967, upon a plea of guilty to the crime of attempted grand larceny in the second degree. His maximum punishment for attempted grand larceny, second degree, was a term of 1.3 to 2.6 years’ imprisonment. NYPL §§ 261, 1297.1 Unbeknownst to appellant at the time the plea was entered, as a first offender who was under 30 years of age he was also subject to the indefinite five-year reformatory term at Elmira provided for in Penal Law § 2185. On November 30, 1967, before sentence was imposed, appellant wrote to the judge, Justice Mitchell D. Schweitzer, who had accepted the plea, asking to withdraw it. He stated in the letter that his attorney “forgot how young I am” and had informed him “that my maximum sentence would be 1.3-2.6 years.” Appellant stated that he was not guilty of the crime and that “I only took the plea because [my attorney] promised that all my cases 2 would be thrown into the att. Grand 2 [sic] sentence,” that is to say, the sentence for attempted grand larceny in the second degree. The letter was treated by Justice Schweitzer as a pro se motion to withdraw the plea and a hearing was held.
At this time in the New York criminal procedure, it should be noted, there was no obligation on the part of the judge accepting a plea similar to the obligation imposed upon federal judges by virtue of Fed.R.Crim.P. 11 to make sure *720that the person pleading guilty does so “with understanding of the eonsequenc.es of the plea.” Rather, as the State has conceded on argument, the sole obligation for advising the person pleading guilty as to the consequences of his plea rested on his attorney. Accordingly, there is nothing in the record to show that in any way the court accepting the plea advised the appellant as to its consequences. The state court hearing on the motion to withdraw the plea of guilty, then, turned on what the appellant’s attorney had told him prior to the entry of the plea; the only evidence in the hearing was that the attorney had told him that he was facing at most a one year and three months minimum and two years and six months maximum, and that he had not advised Leeson that —indeed, that he had overlooked the fact that — appellant was of an age where he could “get Elmira,” i. e., receive the indefinite five-year reformatory sentence to Elmira. Again, on cross-examination by the assistant district attorney, appellant stated that the only sentencing alternatives that he was told about by his attorney were that he “could get completely cut loose, I could get put on probation, I could get one month’s term, or one-three to two-six.” 3 He also denied his guilt and said that he pleaded guilty to a crime which he did not commit to get everything over and done with. The sentencing judge denied relief on the basis that “[t)he defendant's insistence that he was advised incorrectly by his own lawyer as to the sentence that he believed the court would impose can in no way bind the court in the absence of a showing that the court joined in such promises.” The sentencing judge thus conceived this— erroneously, we feel — as a case of an unwarranted assurance by counsel, rather than a case of lack of knowledge of the consequences of the plea.
Appellant appealed to the Appellate Division and then secured leave to appeal to the New York Court of Appeals, the basis for his argument being, as the briefs show, that the plea should be vacated because it was made in ignorance of the direct consequences of the conviction and that it was therefore not voluntarily entered in the constitutional sense. Both state appellate courts affirmed the conviction without opinion, so that there is no question but that appellant has exhausted his state remedies. District Judge Brieant below misconstrued this issue, probably because the briefs which were submitted to the Appellate Division and the Court of Appeals were not submitted to him at the time of the filing of the petition for habeas corpus. Thus, he incorrectly held that the constitutional issue as now tendered had not been determined by the state courts, relying on United States ex rel. Figueroa v. McMann, 411 F.2d 915, 916 (2d Cir. 1969), and he denied the petition.
The substantive facts, however, were called to the attention of the state trial court, and the issue was raised there though perhaps not as precisely as it was subsequently on appeal. On review the Appellate Division has the duty of reviewing the appellate record in determining whether errors had been preserved so as to warrant reversal “upon the facts” or “in the interests of justice,” see NYCPL § 470.15, and the question was raised in the brief there.4 Finally, the issue was spelled out plainly on page 5 of the appellant’s brief before the Court of Appeals: “It is our contention on this appeal that appellant’s plea, entered as it was out of ignorance of its *721direct consequences, cannot be considered voluntary in the constitutional sense [Kercheval v. United States, 274 U.S. 220, 223, 47 S.Ct. 582, 71 L.Ed. 1009]. . . .’’As our cases evince,, where the record shows that a state prisoner has raised an issue on appeal, then a proper exhaustion of state remedies has taken place, irrespective of whether an appellate opinion has been written indicating this fact. United States ex rel. Ross v. LaVallee, 448 F.2d 552, 554 (2d Cir. 1971); United States ex rel. Cardaio v. Casscles, 446 F.2d 632 (2d Cir. 1971); United States ex rel. Williams v. Zelker, 445 F.2d 451, 454-455 (2d Cir. 1971).
All that is required by Picard v. Connor, 404 U.S. 270, 276, 92 S.Ct. 509, 30 L.Ed.2d 438, 455 (1971), is that the state courts must have had a “fair opportunity” to consider a constitutional claim before federal habeas is available under the exhaustion doctrine. Here clearly both the Appellate Division and the Court of Appeals had such an opportunity.
Moreover, no state collateral remedy would be available in the event he were held not to have raised the question on appeal since under the New York Criminal Procedure Law, § 440.10, subd. 2(c), a motion to vacate a judgment must be denied where sufficient facts appear in the record to have permitted adequate appellate review of an issue where the issue was not raised on appeal.
On the merits, this is not the kind of case that apparently the sentencing judge thought it was, that is to say, where a guilty plea was based on an erroneous prediction about sentence given by counsel. See, e. g., United States ex rel. Bullock v. Warden, Westfield State Farm for Women, 408 F.2d 1326, 1330 (2d Cir. 1969), cert. denied, 396 U.S. 1043, 90 S.Ct. 688, 24 L.Ed.2d 686 (1970). Rather it is a case where the undisputed proof before the trial judge is that the defendant entered his plea in ignorance of what the maximum possible sentence was, believing it to be substantially less than that which the court was authorized to impose and which, indeed, it did impose.
It is settled law that a defendant who pleads guilty to a charge must do so “with full understanding of the consequences.” Kercheval v. United States, 274 U.S. 220, 223, 47 S.Ct. 582, 583, 71 L.Ed. 1009 (1927). See also McMann v. Richardson, 397 U.S. 759, 766, 90 S.Ct. 1441, 25 L.Ed.2d 763 (1970). As was explained in McCarthy v. United States, 394 U.S. 459, 466, 89 S.Ct. 1166, 1171, 22 L.Ed.2d 418 (1969) (emphasis added; footnotes omitted):
A defendant who enters such a plea simultaneously waives several constitutional rights, including his privilege against compulsory self-incrimination, his right to trial by jury, and his right to confront his accusers. For this waiver to be valid under the Due Process Clause, it must be “an intentional relinquishment or abandonment of a known right or privilege.” Johnson v. Zerbst, 304 U.S. 458, 464, 58 S. Ct. 1019, 82 L.Ed. 1461 (1938). Consequently, if a defendant’s guilty plea is not equally voluntary and knowing, it has been obtained in violation of due process and is therefore void. Moreover, because a guilty plea is an admission of all the elements of a formal criminal charge, it cannot be truly voluntary unless the defendant possesses an understanding of the law in relation to the facts.
Upon the facts in this case, appellant’s plea was not knowing and was without an understanding of the law inasmuch as he did not know the maximum possible sentence he might receive. It is thus a plea entered in ignorance of its direct consequences, and it is therefore invalid. See Marvel v. United States, 380 U.S. 262, 85 S.Ct. 953, 13 L.Ed.2d 960 (1965) (per curiam); Wells v. United States, 452 F.2d 1001, 1003 (5th Cir. 1971); *722Wade v. Wainwright, 420 F.2d 898 (5th Cir. 1969); Kotz v. United States, 353 F.2d 312, 314 (8th Cir. 1965); Matthews v. United States, 308 F.Supp. 456 (S.D.N.Y.1969); McCullough v. United States, 231 F.Supp. 740 (N.D.Fla.1964). Kotz, Matthews and McCullough are particularly pertinent to the case at bar for they involved instances, albeit under federal law, where the defendants could be sentenced under the Youth Corrections Act to terms longer than if sentenced as adults, and where they alleged they were not aware of this possibility prior to their plea. These courts held that if the defendants did not know of their possible sentences under the Youth Corrections Act, then the acceptance of the pleas would be a violation of the due process clause.
It is unnecessary to remand this case for a hearing to determine whether appellant did not know his maximum possible sentence, for the appellant’s contentions as to his ignorance are not disputed by the State. Moreover, appellant’s original counsel has submitted an affidavit which supports appellant’s own version of the facts with which, indeed, as we view it, the sentencing judge did not disagree.
Before the sentencing judge the State urged that the plea should not be allowed to be withdrawn because the State would be prejudiced by reason of its dismissal of a codefendant’s indictment after the plea. Whatever weight this argument might have when addressed to a court’s discretion, it has none when the issue is whether a waiver of a constitutional right has been made unknowingly, which is a question of law, not a balancing of equities. Cf. United States v. Pisacano, 459 F.2d 259, 262 (2d Cir. 1972). See also ABA Standards Relating to Guilty Pleas, Approved Draft (1968) § 2.1 and commentary, pp. 57-58. It is also of no moment that the appellant is no longer confined “actually or constructively” since the writ was filed while he was still being detained on parole by the State pursuant to the state court judgment and his unconditional release thereafter did not render his case moot. Carafas v. LaVallee, 391 U.S. 234, 237-240, 88 S.Ct. 1556, 20 L.Ed.2d 554 (1968). See also United States ex rel. Lawrence v. Woods, 432 F.2d 1072 (7th Cir. 1970), cert. denied, 402 U.S. 983, 91 S.Ct. 1658, 29 L.Ed.2d 148 (1971).
We leave to the district court on remand the task of fashioning relief appropriate under all of the facts and circumstances. Granting the writ would, of course, permit appellant to withdraw his plea of guilty and to plead not guilty, but the State would presumably be able to bring him to trial on the offense charged, even though he has already served time in the Elmira Reformatory therefor. Alternatively, this may be another case like Mosher v. Lavallee, 491 F.2d 1346 (2d Cir. 1974), where the district court might grant the option of requiring that appellant be given the sentence he thought was the maximum, 1.3-2.6 years’ imprisonment. A hearing may be appropriate to make this detei’mination.
Reversed and remanded for proceedings consistent with this opinion.
. This case arose before the revised New York Penal Law in 1967 took effect. While the conviction and sentencing occurred after the new Penal Law took effect, they were governed by the old law. NYPL § 5.05, subd. 3 (1967). Thus, the statutory references herein are to the New York Penal Law of 1909. PL § 1297 set the term of imprisonment for grand larceny, second degree, at a maximum of five years. PL § 261 specified that one convicted of an attempt must be sentenced to a maximum of “not more than one-half” of the largest sentence prescribed on conviction for the offense attempted. Under PL § 2189 the court was empowered to set a minimum term of no greater than one-lialf of the prescribed maximum or in this case no greater than one year and three months. Under the present law appellant’s maximum imprisonment would have been one year. NYPL §§ 70.15, subd. 1, 110.05, subd. 5, 155.30.
. Appellant had been indicted on three counts of forgery in the third degree, and three counts of grand larceny in the first degree. 1-Iis guilty plea to grand larceny in the second degree was to cover all charges. In addition, appellant had been indicted in Nassau County for another crime; he subsequently went to trial on the Nassau County indictment and the case against him was dismissed.
. The value of the federal rule, in making sure that the record contains a defendant’s statement showing his knowledge of the circumstances, is self-evident, in the light of this case.
. On page 10 of appellant’s brief to the Appellate Division, First Department, it was stated: “appellant should have been allowed to withdraw his plea as not having been voluntarily entered in the constitutional sense. Machibroda v. United States, 368 U.S. 487, [82 S.Ct. 510, 7 L.Ed.2d 473] (1962).”