
551 N.W.2d 577 (1996)
1996 SD 86
John HURNEY, Petitioner and Appellant,
v.
Joseph P. CLASS, Warden of the South Dakota Penitentiary, Appellee.
No. 19374.
Supreme Court of South Dakota.
Considered on Briefs May 24, 1996.
Decided July 2, 1996.
*579 Kent R. Cutler of Schieffer, Cutler & Donahoe, Sioux Falls, for petitioner and appellant.
Mark W. Barnett, Attorney General, Jennifer K. Trucano, Assistant Attorney General, Pierre, for appellee.
PER CURIAM.
[¶ 1] John Hurney (Hurney) appeals an order quashing his petition for a writ of habeas corpus. We affirm.

FACTS
[¶ 2] Hurney was indicted by a Minnehaha County grand jury for three counts of third degree rape and was also charged as an habitual offender. His jury trial took place on July 21 and 22, 1992. Hurney had attempted to obtain private counsel for his defense, but, was unable to raise the retainer. Accordingly, he was represented by Joseph Reed (Reed), a court-appointed attorney with the Minnehaha County Public Defender's Office.
[¶ 3] The jury convicted Hurney on all three counts and he was released on his personal recognizance pending disposition of a motion for a judgment of acquittal and arraignment on the habitual offender charges. The habitual offender arraignment was scheduled for August 3. That morning, Reed advised the trial court that Hurney had been committed to the mental ward of McKennan Hospital and that Hurney was in the hospital under a twenty-four hour hold. The prosecutor later advised the court that Hurney had been transported to the Human Services Center in Yankton. The prosecutor asked the court to issue a bench warrant for Hurney to be served upon his release from the Human Services Center. The trial court issued the warrant and, due to inability to post the required bond, Hurney was incarcerated in the Minnehaha County Jail after being released from the Human Services Center. See SDCL 23A-10A-4.1.
[¶ 4] Bond reduction proceedings, a hearing on the motion for a judgment of acquittal and arraignment on the habitual offender charges followed Hurney's release from the Human Services Center. Hurney admitted one of the prior convictions alleged in the habitual offender information and sentencing was scheduled for late December. Reed sought a delay of sentencing and moved for an examination of Hurney by a qualified expert. See SDCL 23A-10A-3. The motion was granted and Hurney was examined by D.J. Kennelly, a psychiatrist in Sioux Falls. Dr. Kennelly advised Reed in several letters that it was his opinion that Hurney was not competent to rationally participate in legal proceedings or consultations with his attorney at that time.
[¶ 5] A competency hearing was held on February 8, 1993.[1]Id. Based upon Dr. Kennelly's opinions, the trial court entered an order declaring Hurney incompetent to proceed. See SDCL 23A-10A-4. Hurney was committed to the Human Services Center with orders for a report within four months concerning Hurney's capacity to proceed with sentencing. Id. On March 10, a psychiatrist with the center certified Hurney had recovered to an extent where he would be able to understand the nature and consequences of the proceedings and to assist in his defense. See SDCL 23A-10A-4.1. Reed moved for yet another competency examination and a competency hearing was held on March 29. Id. The trial court heard testimony from several mental health professionals who had examined Hurney and, at the conclusion of their testimony, found Hurney competent to proceed. Id. The trial court immediately sentenced Hurney to twenty-five years in the penitentiary on each count, all *580 three sentences to run concurrently. However, after the hearing, the trial court's written judgments directed that Hurney's sentences be served consecutively.
[¶ 6] Hurney appealed his convictions to this Court, but, subsequently obtained a dismissal of his appeal so that he could move for correction of an illegal sentence by the trial court. The trial court entered amended sentences on March 24, 1994 directing that Hurney's sentences be served concurrently in accord with its oral sentence.
[¶ 7] On March 25, 1994 Circuit Judge Kean entered an order appointing attorney Steven Nesson to represent Hurney in a possible habeas corpus action. Nesson obtained the appointment of a psychiatrist to evaluate Hurney's competency at the time of the criminal proceedings. After the psychiatrist's report, Nesson moved to withdraw from Hurney's case on the basis that Hurney's claims of incompetence were unsupported by the evidence. A hearing was held on Nesson's motion to withdraw and Judge Kean denied the motion. Nevertheless, he substituted attorney Kathy Miller Trimble to file Hurney's petition for a writ of habeas corpus.[2] The petition was ultimately filed by attorney Kent Cutler who was apparently appointed to substitute for attorney Trimble for reasons that are not clear in the record. Hurney's petition alleged he was being detained as a result of an unlawful conviction because he was deprived of effective assistance of trial counsel and because of his mental incompetence throughout the criminal proceedings.
[¶ 8] The hearing on Hurney's petition for habeas corpus relief was held by Judge Srstka (the habeas court) who entered detailed findings of fact and conclusions of law. The habeas court determined Reed's defense of Hurney was not deficient and that Hurney had failed to show his mental condition during the criminal proceedings was so debilitating that he was unable to consult with counsel or unable to understand the proceedings. Accordingly, the habeas court's order quashed Hurney's petition for a writ of habeas corpus. Hurney appeals.

