Petitioner filed his petition for a writ of habeas corpus on August 14, 1968 in the Corporation Court of the City of Charlottesville, alleging that he was being illegally detained by respondent, J. D. Cox, Superintendent of the Virginia State Penitentiary. From an order entered July 22, 1970 denying the writ We granted petitioner a writ of error.
The record shows that petitioner was convicted in the Corporation Court of the City of Charlottesville on September 25, 1963 on four counts of statutory burglary and was sentenced to serve two years on each count, the sentences to run consecutively. He was subsequently convicted of other felonies in the Circuit Court of *657Albemarle County and by judgment order entered October 16, 1963 sentenced to serve four years in the State Penitentiary. Thereafter, sentences were imposed upon him for additional convictions. Petitioner contends that his four convictions of September 25, 1963 are void and that he is entitled to credit for time served under these void Sentences.
In Moore and Ancarrow v. Peyton, 211 Va. 119, 176 S.E.2d 427 (1970) we held that the courts of Virginia have no jurisdiction to determine the validity of a sentence fully served before a proceeding for a writ of habeas corpus is instituted. At the time petitioner initiated this proceeding he had fully served three of the four convictions which he attacked. But here the Attorney General concedes the invalidity of all four convictions. So Moore and Ancarrow does not apply.
Petitioner is not entitled to credit for time served on the void convictions between September 25 and October 16, 1963. However, the invalidity of his first four convictions leaves nothing to postpone the commencement of his subsequent sentences from the date of imposition of sentence by the judgment order entered October 16, 1963. This will necessarily result in an advancement of his release date. See Peyton v. Christian, 208 Va. 105, 155 S.E.2d 335 (1967); Va. Code Ann. § 53-207 (1967).
The case is remanded for the lower court to determine the proper credit to be given for time served by petitioner since October 16, 1963, and if such credit is sufficient to advance his release date so that he is entitled to immediate discharge, petitioner should be ordered released forthwith from custody. If he is not entitled to immediate discharge an order should be entered directing respondent to correct petitioner’s prison record in accordance with the views expressed herein.
Reversed and remanded.