
613 So.2d 157 (1993)
STATE of Louisiana
v.
Freddie Joe NOMEY.
No. 92-KK-1631.
Supreme Court of Louisiana.
January 19, 1993.
*158 Bobby L. Culpepper, Jonesboro, for applicant.
Richard P. Ieyoub, Atty. Gen., Walter E. May, Jr., Dist. Atty., Gary D. Nunn, Asst. Dist. Atty., for respondent.
MARCUS, Justice.[*]
Freddie Joe Nomey was charged by separate grand jury indictments with two counts of solicitation for the murder of his sister, in violation of La.R.S. 14:28.1, and with the first degree murder of his sister, in violation of La.R.S. 14:30(A)(1)(4). On April 29, 1988, defendant's attorney filed a "petition for appointment of sanity commission." The trial court appointed Dr. Paul D. Ware and Dr. George Seiden as members of the sanity commission. The commission was ordered to conduct a mental examination of defendant to determine if he had the mental capacity to proceed and report to the court within thirty days.[1] Dr. Ware and Dr. Seiden conducted separate examinations of defendant on May 24, 1988. Both doctors dictated their reports on May 24, 1988, but the reports were not filed with the trial court until June 7, 1988. They both found defendant competent to proceed.[2] On or about May 24, 1988, defendant gave a confession to police in which he stated he paid $2,000 to Vonzell Johnson, Jr. to rough up his sister, resulting in her death.[3]
*159 On May 25, 1988, one day after the members of the sanity commission conducted their examinations, defendant expressed a desire to plead guilty to the charges, with the understanding that the state would not seek the death penalty. At the hearing, it was noted that defendant had discharged his attorney the evening before and was represented by appointed counsel. The trial court conducted an examination to determine if the guilty pleas were voluntarily made, as required by Boykin v. Alabama, 395 U.S. 238, 89 S.Ct. 1709, 23 L.Ed.2d 274 (1969). At the conclusion of the examination, the court accepted the pleas, concluding that they were knowingly, intelligently and voluntarily entered.[4] The court sentenced defendant to life imprisonment without benefit of parole, probation or suspension of sentence on the first degree murder charge, and to ten years imprisonment at hard labor on each of the two counts of solicitation, the sentences to run consecutively to each other and consecutively to the life sentence. No mention was made at the hearing on the guilty pleas about the sanity commission.
On September 24, 1990, defendant filed a pro-se motion for post-conviction relief, alleging that the trial court's failure to conduct a hearing on the issue of his sanity prior to accepting his guilty pleas violated his due process rights. The trial court denied the request for post-conviction relief. Defendant applied to the court of appeal, which granted the writ and ordered the trial court to conduct an evidentiary hearing to determine defendant's capacity to proceed at the time of the entry of the guilty pleas. The hearing was held on March 8, 1991, and both Dr. Seiden and Dr. Ware testified. At the conclusion of the hearing, the trial court held that defendant had the capacity to proceed at the time of the entry of his guilty pleas. Thereafter, the trial court also dismissed defendant's "first supplemental motion for post-conviction relief," finding it to be a successive application.[5] Defendant applied to the court of appeal for writs on both issues. On the first issue, the court found "no error by the trial judge in examining the reports of the sanity commission which were made prior to applicant's guilty pleas and in determining his prior competency to proceed after he challenged the pleas in an application for post-conviction relief." In doing so, the court of appeal relied on this court's per curiam opinion in State v. Aylor, 416 So.2d 927 (La.1982), and distinguished our decision in State v. Harris, 406 So.2d 128 (La.1981). On the second issue, the court found the trial court did not abuse its discretion in declining to rule on defendant's supplemental application, finding the record revealed the factual basis for those claims was readily available to defendant and they plainly could have been raised earlier. Therefore, the court of appeal denied writs. Upon defendant's application, we granted certiorari to review the correctness of that decision.[6]
The issue before us is whether the trial court's failure to hold a hearing on the issue of defendant's sanity prior to accepting his guilty pleas violated defendant's due process rights.
Defendant argues that the trial court's actions violated his due process rights, as set forth in La.Code Crim.P. art. 642 and art. 647. La.Code Crim.P. art. 642 provides:
The defendant's mental incapacity to proceed may be raised at any time by the defense, the district attorney, or the court. When the question of the defendant's mental incapacity to proceed is raised, there shall be no further steps in the criminal prosecution, except the institution of prosecution, until the defendant *160 is found to have the mental capacity to proceed. [emphasis added].
La.Code Crim.P. art. 647 provides:

