
82 So.2d 136 (1955)
Raymond E. TILGHMAN, Petitioner,
v.
Nathan MAYO, as Prison Custodian of the State of Florida, Respondent.
Supreme Court of Florida. Division B.
July 22, 1955.
Rehearing Denied September 12, 1955.
*137 Raymond E. Tilghman, in pro. per.
Richard W. Ervin, Atty. Gen., and Bart L. Cohen, Asst. Atty. Gen., for respondent.
HOBSON, Justice.
Petitioner Raymond E. Tilghman was convicted of breaking and entering a store with an intent to commit a felony. On appeal the judgment of conviction was affirmed by this court in Tilghman v. State, Fla., 51 So.2d 785. On application of the petitioner, the trial court later reduced the sentence and this order was affirmed in Tilghman v. State, Fla., 64 So.2d 555. Petitioner subsequently applied to the United States District Court for a writ of habeas corpus. In these proceedings the State conceded that the notice of Tilghman preceding his trial was insufficient, with the result that Tilghman was deprived of his right to obtain counsel. Accordingly, the State conceded that the judgment against Tilghman should be "reversed" (sic) and the petitioner returned for prosecution.
Petitioner has been re-tried, adjudged guilty and sentenced, and has now petitioned this court for a writ of habeas corpus, which we have granted. In the course of the trial he pleaded double jeopardy, and contends here that the proceedings were void on this ground. He also contends that his latest sentence was illegal because it failed to take into account the time he has already served and such gain time as he has earned.
We cannot agree that the second trial for the same offense placed the petitioner in double jeopardy. The former judgment was set aside at the instance of the petitioner because of the denial of a fundamental prerequisite to the former trial. The very fact that the former judgment was void is the reason that it cannot effectively be pleaded as a basis of former jeopardy. In general, to constitute a proper basis for the claim of former jeopardy a proceeding must be valid, and if the proceedings are "lacking in any fundamental prerequisite which renders the judgment void" they will not constitute a proper predicate for such a claim. McCleary v. Hudspeth, 10 Cir., 124 F.2d 445, 447, certiorari denied 316 U.S. 670, 62 S.Ct. 1043, 86 L.Ed. 1745. See also State v. Heard, 49 La. Ann. 375, 21 So. 632; People ex rel. Rosebrough v. Casey, 251 App.Div. 867, 297 N.Y.S. 13; State v. Bartlett, 181 Iowa 436, 164 N.W. 757, L.R.A. 1918A, 1179; People v. Cuatt, 70 Misc. 453, 126 N.Y.S. 1114; May v. State, 110 Ark. 432, 162 S.W. 43; Herman v. People, 124 Colo. 46, 233 P.2d 873; Conner v. State, 196 Miss. 335, 17 So.2d 527; State v. Helm, 66 Nev. 286, 209 P.2d 187, certiorari denied 339 U.S. 942, 70 S.Ct. 794, 94 L.Ed. 1358; State ex rel. Underwood v. Brown, 193 Tenn. 113, 244 S.W.2d 168; Johnson v. Cranor, 43 Wash.2d 200, 260 P.2d 873, certiorari denied Johnson v. Delmore, 348 U.S. 902, 75 S.Ct. 226.
We agree, however, and respondent admits, that petitioner is entitled to receive full credit for the time which he served under his void sentence, along with the gain time which he earned, Perry v. Mayo, Fla., 72 So.2d 382, and that the trial court did not take all of this time into consideration. It follows that the writ heretofore issued must be, and it is hereby, quashed and the petitioner remanded to the sheriff of Polk County with directions to the trial court to vacate the sentence and upon resentence of the petitioner to take into account the time already served, plus his earned gain time.
It is so ordered.
DREW, C.J., and TERRELL and THOMAS, JJ., concur.
