
648 P.2d 318 (1981)
98 N.M. 279
STATE of New Mexico, Plaintiff-Appellee,
v.
Edward Joe SISNEROS, Defendant-Appellant.
No. 5133.
Court of Appeals of New Mexico.
July 23, 1981.
*319 John B. Bigelow, Chief Public Defender, Martha A. Daly, Appellate Defender, Santa Fe, for defendant-appellant.
Jeff Bingaman, Atty. Gen., Carol Vigil, Asst. Atty. Gen., Santa Fe, for plaintiff-appellee.

OPINION
HENDLEY, Judge.
Defendant appeals the alteration of his sentence by the trial court. We proposed summary reversal on the basis of the change in his original sentence. The State timely filed a memorandum in opposition, which is not persuasive and overlooks certain facts. We reverse.
Defendant was charged with criminal sexual penetration and kidnapping contrary to § 30-9-11(B) and § 30-4-1, N.M.S.A. 1978. The following items, taken from the docketing statement and the district court record, are not challenged by the State and are facts in this appeal. State v. Calanche, 91 N.M. 390, 574 P.2d 1018 (Ct.App. 1978). With the approval of the district attorney and the district judge, defendant entered a plea of guilty. The sentence agreed upon was a suspended sentence of six years on *320 each count to run concurrently, with a five-year term of probation. The plea was entered and accepted by the trial court. Before defendant was sentenced, the district attorney  in violation of the plea agreement  requested commitment to the penitentiary. The trial court disregarded this request and imposed sentence in accordance with the agreement. The judgment and sentence was entered five days later on January 12, 1981, but through an error by the district attorney's office, it was recorded with Judge Franchini's name and signature rather than that of Judge Maloney. Both the district attorney and defendant had signed and approved the judgment and sentence and the defendant had alerted the district attorney to the error before it was signed by Judge Franchini.
On the basis of the entry of the judgment and sentence, Judge Maloney released defendant's bond. Subsequently, the district attorney filed a motion to reconsider sentence. Defendant was then resentenced by Judge Maloney on March 6, 1981, to serve two concurrent six-year terms in the penitentiary. An amended judgment and sentence was entered March 30, 1981. Defendant's requests and motion to withdraw his guilty plea in light of the aggravated sentence were denied.
It is within the trial court's discretion to accept or reject a guilty plea. State v. Leyba, 80 N.M. 190, 453 P.2d 211 (Ct.App. 1969). Refusal by the trial court to follow the agreement worked out by the parties affords defendant the opportunity to withdraw his plea. N.M.R. Crim. P. 21(g)(4), N.M.S.A. 1978 (Repl. 1980); Eller v. State, 92 N.M. 52, 582 P.2d 824 (1978); State v. Ortiz, 77 N.M. 751, 427 P.2d 264 (1967). Here, the trial court not only accepted the plea and agreement, but was a participant in that agreement. The record suggests that neither the trial court nor counsel paid any attention to N.M.R. Crim. P. 21, supra. Once the plea was accepted, the court was bound by the dictates of due process to honor the plea agreement. See, State ex rel. Plant v. Sceresse, 84 N.M. 312, 502 P.2d 1002 (1972). It was barred from imposing a sentence which was outside the parameters of the plea agreement. See, State v. Holland, 91 N.M. 386, 574 P.2d 605 (Ct.App. 1978). The trial court has the authority and the duty to see that the promises made by the district attorney are carried out.
The State would have us hold that the original sentence was invalid because: 1) it did not state that mitigating factors were present under § 31-18-15.1, N.M.S.A. 1978 (Supp. 1980), to reduce by one-third the basic sentence of nine years, § 31-18-15(A)(2), N.M.S.A. 1978 (Supp. 1980); and 2) Judge Maloney did not sign the judgment and sentence.
It is the acceptable and common practice for the State to formulate the judgment and sentence to be signed by the judge. Failure to provide a reason for reduction of sentence on the face of the judgment and sentence was the State's error. A party cannot complain nor take advantage of an error of its own making. See, State v. Gutierrez, 91 N.M. 54, 570 P.2d 592 (1977); State v. Cruz, 86 N.M. 455, 525 P.2d 382 (Ct.App. 1974). Moreover, use of the State's failure to include "mitigation" language in the judgment and sentence to increase defendant's sentence is impermissible. The proper remedy would have been to file an amended judgment and sentence containing the appropriate language. We note that the amended judgment and sentence which altered defendant's sentence did state that mitigating factors were found.
Likewise, the State was responsible for the error in signatures. The defendant had notified the district attorney of the discrepancy in judges' names on the judgment and sentence before it was signed by Judge Franchini. Furthermore, it is not uncommon for one judge to sign in another's stead. See, State v. James, 76 N.M. 376, 415 P.2d 350 (1966); Medler v. Henry, 44 N.M. 63, 97 P.2d 661 (1939); N.M.R. Crim. P. 50, N.M.S.A. 1978 (Repl. 1980); N.M.R. Civ. P. 63, N.M.S.A. 1978 (Repl. 1980). The district court file reveals that Judge Franchini had acted for Judge Maloney in arraigning defendant and in approving *321 the conditions for defendant's release on bond. There is no indication or allegation that the judgment and sentence signed by Judge Franchini was in error, nor that Judge Maloney would not have signed it had it been properly referred to him. On the contrary, it comports in every way with the sentence pronounced orally by Judge Maloney in open court. The original judgment and sentence was valid.
The State argues that the court could amend the judgment and sentence. The State relies on State v. Atencio, 85 N.M. 484, 513 P.2d 1266 (Ct.App. 1973), as support for the proposition that an oral statement by the court prior to judgment and sentence is not binding. However, such are not the facts before us. Rule 46 of N.M.R. Crim. P., N.M.S.A. 1978 (Repl. 1980), requires the filing of a written judgment and sentence after judgment and sentence are rendered in open court. See, State v. Sanders, 96 N.M. 138, 628 P.2d 1134 (Ct. App. 1981). This was done. Whether a judgment and sentence may be amended is not the issue; the issue is whether the trial court can, by amendment, increase a valid sentence which was imposed pursuant to a plea bargain approved by the court. Such would hold defendant to his part of the agreement, but allow the State to renege on its part of the agreement; such would be a violation of due process.
The State next argues that the trial court has the authority to change defendant's sentence under N.M.R. Crim. P. 57.1, N.M.S.A. 1978 (Repl. 1980), and § 39-1-1, N.M.S.A. 1978. The option of penitentiary commitment was presented to the judge by the district attorney (in violation of the plea agreement) prior to sentencing. The court rejected it and imposed sentence. It could not change defendant's valid judgment and sentence at a later date. Plant v. Sceresse, supra; Holland, supra; State v. Session, 91 N.M. 381, 574 P.2d 600 (Ct.App. 1978). Rule 57.1, supra, permits alteration, but only to the extent of correcting an invalid sentence or reducing a valid sentence. These circumstances do not apply to defendant's case. Section 39-1-1, supra, cannot be utilized to increase a defendant's valid sentence. Requiring a portion of a sentence to be served in prison is properly considered an enhanced penalty. See, State v. Lard, 86 N.M. 71, 519 P.2d 307 (Ct.App. 1974). See also, N.M.R. Crim. P. 57.1(b), supra, wherein the changing of a sentence from incarceration to probation constitutes a reduction.
The original sentence imposed upon defendant was a valid sentence. The subsequent alteration of that sentence to defendant's detriment is not permissible. State v. Soria, 82 N.M. 509, 484 P.2d 350 (Ct.App. 1971). The amended sentence is hereby vacated. This case is remanded to the trial court with instructions to reinstate the original judgment and sentence.
IT IS SO ORDERED.
HERNANDEZ, C.J., and WOOD, J., concur.