The issue of the defendant's mental capacity to proceed shall be determined by the court in a contradictory hearing. The report of the sanity commission is admissible in evidence at the hearing, and members of the sanity commission may be called as witnesses by the court, the defense, or the district attorney. Regardless of who calls them as witnesses, the members of the commission are subject to cross-examination by the defense, by the district attorney, and by the court. Other evidence pertaining to the defendant's mental capacity to proceed may be introduced at the hearing by the defense and by the district attorney. [emphasis added].
The record shows that the court appointed a sanity commission, which examined defendant on May 24, 1988. The next day, the court accepted defendant's guilty pleas. There is no evidence that the trial court ever conducted a contradictory hearing on the issue of defendant's competency prior to accepting the pleas.[7] Therefore, we conclude the trial court's acceptance of the pleas without holding a hearing on defendant's competency violated La.Code Crim.P. art. 642 and art. 647.
The two leading decisions from this court dealing with the consequences of violations of those articles are State v. Harris, 406 So.2d 128 (La.1981), and State v. Aylor, 416 So.2d 927 (La.1982).
In Harris, the defendant was charged with four counts of armed robbery. He filed a motion for appointment of a sanity commission. A sanity hearing was set, but later was continued without date. Subsequently, Harris was released on bond, only to be arrested several months later on other charges. Harris then entered plea bargain negotiations, in which he agreed to plead guilty to the four counts of armed robbery in exchange for dismissal of other pending charges. Prior to sentencing, Harris renewed his request for a sanity commission. The trial judge denied the request. On appeal to this court, Harris argued the trial court erred in allowing him to enter guilty pleas without first resolving the issue of capacity to proceed and in denying his second motion for appointment of a sanity commission. On original hearing, we found the trial judge clearly committed error in proceeding once the sanity commission was appointed without resolving the issue of sanity and in failing to appoint a sanity commission at the second request. However, we found it unnecessary to set aside the guilty pleas and sentences "as the issue of capacity may be clarified on remand." 406 So.2d at 130. On rehearing, we reversed our holding that capacity could be determined on remand:
The law is clear in this situation. Article 642 mandates that "no further steps in the criminal prosecution" shall be taken until the defendant is found to have the mental capacity to proceed.
Acceptance of defendant's guilty pleas under these circumstances was clearly contrary to the law, and, we determine in this type of situation at least, not correctable retroactively. Defendant's guilty pleas therefore must be nullified.
Id. at 134 (footnote omitted).
Approximately one year after Harris, we again addressed this issue in the per curiam opinion in State v. Aylor. Aylor was charged with attempted second degree murder. Prior to arraignment, the trial judge appointed a sanity commission to determine Aylor's competency to stand trial. Both the state and defense agreed to submit the question of competency on the reports of the commission doctors and the *161 trial judge took the matter under advisement. Aylor failed to appear for arraignment and a bench warrant was issued for his arrest. Thereafter, before a different trial judge, Aylor entered a plea of guilty to the reduced charge of aggravated battery. Prior to sentencing, he attempted to withdraw his plea on the ground it was not knowingly and intelligently made. On appeal, we found that once the trial court granted the request for a sanity commission, it could take no further steps in the case until it found that Aylor had the capacity to proceed. Nonetheless, we did not vacate Aylor's guilty plea, finding that the commission doctors did examine Aylor and made their report to the trial court before he entered his plea. The case was remanded to the trial court for a formal determination of Aylor's capacity to proceed.
In the present case, the court of appeal found the facts were closer to Aylor than Harris. The court reasoned that since the sanity commission had conducted an examination of defendant prior to his entry of the guilty pleas, the trial court could make a retroactive determination of sanity. We agree that the facts of the instant case are in some ways closer to Aylor than Harris. However, for the following reasons, we now consider Aylor's holding that a case may be remanded for a retroactive determination of sanity to be erroneous.
It has long been accepted that a person whose mental condition is such that he lacks the capacity to understand the nature and object of the proceedings against him, to consult with counsel and to assist in preparing his defense may not be subject to trial. Drope v. Missouri, 420 U.S. 162, 171, 95 S.Ct. 896, 903, 43 L.Ed.2d 103 (1975). The failure to observe procedures adequate to protect a defendant's right not to be tried or convicted while incompetent to stand trial deprives him of his due process right to a fair trial. Id. at 172, 95 S.Ct. at 904; Pate v. Robinson, 383 U.S. 375, 86 S.Ct. 836, 15 L.Ed.2d 815 (1966); State v. Rogers, 419 So.2d 840 (La. 1982). Our statutory scheme for detecting mental incapacity "jealously guards a defendant's right to a fair trial." Rogers, at 843.
The state argues that the true question is whether there is sufficient evidence to show that defendant was not legally capable to proceed at the time of the guilty pleas. Based on the reports of the sanity commission made prior to the guilty pleas, the state contends the evidence shows defendant was competent to proceed. While on first impression this argument has some appeal, we believe it misses the point. As stated by Justice Blackmun, "the Due Process Clause does not simply forbid the State from trying and convicting a person who is incompetent. It also demands adequate anticipatory, protective procedures to minimize the risk that an incompetent person will be convicted." Medina v. California, ___ U.S. ___, ___, 112 S.Ct. 2572, 2584, 120 L.Ed.2d 353 (1992) (Blackmun, J. dissenting) (emphasis in original). Regardless of whether a retroactive determination of sanity can now be made, the fact remains that defendant was deprived of the protective procedures set forth in our criminal code prior to the entry of his guilty pleas, thus depriving him of his due process rights.[8] We believe this was the type *162 of situation La.Code Crim.P. art. 642 was designed to prevent when it mandated, in very clear and unambiguous language, that "no further steps in the criminal prosecution" shall be taken until defendant is found to have the mental capacity to proceed. Such was our holding in Harris, and we now re-affirm that interpretation as the correct statement of the law. To the extent that Aylor conflicts with this pronouncement, it is contrary to the language of La.Code Crim.P. art. 642 and must be overruled.
Accordingly, we hold the court of appeal erred in remanding the case for a retroactive sanity hearing. The trial court's acceptance of defendant's guilty pleas prior to holding a sanity hearing violated defendant's due process rights, as set forth in La.Code Crim.P. art. 642 and art. 647. Therefore, defendant's guilty pleas must be nullified and the case remanded for further proceedings.[9]