ISSUE 1

[¶ 9] Was Hurney convicted while incompetent in violation of due process of law?
[¶ 10] "[H]abeas corpus can be used only to review (1) whether the court had jurisdiction of the crime and the person of the defendant; (2) whether the sentence was authorized by law; and (3) in certain cases, whether an incarcerated defendant has been deprived of basic constitutional rights." Everitt v. Solem, 412 N.W.2d 119, 121 (S.D. 1987).
An incompetent person has a due process right not to be convicted. Griffin v. Lockhart, 935 F.2d 926, 929 (8th Cir.1991)(citing Drope v. Missouri, 420 U.S. 162, 172, 95 S.Ct. 896, 904, 43 L.Ed.2d 103 (1975), and Pate v. Robinson, 383 U.S. 375, 378, 86 S.Ct. 836, 838, 15 L.Ed.2d 815 (1966)). In addition, all criminal defendants have a due process right, in certain circumstances, to have their competence determined in an evidentiary hearing. Id. (citing Drope, 420 U.S. at 180, 95 S.Ct. at 908; Pate, 383 U.S. at 378, 86 S.Ct. at 838). A denial of either of these rights may provide the basis for habeas relief.
Weisberg v. State of Minnesota, 29 F.3d 1271, 1275-76 (8th Cir.1994). Hurney contends he was actually incompetent throughout his trial and, therefore, his convictions are rendered void.
[¶ 11] The Eighth Circuit Court of Appeals dealt with a similar habeas corpus claim in Weisberg, supra where the defendant claimed he was mentally incompetent at the time he entered a guilty plea. The district court found the defendant's statements during entry of the plea and the evidence introduced *581 during postconviction proceedings demonstrated that the defendant was incompetent when he entered the plea. Accordingly, habeas corpus relief was granted. The Eighth Circuit reversed after thoroughly analyzing the record for factors indicative of the defendant's competency during the plea proceedings, e.g., the defendant's testimony at the plea proceedings; the presence or absence of any confusion over the questions propounded; historical evidence of the defendant's mental condition; and, evidence of the defendant's mental condition subsequent to the proceedings in question.[3] Based upon its consideration of these factors, it was the appellate court's conclusion that:
Retrospective determinations of whether a defendant is competent to stand trial or to plead guilty are strongly disfavored. Such determinations have "inherent difficulties" even "under the most favorable circumstances." Drope, 420 U.S. at 183, 95 S.Ct. at 909; cf Day, 949 F.2d at 982 n. 9 ("To require a sentencing court [upon a collateral attack to a prior conviction] to decide whether a defendant was competent during proceedings that took place years earlier would be an exercise in futility.") ... [A]fter carefully reviewing the record, we conclude that Weisberg has failed to prove that he was incompetent when he entered his guilty plea. The district court's ultimate finding on this issue was clearly erroneous.
Weisberg, 29 F.3d at 1278.
[¶ 12] In the instant case, the habeas court similarly conducted an exhaustive review of the trial record in addition to taking extensive testimony concerning Hurney's mental condition at the time of trial. Testimony was received from Hurney, his ex-wife, his former mother-in-law, Reed, Reed's supervisor, the private attorney Hurney initially attempted to retain for his defense, the prosecuting attorney and Judge Heege, the trial judge who sat on Hurney's case. Based upon its review of the record, evidence and testimony received, the habeas court entered findings to the following effect: (1) that the trial court noticed no indication or manifestation of incompetency by Hurney during trial; (2) that the trial court remembered no facts that would generate a legitimate doubt as to Hurney's mental capacity to stand trial; (3) that, despite meeting with Hurney on several occasions before and after trial, Reed's supervisor did not recall being alerted to any problems regarding Hurney's mental state before trial; (4) that Reed remembered Hurney as being very interested in his case, as interacting just fine and as lucid and coherent; (5) that Reed remembered no outward manifestations that might have prompted him to order a mental evaluation of Hurney; (6) that Reed was not made aware of Hurney's prior mental history; (7) that the prosecutor remembered observing Hurney and Reed consulting during trial; (8) that the prosecutor remembered Hurney as appearing to understand the questions he was asked and also remembered his answers as being lucid; (9) that the private attorney Hurney originally attempted to retain formed no questions or concerns about Hurney's mental state from their initial discussions; (10) that the private attorney remembered Hurney's questions as rational and related to the issues they discussed; and, (11) that the private attorney saw no evidence or any indication from Hurney that Hurney was incapable of proceeding to trial or incapable of assisting in his own defense.
[¶ 13] The above findings are all well supported by the record. There is simply no indication of any mental impairment in Hurney's behavior until after the jury's verdict. From that point on, it does appear that Hurney's mental condition did decline until he reached the point of checking into McKennan Hospital's mental ward a week or so after the verdict. The only contrary evidence of mental impairment during trial is testimony offered by Hurney, his ex-wife and mother-in-law concerning Hurney's debilitated mental condition at the time of trial. Hurney's ex-wife and mother-in-law also testified that they expressed concerns over Hurney's mental *582 condition to the trial court, Reed and Reed's supervisor during the course of trial. However, neither the trial court, Reed nor Reed's supervisor could confirm these reports. Thus, the credibility of Hurney, his ex-wife and mother-in-law was clearly in question and the habeas court obviously resolved the credibility issue against Hurney. Credibility determinations are matters for the trier of fact and are not subject to review on appeal. State v. Hage, 532 N.W.2d 406 (S.D.1995).
[¶ 14] Perhaps the evidence most damaging to Hurney's argument is his own testimony during trial. A review of his direct and cross-examination reveals testimony that is clearly competent, lucid, responsive and relevant to the defenses advanced by Reed. In short, if Hurney was incompetent at the time of trial, he was competent enough to hide it very well.
[¶ 15] Based upon the foregoing, there is no clear error in any of the habeas court's findings concerning Hurney's competence at the time of trial. Accordingly, Hurney has failed to establish he was convicted while incompetent in violation of his rights to due process of law.

