
124 F.2d 445 (1941)
McCLEARY
v.
HUDSPETH, Warden.
No. 2386.
Circuit Court of Appeals, Tenth Circuit.
December 24, 1941.
*446 C. W. Schwoerke, of Oklahoma City, Okl., for appellant.
Homer Davis, Asst. U. S. Atty., of Topeka, Kan. (Summerfield S. Alexander, U. S. Atty., of Topeka, Kan., on the brief), for appellee.
Before PHILLIPS, BRATTON, and MURRAH, Circuit Judges.
PHILLIPS, Circuit Judge.
This is an appeal from a judgment denying a petition for a writ of habeas corpus.
McCleary[1] was charged by two indictments returned in the District Court of the United States for the Western District of Pennsylvania[2] with violations of the postal laws. He entered pleas of guilty to the several counts thereof and was sentenced to a term of imprisonment of 25 years.
After serving part of the sentences imposed, petitioner filed an application for a writ of habeas corpus in the District Court of the United States for the District of Kansas alleging that he was denied the assistance of counsel for his defense in the criminal proceedings and that the sentences imposed were void. The court found that petitioner was denied assistance of counsel for his defense in the criminal proceedings, ordered him discharged from the custody of the warden of the penitentiary in which he was confined, and delivered to the United States Marshal for the Western District of Pennsylvania.
A bench warrant was issued on the indictments and petitioner was taken into custody thereon and confined in the Erie and Allegheny County, Pennsylvania jails. On January 12, 1940, the judge of the Pennsylvania Federal Court appointed Lloyd W. Kennedy to act as counsel for petitioner on the trial of such indictments. The court later appointed A. M. Tua as additional counsel for petitioner.
On February 21, 1940, the acting United States Attorney for the Western District of Pennsylvania filed a motion to vacate the pleas of guilty theretofore entered by the petitioner to the indictments. A rule was entered upon petitioner and his counsel to show cause why the pleas of guilty should not be declared void and vacated. On February 29, 1940, Kennedy and Tua, after a full hearing on the motion, agreed that such pleas should be vacated and an order was entered vacating the pleas and the judgments entered thereon. Petitioner did not agree to but objected to the order.
On March 18, 1940, petitioner was arraigned a second time on the indictments and entered his plea of not guilty to each of the several counts thereof. On the same day, he was tried on the indictments, being represented at the trial by Kennedy. The jury returned verdicts of guilty. He was sentenced to a term of imprisonment of 25 years and was delivered into the custody of Hudspeth, warden, on March 27, 1940.
Petitioner, in his application for the writ herein, set up the foregoing facts and further alleged that he was being subjected "to double punishment for one offense"; that he was being subjected to cruel and unusual punishment; that he was tried, convicted, and sentenced without due process of law; that he was tried on two indictments at one time before one jury; that a part of the record of the Pennsylvania Federal Court was changed or altered to secure his conviction; that he was denied compulsory process to procure witnesses for his defense; that he was compelled to be a witness against himself; and that he was not permitted to consult with counsel at every stage of the proceedings. The warden filed an answer to the application in which he set up the facts above stated and denied the foregoing allegations of the application.
A writ of habeas corpus ad testificandum was issued and petitioner was brought before the court and testified at the hearing. He was represented by C. D. Holman, an attorney of Leavenworth, Kansas.
After a full hearing, the court found the facts hereinbefore recited; specifically found that petitioner was competently and capably represented by counsel appointed by the Pennsylvania Federal Court; that petitioner was afforded full opportunity to consult with such counsel; that he was not denied the assistance of counsel for his defense; that he was not denied the right to have witnesses subpoenaed in his behalf; that he did not request the court to subpoena any witness in his behalf at the expense of the government; that he was sane and rational at the time of the trial; and found the issues generally against petitioner. The findings of the trial court are fully supported by the evidence.
Petitioner urges that by subjecting him to trial on the indictments, he was twice put *447 in jeopardy for each of the offenses charged in the indictments, contrary to the provisions of the Fifth Amendment to the Constitution of the United States.
In Johnson v. Zerbst, 304 U.S. 458, 58 S. Ct. 1019, 82 L.Ed. 1461, the court held that compliance with the provision of the Sixth Amendment guaranteeing the accused the right to have the assistance of counsel for his defense is an essential prerequisite to a Federal Court's authority to deprive the accused of his life or liberty; and that where the accused neither has been accorded nor properly waived such right, and the court nevertheless proceeds to sentence the accused, the judgment is void and subject to collateral attack on habeas corpus. By the first proceeding in habeas corpus in the United States District Court for the District of Kansas, petitioner obtained a judgment declaring that the sentences imposed on the pleas of guilty were void because the court had proceeded without petitioner having been accorded the right to the assistance of counsel for his defense.
The pleas of guilty having been entered at a time when petitioner had neither waived nor been accorded his right to the assistance of counsel, the pleas of guilty and the judgments entered were invalid and were properly vacated by the Pennsylvania Federal Court. A proceeding, to constitute a proper basis for a claim of former jeopardy, must be valid. If the proceedings are lacking in any fundamental prerequisite which renders the judgment void, they will not constitute a proper basis for a claim of former jeopardy.[3] Here, the proceedings, including the pleas of guilty, the judgments entered, and the sentences pronounced, lacked essential validity and it follows that they cannot constitute a proper basis for a claim of former jeopardy.
Where a prisoner obtains his discharge on habeas corpus on the ground that the sentence under which he is being held is illegal, he is precluded on resentence on a prior valid conviction or upon due conviction from urging the objection of double jeopardy.[4]
The United States District Court for the District of Kansas had authority to direct the return of the petitioner to the Pennsylvania Federal Court for further proceedings on the indictments.[5]
The fixing of penalties for crimes is a legislative function. What constitutes an adequate penalty is a matter of legislative judgment and discretion, and the courts will not interfere therewith unless the penalty prescribed is clearly and manifestly cruel and unusual. Schultz v. Zerbst, 10 Cir., 73 F.2d 668, 670.
Where the sentence imposed is within the limits prescribed by the statute for the offense committed, it ordinarily will not be regarded as cruel and unusual.[6]
The other grounds for the writ set up in the application are foreclosed by the trial court's findings.
The judgment is affirmed.
NOTES
[1]  Hereinafter referred to as petitioner.
[2]  Hereinafter referred to as the Pennsylvania Federal Court.
[3]  State v. Heard, 49 La.Ann. 375, 21 So. 632; People v. Casey, 251 App.Div. 867, 297 N.Y.S. 13, 14; State v. Bartlett, 181 Iowa, 436, 164 N.W. 757, 758, L.R. A.1918A, 1179; People v. Cuatt, 70 Misc. 453, 126 N.Y.S. 1114, 1118; May v. State, 110 Ark. 432, 162 S.W. 43, 44; Commonwealth v. Roby, 12 Pick., Mass., 496, 501.
[4]  Bryant v. United States, 8 Cir., 214 F. 51, 53; King v. United States, 69 App.D.C. 10, 98 F.2d 291, 294, 295; Murphy v. Massachusetts, 177 U.S. 155, 162, 20 S.Ct. 639, 44 L.Ed. 711;

In the latter case, the court said:
"The plea of former jeopardy or of former conviction cannot be maintained because of service of part of a sentence, reversed or vacated on the prisoner's own application."
[5]  Biddle v. Thiele, 8 Cir., 11 F.2d 235, 237; Price v. Zerbst, D.C.Ga., 268 F. 72, 74, 75; Bryant v. United States, 8 Cir., 214 F. 51, 53; In re Medley, Petitioner, 134 U.S. 160, 174, 10 S.Ct. 384, 33 L.Ed. 835; In re Bonner, Petitioner, 151 U.S. 242, 259, 260, 14 S.Ct. 323, 38 L.Ed. 149.
[6]  Moore v. Aderhold, 10 Cir., 108 F.2d 729, 732, and cases there cited.