DECREE
For the reasons assigned, all proceedings taken after the appointment of the sanity commission, including defendant's guilty pleas, are vacated. The case is remanded to the district court for further proceedings.
LEMMON, J., dissents and assigns reasons.
LEMMON, Justice, dissenting.
When the defendant's mental incapacity to proceed has been raised, La.Code Crim. Proc. art. 642 prohibits any further steps in the prosecution until the defendant is found to have the mental capacity to proceed. The trial court's accepting of a guilty plea, when the defendant's mental incapacity to proceed has been raised and the issue has not yet been decided, is an error which is subject to correction on direct appeal or by post-conviction application. However, such an error is subject to harmless error analysis.[1]
One significant evil sought to be prevented by Article 642 is the trial court's acceptance of a guilty plea from an insane defendant. In the present case all of the information concerning the defendant's capacity to proceed had been accumulated at the time of the guilty plea. Inasmuch as the evidence prepared prior to the guilty plea established that the defendant did have the mental capacity to proceed, the court did not accept the guilty plea from an insane defendant, and any statutory violation is harmless beyond a reasonable doubt. Under these circumstances the interest in maintaining the integrity of convictions through guilty pleas outweighs the technical effect of the Article 642 violation.
The majority effectively holds that violation of Article 642 constitutes a procedural due process violation and can never be harmless error. Finding that there was a constitutional violation begs the question whether the error resulting in the violation was harmless beyond a reasonable doubt. Many trial errors constitute a constitutional violation, but the question still remains whether the error was prejudicial. Since the error in this case was not prejudicial, *163 reversal is not required, and I would decline to set aside the conviction.
NOTES
[*]  Judge Melvin A. Shortess of the Court of Appeal, First Circuit, sitting in place of Justice Cole.
[1]  La.Code Crim.P. art. 643 provides in pertinent part: "the court shall order a mental examination of the defendant when it has reasonable ground to doubt the defendant's mental capacity to proceed." Therefore, since it ordered the examination, the trial court must have found reasonable ground to doubt defendant's mental capacity to proceed.
[2]  Dr. Seiden diagnosed defendant as having an "adjustment disorder with depressed mood" and "alcohol dependence, continuous, in remission," but found he had the capacity to proceed. Dr. Ware diagnosed defendant as having "chronic alcoholism by history" and "an anti-social personality disorder," but found no evidence of significant psychiatric disease and concluded he was mentally competent.
[3]  The record is unclear as to the exact date of defendant's statement. The district attorney testified that the confession was made on May 24, 1988; however, a transcript of the statement in the record bears the date May 16, 1988.
[4]  The trial court allowed defendant to withdraw his earlier pleas of not guilty and not guilty by reason of insanity on the two counts of solicitation.
[5]  After the filing of his pro-se application for post-conviction relief, defendant retained his former attorney, and through him filed the "first supplemental motion for post-conviction relief." That motion sought to suppress defendant's confession on the ground that it was illegally taken.
[6]  605 So.2d 1105 (La.1992).
[7]  In his written reasons denying defendant's request for post-conviction relief, the trial court stated it was "aware of the reports of the sanity commission declaring petitioner had the mental capacity to proceed when the Court allowed petitioner to withdraw his former pleas and enter his plea of guilty." It seems the trial court was mistaken. Although the doctors' reports were dictated on May 24, 1988, both doctors testified their reports were not typed on that date, and were not delivered to the court until several days later. Moreover, the deputy who had escorted defendant to the examinations testified he did not receive a written report before leaving. Therefore, we find no evidence in the record to support the trial court's statement.
[8]  The present case is distinguishable from a case such as State v. Bennett, 345 So.2d 1129 (La. 1977). In Bennett, the sanity hearing was held, but the examining physicians admitted that they could not be certain of their results without further clinical evaluation of defendant. The trial judge failed to order additional testing upon defendant's request. Defendant was thereafter found guilty as charged by a jury. On appeal, we remanded for another sanity hearing following a complete reexamination of the defendant. Unlike the present case, the defendant in Bennett did receive a hearing, at which the members of the sanity commission testified. Further, the defendant in Bennett alleged he suffered from mental retardation, which we found to be a more static condition than mental illness. Hence, under certain limited circumstances, a retroactive determination of sanity may be permissible. Likewise, we do not mean to foreclose the possibility of a nunc pro tunc competency hearing, if a meaningful inquiry into defendant's competence can still be had, in those cases where the trial judge ignores a bona fide doubt as to defendant's competence to stand trial, or the issue of competence is not raised at trial. See Lokos v. Capps, 625 F.2d 1258 (5th Cir.1980); Zapata v. Estelle, 588 F.2d 1017 (5th Cir.1979). Those cases are not applicable to the present case, however, since defendant did raise the issue of competence prior to trial and the trial judge agreed there was reasonable ground for a mental examination under La.Code Crim.P. art. 643.
[9]  In his second assignment of error to this court, defendant argues that the trial court erred in dismissing his "first supplemental motion for post-conviction relief" as a successive application under La.Code Crim.P. art. 930.4(E). Given our holding on the first assignment, this assignment is moot. We note, however, that defendant may raise the substantive claim in this motion on remand as a pre-trial motion.
[1]  While I recognize that too many findings of harmless error by appellate courts tend to lessen the incentive for prosecutors and trial judges to avoid trial error, ignoring the fact that an error was harmless makes necessary a second trial when the defendant suffered no prejudice from the error in the first trial. The principal role of appellate judges in reviewing convictions is to insure that the accused received a fair trial. An appellate judge goes beyond that role by requiring a new trial based on trial error that did not affect the fairness of the conviction, and a disservice to the criminal justice system thereby results because of the overload of additional cases and the undermining of the integrity of convictions in fair trials.
