
300 S.C. 469 (1990)
388 S.E.2d 802
The STATE, Respondent
v.
Dan Wendell HARTFIELD, Appellant.
23141
Supreme Court of South Carolina.
Heard November 13, 1989.
Decided January 22, 1990.
*470 Chief Atty. David I. Bruck and Deputy Chief Atty. Elizabeth C. Fullwood of S.C. Office of Appellate Defense, Columbia, for appellant.
Atty. Gen. T. Travis Medlock, Asst. Atty. Gen. Harold M. Coombs, Jr., Staff Atty. Miller W. Shealy, Jr., Columbia, and Sol. Wade S. Kolb, Jr., Sumter, for respondent.
Heard Nov. 13, 1989.
Decided Jan. 22, 1990.
TOAL, Justice:
Hartfield was found guilty of trafficking in marijuana and possession of crack cocaine with intent to distribute. He received a twenty year sentence and a $25,000 fine for possession of crack cocaine with intent to distribute and a ten year sentence to be served concurrently and $10,000 fine for trafficking in marijuana. On appeal, Hartfield argues that the trial court erred in ruling that he could not present the defense of insanity or attempt to obtain a verdict of guilty but mentally ill. We agree and, therefore, reverse and remand for a new trial.

FACTS
Hartfield was arrested in January and indicted in March 1988 for drug offenses. On April 1, he was sent to the State Hospital for a determination of his competency to stand trial and his mental capacity pursuant to S.C. Code Ann. § 44-23-410 (Law Co-op. 1988). The observation ended May 13, 1988, and the hospital issued a report of finding of mental capacity. The report indicated the following three conclusions: (1) Hartfield was diagnosed as malingering, (2) Hartfield was capable of understanding the nature of the *471 charges and capable of assisting counsel in his own defense and (3) Hartfield had the capacity and ability to differentiate right from wrong at the time of the alleged offense on or about January 21, 1988.
Hartfield contested the report of finding of mental capacity and, therefore, a pretrial competency hearing was held. Dr. Morgan testified concerning the findings issued in the report. Morgan had examined Hartfield in May 1986, and February, April and May 1988. In general, his testimony was that he was originally of the opinion that Hartfield suffered from a psychosis. Morgan changed his diagnosis after observing Hartfield for an extended period of time during his stay at the State Hospital.
Dr. Theodore Galiano testified for the defense. Galiano had examined Hartfield in 1986, on January 6 and June 8, 1988. He was of the opinion that Hartfield was not competent to stand trial. He based this opinion on Hartfield's delusional thought system.
Dr. Galiano testified that Hartfield suffered from a paranoid psychosis. Persons with this disorder are capable of rational behavior some of the time, but at other times, they are completely irrational. Dr. Galiano testified that on January 6, 1988, three weeks before the offenses charged, Hartfield was "crazy as a billy goat." In fact, at that time Dr. Galiano recommended that Hartfield be committed to the State Hospital. Dr. Galiano testified that the difference between his diagnosis and that of Dr. Morgan was that he was of the opinion that Hartfield truly believed his delusional statements. Dr. Galiano said that even when Hartfield's behavior appears rational, he is acting under the beliefs that constitute his delusional system.
The trial court expressed concern over the etiology of Hartfield's disorder. In response to questioning from the court, Dr. Galiano stated that Hartfield suffers from an organic brain syndrome caused by chronic substance abuse. This has caused permanent and irreversible changes in the functioning of his brain. According to Dr. Galiano, Hartfield is insane at all times, whether intoxicated or sober. Dr. Galiano was of the opinion that Hartfield's mental illness rendered him unable to distinguish right from wrong or to recognize his acts as wrong.
*472 At the close of the hearing, the court found Hartfield competent to stand trial. The defense then advised the court that Hartfield might assert an insanity defense or seek to obtain a verdict of guilty but mentally ill. However, prior to opening statements, the court made the following ruling:
[A]t this junction in this case the position of the defendant has been taken through medical testimony indicating that, as I've recognized already, he is not insane, and that the summaries of the status that the position, whatever it is, voluntary participation in drugs, and under the long-standing law of this state, voluntary participation in the use of drugs is never an excuse for or a defense for crime. In that regard, it does not appear that there would be available for the defendant in this case a position that might be otherwise identified in Section 17-24-30, relative to either not guilty by reason of insanity or the position of guilty but mentally ill. Those positions are not available to the defendant and you need not make mention in opening statements or need not proceed to produce any evidence in that category.
Hartfield argues that the trial court erred in ruling that he could not present an insanity defense or seek to obtain a verdict of guilty but mentally ill. We agree.

ANALYSIS
The insanity defense is codified at S.C. Code Ann. § 17-24-10(A) (Cum. Supp. 1988).
It is a defense to a prosecution for a crime that, at the time of the commission of the act constituting the offense, the defendant, as a result of mental disease or defect, lacked the capacity to distinguish moral or legal right from moral or legal wrong or to recognize the particular act charged as morally or legally wrong.
This section codified the common-law defense of insanity. State v. Grimes, 292 S.C. 204, 355 S.E. (2d) 538 (1987).
The requirements for receiving a verdict of guilty but mentally ill are set forth in § 17-24-20:

*473 (A) A defendant is guilty but mentally ill if, at the time of the commission of the act constituting the offense, he had the capacity to distinguish right from wrong as defined in Section 17-24-10(A), but because of mental disease or defect he lacked sufficient capacity to conform his conduct to the requirements of the law.
The general rule is that voluntary intoxication or use of drugs does not constitute a defense to a crime. It has been recognized, however, that insanity caused by the use of drugs or intoxication may be a defense where the insanity is permanent and destroys the defendant's ability to know right from wrong. 22 C.J.S. Criminal Law §§ 112 and 113 (1989). In State v. Vaughn, 268 S.C. 119, 232 S.E. (2d) 328, 330 (1977), this Court adopted the rule that "voluntary intoxication, where it has not produced permanent insanity, is never an excuse for or a defense to crime...." (Emphasis added.)
Hartfield presented evidence that his use of drugs had caused permanent and irreversible brain damage which manifests itself in a mental illness. Therefore, he was entitled to present the defense of insanity or to attempt to obtain a verdict of guilty but mentally ill. Because this issue requires a reversal of the conviction and remand for a new trial, we need not address the other issues raised on appeal.
Reversed and remanded.
GREGORY, C.J., and HARWELL, CHANDLER and FINNEY, JJ., concur.