ISSUE 2

[¶ 16] Was Hurney denied effective assistance of counsel?
[¶ 17] Hurney contends he was denied his constitutional right to effective assistance of counsel because Reed failed to request a psychological examination or competency hearing prior to trial. This court's standard of review for such contentions is clear:
We start with the presumption that [Reed] is competent until [Hurney] makes a showing to the contrary. It is his burden to establish ineffective assistance of counsel. In Jones v. State, 353 N.W.2d 781 (S.D. 1984), we adopted the standard for determining ineffective assistance of counsel as set forth in Strickland v. Washington, 466 U.S. 668, 104 S.Ct. 2052, 80 L.Ed.2d 674 (1984).
The benchmark for judging any claim of ineffectiveness must be whether counsel's conduct so undermined the proper functioning of the adversarial process that the trial cannot be relied on as having produced a just result. To reverse a conviction on ineffective assistance grounds, a defendant must show: 1) that counsel's performance was deficient; and 2) that the deficient performance prejudiced the defense. The test for prejudice is whether there is a reasonable probability that, but for counsel's unprofessional errors, the result of the proceeding would have been different.

Jones, 353 N.W.2d at 784.
Gross v. Solem, 446 N.W.2d 49, 51 (S.D.1989) (citations omitted).
[¶ 18] In Stanley v. Lockhart, 941 F.2d 707 (8th Cir.1991), the Eighth Circuit Court of Appeals reviewed an ineffective assistance claim similarly based upon counsel's failure to request a mental examination of the defendant before his entry of a guilty plea. In rejecting the claim, the circuit court observed that, prior to entry of the plea, counsel had explained the legal standards of competence to stand trial and the defendant had indicated he did not believe he would meet the standards required to establish mental incompetence. Moreover, the defendant had not revealed any history of mental problems to counsel and had concurred in counsel's decision not to file a motion for a mental examination. In addition, the circuit court observed that opinion testimony during the defendant's habeas hearing from the defendant's counsel and two experts who examined the defendant in connection with the habeas proceedings failed to support the defendant's claims of incompetence. Their testimony established that the defendant had a complete and rational understanding of the charges against him at the time of the plea negotiations and entry of the guilty plea and that the defendant had the ability to consult with his attorney with a reasonable degree of rational understanding. Based upon these considerations, the Eighth Circuit affirmed the district court's holding that the defendant's counsel was not ineffective for failing to request a mental examination of the defendant.
*583 [¶ 19] Again, in Bainter v. Trickey, 932 F.2d 713 (8th Cir.1991), the Eighth Circuit reviewed an ineffective assistance claim based upon counsel's failure to properly investigate and raise the defendant's psychological condition as an issue at trial. Observing that the record contained conflicting opinion evidence concerning the defendant's competence at the time of trial and the fact that the defendant's trial testimony was lucid, minutely detailed and responsive, the Eighth Circuit concluded that, "[Defendant] could not have been prejudiced even if we believed that his attorney's failure to investigate [his] mental condition fell below the Strickland objective standard of reasonableness. We therefore reject [defendant's] final argument." Bainter, 932 F.2d at 716.
[¶ 20] These same factors are present in the instant case. The testimony in the record concerning Hurney's competence at the time of trial is conflicting. However, the transcript of Hurney's trial testimony reveals responses that are clearly lucid, minutely detailed and responsive. Hurney revealed no history of mental problems to counsel prior to trial. In addition, the expert opinion of a psychiatrist retained in connection with the habeas corpus action reveals:
[W]hile it is conceivable that " ... it could have been discovered that he was either incapable of assisting in his own defense, or else not legally responsible for his criminal conduct," that in all likelihood Mr. Hurney was not so actively deranged by whatever psychotic disorder he might have experienced in the time previous to his legal activities, during his trial activities or immediately subsequent to those activities in July of 1992 and prior to his hospitalization at McKennan Hospital on August 2, 1992, as to render him "incapable of assisting in his own defense, or else not legally responsible for his criminal conduct." I believe that he was able to reasonably and rationally participate in his criminal defense as evidenced in police investigative reports of his arrest, (report dated February 12, 1992,) as evidenced by his coherent activities in his arraignment hearing of April 15, 1992 and as evidenced by his testimony as noted in the court report of the trial of July 1992.
[¶ 21] Based upon these factors and the foregoing authorities, Reed was not ineffective for failing to request a competency examination for Hurney prior to trial and, even if he was, his deficient performance in no way prejudiced Hurney's defense. Stanley, supra; Bainter, supra.

