
435 P.2d 1005 (1968)
78 N.M. 623
STATE of New Mexico, Plaintiff-Appellee,
v.
Robert W. BAROS, Defendant-Appellant.
No. 8419 (which includes No. 8084).
Supreme Court of New Mexico.
January 8, 1968.
Rodey, Dickason, Sloan, Akin & Robb, Joseph J. Mullins, Albuquerque, for appellant.
Boston E. Witt, Atty. Gen., Myles E. Flint, Asst. Atty. Gen., Santa Fe, for appellee.

OPINION
CHAVEZ, Chief Justice.
This cause was formerly on appeal filed in this court in cause No. 8084, wherein State of New Mexico was plaintiff and Robert W. Baros, appellant here, was defendant. Subsequently, the transcript in cause No. 8419 was filed, being the present appeal.
Appellant was charged with forging a check in cause No. 8084 and entered a plea of guilty. Judgment was entered on August 12, 1964, committing appellant to the New Mexico State Penitentiary for a period of 29 days, and he was "to stand so committed until said sentence is fully completed and ended." The trial court further ordered that appellant be placed on probation for two years "and if he leaves the State he will continue his probation to this State." Appellant served out this sentence, but on October 19, 1964, a motion to invoke the suspended *1006 sentence was filed for the reason that appellant had violated the terms of his suspension. The trial court, on the same day, entered an order invoking the suspended sentence and a new judgment was entered committing appellant to the Penitentiary for a period of not less than two nor more than ten years. Appellant entered upon service of the second sentence.
On May 17, 1965, appellant filed a petition for a writ of habeas corpus in the district court of Santa Fe County. The writ was granted on June 15, 1965, and appellant-petitioner was remanded to the sheriff of Bernalillo County for further proceedings as may be determined by the district attorney and district court of Bernalillo County. Appellant was again sentenced by the district court of Bernalillo County for the same offense on July 1, 1965, which sentence committed appellant to the New Mexico State Penitentiary for a period of two to ten years, with appellant to be given credit for the 29 days served under the first sentence and also credit for the nine months served under the second sentence. Appellant immediately entered upon service under the third sentence.
On September 10, 1965, appellant filed a motion to vacate the third sentence entered on July 1, 1965. The trial court, by order, denied this motion on September 22, 1965. A notice of appeal was filed and the cause was docketed in this court on February 15, 1966, as cause No. 8084. On April 13, 1966, this court dismissed the appeal upon motion of appellant.
On November 3, 1966, appellant filed another motion to vacate the judgment of July 1, 1965, on the basis that having served the first sentence, the sentences imposed thereafter constituted double jeopardy. The trial court, by order, denied this motion on December 14, 1966, and entered an order granting an appeal. On January 27, 1967, a notice of appeal was filed by substituted counsel and an order was also entered the same day directing that the notice of appeal be entered nunc pro tunc as of January 13, 1967.
Appellant contends that, having completely served a valid sentence imposed on August 12, 1964, to serve 29 days in the State Penitentiary, and then placed on probation for two years without the terms of probation being set out, he could not be properly sentenced again for the same offense. Appellant states this was the view of the law which the Santa Fe County district court took when it granted appellant's petition for a writ of habeas corpus.
Appellant cites Ex parte Lange, 85 U.S. (18 Wall.) 163, 21 L.Ed. 872, holding that such a procedure would violate the Fifth Amendment. However, the State argues that Lange is not applicable because the sentence imposed in this case was invalid.
In support of the contention that the first sentence was void, the State cites Jordan v. Swope, 36 N.M. 84, 8 P.2d 788; State v. Peters, 69 N.M. 302, 366 P.2d 148; Sneed v. Cox, 74 N.M. 659, 397 P.2d 308. These cited cases are not applicable because they deal with situations in which the prisoner had not fully served the original sentence imposed by the trial court.
The difficulty with the State's position, that the first sentence was void, is that neither the State nor appellant challenged the validity of the first sentence and, since the sentence is within the limits of the penalty provided by law, it did not exceed the trial court's jurisdiction. The State could have sought to modify the claimed void sentence by filing a motion to vacate as being unauthorized by law, as was done in State v. Peters, supra. As the record stands, the district court of Bernalillo County never vacated the first sentence, even when it pronounced its subsequent sentences.
The third sentence, which is the subject of the proceedings out of which this appeal arises, was imposed by the trial court after a writ of habeas corpus had been granted in the District Court of the First Judicial District, which held that appellant's confinement, at all times subsequent to the expiration of the 29-day term, was illegal and unconstitutional. It was on remand, pursuant to the writ of habeas corpus, that appellant *1007 was again sentenced on July 1, 1965, for a term of two to ten years, with credit for the 29 days he had served under the first sentence and the nine months served under his second sentence.
The question to be resolved is whether the first sentence imposed on August 12, 1964, was void as contended by the State, or valid as argued by appellant. This court has held that sentences must be imposed as prescribed by statute. State v. Peters, supra. In that case, Peters was sentenced under § 42-1-61, N.M.S.A., 1953 Comp., as amended, which provides that upon conviction the person shall be imprisoned for a term of not less than two years, which sentence shall not run concurrently with any other sentence such person then be serving. Peters was first sentenced to serve not less than two years, said sentence to run concurrently with any other sentences being served by defendant. Thereafter, the State moved to vacate the judgment because the sentence imposed was contrary to law. The trial court vacated the previous sentence and, following a jury trial, the defendant was sentenced to serve not less than two years, which sentence was not to run concurrently with any other sentence defendant may be serving. On appeal, we affirmed, holding that the first sentence, being unauthorized by law, was null and void.
This court has passed upon cases where the sentence imposed was in excess of the term provided by the statute. In Sneed v. Cox, supra, we held that the imposition of a sentence in excess of what the law permits does not render the legal or authorized portion of the sentence void, but only leaves such portion in excess open to attack, unless such portion is inseparable and cannot be dealt with without disturbing the valid portion of the sentence. See also, In the Matter of Application of Cica et al., 18 N.M. 452, 137 P. 598, 51 L.R.A.,N.S. 373.
The case before us is not one where an excessive sentence was imposed, but one where the trial court's sentence dated August 12, 1964, is for 29 days and the appellant placed on probation for two years, without any conditions of probation, and where the 29-day sentence was served. Since the sentence of August 12, 1964, does not set out terms or conditions of probation, as required by § 40A-29-18, N.M.S.A., 1953 Comp., appellant could not violate any of its terms. This court has held that the power of a district court to vacate and revoke an order of suspension exists only when some one or more of such terms or conditions specified in the order of suspension have been breached. Ex parte Hamm, 24 N.M. 33, 172 P. 190; Ex parte Selig, 29 N.M. 430, 223 P. 97.
There is another matter which we must consider. Under § 40A-29-15(B), N.M.S.A., 1953 Comp., a trial court may enter an order suspending in whole or in part the execution of the sentence. The trial court's order invoking the suspended sentence stated:
"IT IS THEREFORE ORDERED that the suspended sentence of not less than 2 years nor more than 10 years in the New Mexico State Penitentiary which [was] imposed upon the above named defendant on August 12, 1964, by this Court, be and the same is hereby invoked."
The trial court then entered a judgment sentencing appellant to a term of two to ten years. The language of the order invoking the suspended sentence indicates that the trial court originally meant to impose a sentence of not less than two years and not more than ten years, with all of this sentence, except for twenty-nine days, to be suspended. In suspending the two-to-ten-year sentence and sentencing appellant to 29 days, the trial court was acting under the statute and the sentence of 29 days was a valid sentence. As we said in State v. Peters, supra:
"* * * If the accused had been committed pursuant to a valid sentence, perhaps a further discussion would be warranted and possibly a different result would be reached; * * *."
There is considerable authority to the effect that a trial court is without power *1008 to set aside a valid sentence after the defendant has been committed thereunder, and impose a new or different sentence increasing the punishment. A judgment which attempts to do so is void and the original judgment remains in force. People ex rel. Lucey v. Turney, 273 Ill. 546, 113 N.E. 105; State v. Carte, 157 Kan. 139, 138 P.2d 429; Ex parte Cornwall, 223 Mo. 259, 122 S.W. 666; Hickman v. Fenton, 120 Neb. 66, 231 N.W. 510, 70 A.L.R. 819; Rupert v. State, 9 Okl.Cr. 226, 131 P. 713, 45 L.R.A.,N.S., 60; State ex rel. Roberts v. Tucker, 143 W. Va. 114, 100 S.E.2d 550; Annot., 168 A.L.R. 706.
Finally, even if we assume the first sentence was irregular and that it could have been set aside on that account, nevertheless it is well-settled that, after the prisoner has fully served such a sentence, the court's jurisdiction over him is at an end. United States ex rel. Quinn v. Hunter (7th Cir.1947), 162 F.2d 644; Hickman v. Fenton, supra; Browning v. State (Okl. Crim.App. 1959), 337 P.2d 755; Hall v. State (Okl.Crim.App. 1957), 306 P.2d 361; Commonwealth ex rel. Saeger v. Dressell, 174 Pa.Super. 39, 98 A.2d 430; Smith v. Commonwealth, 195 Va. 297, 77 S.E.2d 860. To punish an offender twice for the same offense would violate Art. II, §§ 15 and 18 of our Constitution.
In view of our holding, it is not necessary to consider the other point raised by appellant.
The judgment of the district court is reversed and the case remanded to said court with direction to set aside and vacate the third sentence imposed on July 1, 1965, and to release and free appellant.
It is so ordered.
COMPTON, J., and OMAN, J., Court of Appeals, concur.
