
406 So.2d 1314 (1981)
STATE of Louisiana
v.
John M. SMITH.
STATE of Louisiana ex rel. John M. SMITH
v.
STATE of Louisiana.
Nos. 81-KA-0221, 81-KH-1475.
Supreme Court of Louisiana.
November 16, 1981.
William J. Guste, Jr., Atty. Gen., Barbara Rutledge, Asst. Atty. Gen., Harry F. Connick, Dist. Atty., Stephen Laiche, Thomas Chester, Louise Korns, J. Kevin McNary, Asst. Dist. Attys., for plaintiff-appellee in 81-KA-0221 and for plaintiff-respondent in 81-KH-1475.
James C. Lawrence, and Craig Colwart of Orleans Indigent Defender Program, New Orleans, for defendant-appellant in 81-KA-0221 and for defendant-relator in 81-KH-1475.
*1315 DIXON, Chief Justice.[*]
Defendant, John M. Smith, was charged by bill of information with the crime of simple burglary in violation of R.S. 14:62. Smith initially pleaded not guilty. On April 23, 1980 he withdrew his former plea and pleaded guilty as charged in conjunction with an agreement entered into with the state. The terms of the agreement are embodied in the transcript of the April 23, 1980 proceedings. Defendant agreed to plead guilty to the crime charged with the understanding that he would receive a suspended sentence. However, defendant was aware that the state reserved its right to subsequently multiple bill him. If in fact the state did file a multiple bill against Smith, the agreement provided that Smith could withdraw his former guilty plea and enter a plea of not guilty, thereby forcing the state to prove its case against him. This is exactly what happened.
On April 25, 1980 defendant was sentenced to eighteen months. The sentence was suspended and defendant placed on active probation. The state filed a multiple bill against defendant on June 4, 1980. Smith then filed a motion to withdraw his guilty plea which was granted by the trial judge. After a trial by jury, defendant was convicted of attempted simple burglary under R.S. 14:27 and 14:62. On September 23, 1980 the court found defendant guilty of being a triple offender within the provisions of R.S. 15:529.1 and sentenced him to six years with credit for time served. Defendant appealed his conviction, urging that he was placed in double jeopardy because he was sentenced twice for the same crime.
While his appeal was pending, Smith filed a pro se habeas corpus application complaining that he was permitted to withdraw his guilty plea after sentence had been imposed and was later tried by jury, convicted and sentenced to six years. The application was granted and consolidated with his appeal.[1]
Defendant's contention that his conviction and sentence of six years constitutes double jeopardy is incorrect. Double jeopardy does not attach when a defendant himself moves to set aside his conviction. C.Cr.P. 591; cf., La.Const., art. 1, § 15 (1974).
The issue in this case is whether the trial judge exceeded his authority under C.Cr.P. 559 in permitting defendant to withdraw his guilty plea after sentence had been imposed. A trial court may allow a guilty plea to be withdrawn at any time before sentence. C.Cr.P. 559.[2] However, a trial court may only set aside a plea and sentence when the facts surrounding the guilty plea render it constitutionally deficient. State ex rel. Clark v. Marullo, 352 So.2d 223 (La.1977). In that case, the defendant pleaded guilty to armed robbery and was sentenced to five years. He subsequently learned that, contrary to a pre-plea agreement, the state planned to enhance his sentence as a multiple offender. On motion of the defendant, the trial court found that the multiple billing violated the plea bargain and set aside the guilty plea and sentence. After a jury trial, the accused was convicted and sentenced to thirty-three years. We held that the trial court acted properly in vacating the guilty plea and setting aside the original sentence where *1316 the state had breached the terms under which the plea was entered by multiple billing the defendant.[3]
In our more recent decision, State v. Banks, 383 So.2d 1009 (La.1980), we concluded that the ruling of the trial judge allowing Banks to withdraw his guilty plea after sentence had been imposed was improper. We observed in a footnote that the record was silent as to the reason the defendant was permitted to withdraw his guilty plea. Thus, Banks did not address the situation presented in the instant case. In this case, Smith himself requested that his previous guilty plea be withdrawn and the eighteen month sentence vacated. In contrast to Banks, it is evident from the record that the terms of the pre-plea arrangement specifically provided that the state could file a multiple bill against Smith and that, if the state did so, Smith would be granted the option of withdrawing his guilty plea. There is nothing in the record to indicate that Smith did not enter into the agreement voluntarily or without knowledge of its terms, nor does defendant raise this contention in brief.
We hold that where it is clear from the record the accused himself requested through a post conviction motion that his guilty plea be withdrawn in accordance with the terms of a pre-plea agreement, the trial court may properly withdraw the former plea and vacate the sentence. Since in this situation the trial court is acting pursuant to its post conviction jurisdiction, C.Cr.P. 559 is inapplicable and cannot serve to insulate the defendant from an enhanced sentence.
For these reasons, defendant's conviction and sentence of six years are affirmed.
NOTES
[*]  Judges Remy Chiasson, Wallace A. Edwards and Elmo E. Lear, of the First Circuit, participated in this decision as Associate Justices Ad Hoc, joined by Chief Justice Dixon and Associate Justices Marcus, Blanche and Lemmon.
[1]  C.Cr.P. 924.1 provides that a post conviction relief application shall not be entertained while a direct appeal is pending. We will treat the application as a pro se brief.
[2]  C.Cr.P. 559 provides:

"The court may permit a plea of guilty to be withdrawn at any time before sentence.
The court shall not accept a plea of guilty of a felony within forty-eight hours of the defendant's arrest. When such a plea has been accepted within the forty-eight hour period, the court, upon a motion filed by the defendant within thirty days after the plea was entered, shall set aside the plea and any sentence imposed thereon.
When a plea of guilty has been withdrawn or set aside, the plea and the facts surrounding its entry shall not be admissible in evidence against the defendant at a trial of a case."
[3]  We noted in our opinion that an anomaly is created by strict application of C.Cr.P. 559 in that while a trial judge does not have jurisdiction to allow the withdrawal of a guilty plea through ordinary proceedings, he does have that authority if the same request be made through application for habeas corpus as a post conviction remedy.