ISSUE 3

[¶ 22] Did the trial court deny Hurney his due process right to have his competence determined in an evidentiary hearing?
[A]ll criminal defendants have a due process right, in certain circumstances, to have their competence determined in an evidentiary hearing. A denial of [this right] may provide the basis for habeas relief.
* * * * * *
Trial courts are obligated, either on a defendant's motion or sua sponte, to conduct an evidentiary hearing if there is "sufficient doubt" about the defendant's competence." Absent some contrary indication, state and federal trial judges are entitled to presume that defendants are competent."
Weisberg, 29 F.3d at 1275-76. SDCL 23A-10A-3 is essentially a codification of these due process requirements:
At any time after the commencement of a prosecution for an offense and prior to the sentencing of the defendant, the defendant or the prosecuting attorney may file a motion for a hearing to determine the mental competency of the defendant. The court shall grant the motion, or shall order such a hearing on its own motion, if there is reasonable cause to believe that the defendant may presently be suffering from a mental disease or developmental disability, or other conditions set forth in § 23A-10A-1, rendering him mentally incompetent to the extent that he is unable to understand the nature and consequences of the proceeding against him or to assist properly in his defense. Prior to the date of the hearing, the court may order that a psychiatric or psychological examination of *584 the defendant be conducted, and that a psychiatric or psychological report be filed with the court, pursuant to the provisions of §§ 23A-46-1 and 23A-46-2. The hearing shall be conducted pursuant to the provisions of § 23A-46-3.
[¶ 23] Hurney contends the trial court violated his due process rights by failing to sua sponte require a competency hearing to ascertain his mental condition prior to trial.
A court reviewing a record for evidence of a defendant's competence in a prior proceeding must determine "whether evidence of incompetence was such that a reasonable judge would be expected to experience a genuine doubt respecting the defendant's competence." If the judge should have had such a genuine doubt, due process requires the court on its own motion to hold a hearing and inquire into the defendant's competence to plead guilty.
The issue before the district court was ... whether the ... judges who accepted [the defendant's] guilty pleas had evidence before them which should reasonably have caused them to doubt [the defendant's] competence. If so, their failure to hold a competency hearing violated due process. A good faith doubt about a defendant's competence arises if there is substantial evidence of incompetence. There are no particular facts which invariably signal incompetence, but important factors which merit a judge's attention include: irrational behavior, demeanor before the trial court, and available medical evaluations.
U.S. v. Lewis, 991 F.2d 524, 527 (9th Cir. 1993) (citations and footnote omitted).
[¶ 24] In Weisberg, supra, the Eighth Circuit found no error in the trial court's failure to conduct a competency hearing where the facts and circumstances known to the trial court at the time of its proceedings did not raise a sufficient doubt in the defendant's competence. The same is true here. Just as in Weisberg, neither the trial judge, the prosecutor nor defense counsel in this case have ever given any indication that Hurney's competence at the time of trial should be doubted. Also as in Weisberg, the transcript of the trial court proceedings gives no reason to doubt Hurney's competence at that time. To the contrary, the transcript shows Hurney was alert, unafraid and able to proffer testimony in support of the theories of defense advanced by Reed. Moreover, Hurney answered all questions directed to him without any apparent hesitation or lack of comprehension. In short, there is absolutely nothing in the trial record that would have caused a reasonable judge to experience a genuine doubt concerning Hurney's competence. Accordingly, there was no trial court error or due process violation in the trial court's failure to conduct a competency hearing for Hurney prior to, or during trial.
[¶ 25] Affirmed.
[¶ 26] MILLER, C.J., and SABERS, AMUNDSON, KONENKAMP and GILBERTSON, JJ., participating.
NOTES
[1]  Due to the retirement of Judge Heege, the original trial judge, the competency hearing and subsequent proceedings were conducted by Judge Severson, Judge Heege's replacement.
[2]  The hearing on Nesson's motion to withdraw was actually more of a probable cause hearing to ascertain the possible merits of a habeas corpus action. Thus, the denial of the motion to withdraw was, in reality, more in the nature of a determination of probable cause to proceed with the habeas corpus action. However, Judge Kean logically concluded it would be inappropriate for attorney Nesson to represent Hurney after his efforts to withdraw. For that reason, despite his formal denial of Nesson's motion to withdraw, Judge Kean substituted attorney Trimble for Nesson.
[3]  Understandably, these factors are substantially similar to the factors this Court has held should be considered in determining the necessity of a competency hearing: "(1) the existence of a history of irrational behavior; (2) defendant's demeanor at trial; and (3) prior medical opinion." Withorne v. Solem, 385 N.W.2d 506, 508 (S.D. 1986).
