
385 N.W.2d 506 (1986)
Harold WITHORNE, Petitioner and Appellant,
v.
Herman SOLEM, Respondent and Appellee.
No. 15083.
Supreme Court of South Dakota.
Considered on Briefs February 12, 1986.
Decided April 16, 1986.
Richard Braithwaite, Sioux Falls, for petitioner and appellant.
Jeffrey P. Hallem, Asst. Atty. Gen., Pierre, for respondent and appellee; Mark V. Meierhenry, Atty. Gen., Pierre, on brief.
WUEST, Justice.
This is an appeal from a circuit court judgment denying petitioner habeas corpus relief. We affirm.
In January 1973, petitioner Harold L. Withorne (petitioner) was arrested and charged with the murder of Harriet Milo. He was bound over for trial after a preliminary hearing, at which time the trial court *507 granted his request to remove his court-appointed counsel. R.E. Brandenburg was subsequently appointed as counsel.
Petitioner pleaded not guilty by reason of mental illness and was examined in early October 1973 by Doctors Sorum and Lebkowski of the Yankton State Hospital. They submitted written reports stating petitioner was not insane at the time of the offense, and was presently competent to stand trial. In November 1973, petitioner informed counsel he intended to change his plea to guilty. At counsel's request, he talked to Dr. Leander, a Sioux Falls psychiatrist. Dr. Leander submitted a written report stating petitioner was presently incompetent to stand trial, and was probably insane at the time of the offense.
On November 21, 1973, prior to petitioner's guilty plea, counsel motioned to impanel a jury to determine whether he was competent to stand trial under SDC 34.2002, the predecessor to SDCL 23A-10A-4. The motion was based on Dr. Leander's report questioning petitioner's sanity. A hearing was held and the trial court denied the motion, stating that Dr. Leander's opinion was not borne out by the opinions of Doctors Sorum and Lebkowski. The court held its contact with petitioner indicated he was fully aware of the seriousness of the charges against him; he exhibited no signs of mental incompetence in court; and was of normal intelligence. The court also noted the motion was filed despite petitioner's belief that he was competent to stand trial and understood the proceedings against him.
Following the denial of the motion for a competency trial, the trial court held a change of plea proceeding. Both counsel and the trial judge advised petitioner of the nature of the charges against him, his constitutional and statutory rights, the defenses available, and the consequences of a guilty plea. Prior to pleading guilty, petitioner stated he had not been harassed by anyone, and the record is devoid of facts indicating his plea was the result of undue influence, force or coercion. Thereafter, against the advice of counsel, petitioner entered a plea of guilty to the murder charge. The trial court accepted the plea, holding it was made knowingly, intelligently and voluntarily. Petitioner was sentenced to life imprisonment in the South Dakota State Penitentiary.
On February 22, 1985, petitioner filed a writ of habeas corpus in circuit court with regard to his murder conviction, contending the trial court abused its discretion in denying the motion for a competency trial. On June 27, 1985, a hearing was held on the writ, and on July 19, 1985, the circuit court entered a memorandum opinion denying the writ on the ground that petitioner failed to meet his burden of proof establishing a cause for discharge. A certificate of probable cause allowing an appeal to this court was issued on August 9, 1985, and petitioner appeals.
The statute applicable to this appeal is SDC 34.2002, the predecessor to SDCL 23A-10A-4, which provided:
When an indictment or information is called for trial, or upon conviction the defendant is brought up for judgment, if a doubt arises as to the sanity of the defendant, the court must order a jury to be impaneled from the jurors summoned and returned for the term, or who may be summoned by direction of the court from the body of the county in cases where sufficient jurors duly summoned have not appeared. The trial of the indictment or information or the pronouncing of judgment, as the case may be, must be suspended until the question of insanity is determined by the verdict of the jury. (Emphasis added.)
In Magnenton v. State, 76 S.D. 512, 81 N.W.2d 894 (1957), this court held a defendant need not be actually insane in the sense of lacking criminal responsibility for an act, to be entitled to a competency trial under SDC 34.2002, as the issue involved is sanity for the purpose of present triability. A defendant is entitled to this proceeding if facts and circumstances of a substantial character arise which are sufficient to raise a real doubt in the mind of the trial judge as to defendant's sanity. In this regard, sanity is determined by appraising *508 the present ability of the accused to so understand the nature and purpose of the proceedings against him as to be able to conduct his own defense in a rational manner, and cooperate with counsel to the end that any available defense may be interposed. Magnenton, supra; State v. Vassar, 279 N.W.2d 678 (S.D.1979); see also Dusky v. United States, 362 U.S. 402, 80 S.Ct. 788, 4 L.Ed.2d 824 (1960); Grissom v. Wainwright, 494 F.2d 30 (5th Cir.1974); Lokos v. Capps, 625 F.2d 1258 (5th Cir.1980); United States v. DiGilio, 538 F.2d 972 (3rd Cir.1976). "There is a presumption of sanity, and the burden is on the accused to show that the trial court abused its discretion in refusing a competency trial." Vassar, 279 N.W.2d at 683.
In Pate v. Robinson, 383 U.S. 375, 86 S.Ct. 836, 15 L.Ed.2d 815 (1966), the United States Supreme Court interpreted the due process clause to require that a criminal defendant be afforded an adequate hearing on competency to stand trial whenever the trial judge becomes aware of a bona fide doubt concerning the defendant's competence. The United States Supreme Court has not articulated a general standard for the nature or quantum of evidence needed to trigger a competency procedure, however, and several courts have interpreted the Pate decision to require substantial evidence of incompetency in habeas corpus cases such as this. See, e.g., Zapata v. Estelle, 588 F.2d 1017 (5th Cir.1979); Grissom, supra; Bruce v. Estelle, 483 F.2d 1031 (5th Cir.1973); Holmes v. United States, 407 A.2d 705 (D.C.App.1979). This is the explicit caveat imposed by the court in Bruce v. Estelle, 483 F.2d at 1043:
Courts in habeas corpus proceedings should not consider claims of mental incompetence to stand trial where the facts are not sufficient to positively, unequivocally and clearly generate a real, substantial and legitimate doubt as to the mental capacity of the petitioner to meaningfully participate and cooperate with counsel during a criminal trial.
While the United States Supreme Court has not set a specific standard of evidence needed to trigger a competency proceeding, it has focused on three factors that should be considered: (1) the existence of a history of irrational behavior; (2) defendant's demeanor at trial; and (3) prior medical opinion. Drope v. Missouri, 420 U.S. 162, 95 S.Ct. 896, 43 L.Ed.2d 103 (1975); see also Lokos, supra; Chenault v. Stynchcombe, 546 F.2d 1191 (5th Cir.1977).
Applying these factors to the case before us, we believe petitioner has failed to prove the trial court abused its discretion in denying the competency trial. The record admits of no evidence establishing that petitioner had a history of irrational behavior other than the crime in question. In addition, while petitioner entered a guilty plea and consequently was not tried for the offense, he made several court appearances before the trial court, and it specifically held his demeanor created no suspicion of mental incompetence. Finally, the two State psychiatrists who examined petitioner found him to be competent to stand trial, and although a psychiatrist hired by petitioner's trial counsel disagreed with their conclusions, we do not find this lone opinion dispositive.
In a similar case, Enriquez v. Procunier, 752 F.2d 111 (5th Cir.1984), the Court upheld a trial court's finding of sanity, determining that while one doctor suggested the defendant was suffering from significant mental illness, his opinion was more than offset by reports of other doctors and the trial court's observations.
We therefore conclude the petitioner failed to prove in the habeas corpus proceeding the refusal to grant a competency hearing was an abuse of discretion; and, therefore, the denial of habeas corpus relief is affirmed.
FOSHEIM, C.J., MORGAN and HENDERSON, JJ., and HERTZ, Circuit Judge, acting as a Supreme Court Justice, concur.
*509 SABERS, J., not having been a member of the Court at the time this action was submitted to the Court, did not participate.
