OPINION
COMPTON, Justice.This appeal stems from a post-conviction proceeding initiated by appellant under our Rule 93 (§ 21-1-1(93), N.M.S.A.1953).
On June 10, 1964, in cause number 6869, Chaves County, the appellant entered a plea of guilty to the charge of burglary. He had been convicted of two prior felonies, one of which was in cause number 6075, Chaves County. He had been paroled from the New Mexico State Penitentiary in cause number 6075 when he committed the burglary felony but was immediately returned to prison to serve out the sentence in cause number 6075.
On June 15, 1964, appellant was charged as an habitual criminal. Upon his plea of guilty, he was sentenced to serve a term in the penitentiary of not less than five years nor more than fifteen years, the sentence to run concurrently with the unserved portion of the sentence previously imposed in cause number 6075.
Subsequently, on January 27, 1966, the appellant filed a motion to vacate the latter sentence on the ground that he was not allowed to collaterally attack the validity of the prior convictions. Upon consideration of the motion, and without a hearing as to its merits, the habitual information was dismissed and the sentence was set aside. The court made no finding that the sentence was void for lack of jurisdiction. Appellant was then sentenced on his plea of guilty to the burglary charge in cause number 6869 to serve a term of not less than one year nor more than five years, the sentence to run consecutively with the unserved portion of the sentence imposed in cause number 6075.
The question is whether appellant should be given credit for the time served as a result of the habitual charge filed against him.
While the appellant attacked the habitual sentence as void because of lack of jurisdiction, the question was never reached by the court. We do not know what the ruling of the court might have been had a hearing been had.
The appellant relies upon Sneed v. Cox, 74 N.M. 659, 397 P.2d 308, in support of his position. The State relies on Morgan v. Cox, 75 N.M. 472, 406 P.2d 347, in support of its position. We conclude that neither case controls in the situation here present. The action was not to correct an erroneous sentence as in Sneed, nor does it appear that the original proceeding was void for lack of jurisdiction as in Morgan.
We conclude that where the court had jurisdiction of the person and the offenses charged and the conviction was not void, credit should have been given for the time served on the vacated sentence.
It follows that the judgment should be reversed and a new sentence entered giving the appellant credit for the time served on his plea to the information charging prior convictions.
It is so ordered.
SPIESS, J., Court of Appeals, concurs. MOISE, J., specially concurring.