
44 P.3d 1205 (2002)
137 Idaho 150
STATE of Idaho, Plaintiff-Respondent,
v.
Vincent Lee COONTS, Jr., Defendant-Appellant.
No. 27079.
Court of Appeals of Idaho.
April 1, 2002.
Molly J. Huskey, Interim State Appellate Public Defender; Richard J. Hansen, Deputy Appellate Public Defender, Boise, for appellant.
Hon. Alan G. Lance, Attorney General; William M. Loomis, Deputy Attorney General, Boise, for respondent.
LANSING, Judge.
Vincent Lee Coonts, Jr. pleaded guilty to trafficking in marijuana and delivery of marijuana. At the outset of his sentencing hearing, Coonts's attorney requested an order for a psychological evaluation of Coonts. The district court denied the motion and then sentenced Coonts to a unified term of ten years with five years determinate for trafficking and a unified five-year sentence with two years determinate for possession. On appeal, Coonts challenges the district court's *1206 refusal to order a psychological evaluation before sentencing and the court's denial of Coonts's subsequent motion for reduction of the sentence.

I.

FACTUAL AND PROCEDURAL BACKGROUND
Law enforcement officers broke up a party near the Chesterfield Reservoir in Caribou County. In interviewing party participants, officers learned that Coonts had been giving away marijuana. They then searched Coonts's backpack and found sixty-one ounces of the drug. When asked by officials where he obtained the marijuana, Coonts replied that he had stolen it from a dealer in Salt Lake City. Coonts was charged with one count of trafficking in marijuana, Idaho Code § 37-2732B(a)(1), one count of possession of marijuana, I.C. § 37-2732(e), one count of possession of marijuana with intent to deliver, I.C. § 37-2732(a)(1)(B), and one count of delivery of marijuana, I.C. § 37-2732(a)(1)(B).
At Coonts's arraignment, after entering a not guilty plea, Coonts's attorney spoke with the district court regarding his client's mental health. The attorney said that Coonts had already entered into an oral plea agreement with the State, but Coonts now could not remember having made the plea agreement. According to the attorney, Coonts had explained that his faulty memory was attributable to manic depression. The attorney requested that Coonts "be seen by a doctor and get on medication so that he can make decisions . . . to assist in his defense since he says he cannot remember." In considering the attorney's request, the district court asked Coonts whether he had been taking medication for his condition. Coonts responded, "I've been self-medicating the last couple of years with marijuana, sir. I've been diagnosed for twenty years with." Upon hearing Coonts's self-incriminating response, the district court instructed him to stop speaking and struck his statement. The district court then asked Coonts's attorney to "make a formal written motion" regarding Coonts's mental status. The court cautioned:
"This has got to be done timely. I don't plan on delaying the trial, . . . so whatever you need to do to get ready make sure you're ready to go at that time. And then notice up for hearing any motion that you would like to."
About two weeks later, Coonts entered into a written plea agreement by which the State agreed to dismiss the possession charges in exchange for Coonts pleading guilty to trafficking and delivery. Before approving the plea agreement, the district court asked Coonts whether he had ever been treated or counseled for a mental disease or disorder. Coonts responded that he was "bipolar manic depressive" and suffered from post-traumatic stress disorder. Coonts said that he was taking Lithium as medication for his mental disorders. The court engaged in further discussion to determine whether Coonts understood the proceedings and was able to enter into the plea knowingly, voluntarily, and intelligently before the court accepted the guilty plea.
A presentence investigation was then conducted in which the investigator inquired into Coonts's mental health history. According to the presentence investigation report (PSI), Coonts told the investigator that he had been receiving treatment for manic depression, "on and off," since 1968. Coonts said that he had attempted suicide in 1985 by slashing his wrists, a claim that was verified by scars which were observed by the investigator. Coonts told the investigator that he had been taking Lithium and self-medicating with illegal drugs in order to combat depression. He expressed a belief that without medication he posed a threat to himself and others. Coonts also identified mental health facilities in Richmond, Virginia and Salt Lake City, Utah where he had recently received treatment, but no records from those facilities were included in the PSI. The PSI did, however, recommend that a psychological evaluation be obtained.
Coonts's sentencing hearing was conducted about two and one-half weeks after issuance of the PSI. At the outset of the hearing, Coonts's attorney requested that a psychological evaluation be performed before sentencing, basing his motion on the presentence *1207 investigator's recommendation. The district court denied the motion, stating:
Looking at the plea agreement the Defendant has not waived his right to appeal or Rule 35 or post conviction relief, and therefore I believe that what the presentence investigator was stating was that he feels that this evaluation should take place in the Department of Corrections system. And in the event he is found to have some mental problems then they can deal with it at that time. And if they feel that the sentence should be reviewed it could be reviewed under post conviction relief. He hasn't waived any right to that.
The district court then sentenced Coonts to a unified ten-year term of imprisonment with five years determinate for trafficking in marijuana, and a unified five-year term of imprisonment with two years determinate for delivery of marijuana.
Coonts filed a timely motion for reduction of the sentence pursuant to Idaho Criminal Rule 35. In support of the motion, he submitted a letter stating that he was being held in the mental health unit at the prison. At the hearing on the motion, Coonts's lawyer asked that the court await a mental health evaluation of Coonts that counsel believed had been performed at the prison. The court, however, did not wait for further evidence but, instead, denied the motion at the conclusion of the hearing. Coonts now appeals, contending that the district court abused its discretion by denying his motion for a psychological evaluation before sentencing and by denying his Rule 35 motion.

II.

ANALYSIS
We first address Coonts's argument that the district court erred by refusing to order a psychological evaluation before sentencing. The decision whether to obtain a psychological evaluation in aid of sentencing is committed to the trial court's discretion, but as with any discretionary determination, the trial court's action must be consistent with applicable legal standards. State v. McFarland, 125 Idaho 876, 879, 876 P.2d 158, 161 (Ct.App.1994). The legal standards governing the challenged decision in this case are supplied by Idaho Code § 19-2522(1), which provides: "If there is reason to believe the mental condition of the defendant will be a significant factor at sentencing and for good cause shown, the court shall appoint at least one (1) psychiatrist or licensed psychologist to examine and report upon the mental condition of the defendant." The language of this statute is mandatory, requiring that the trial court obtain a psychological evaluation whenever there is reason to believe that the defendant's mental condition will be of significance for the determination of an appropriate sentence.
This Court found the statute to have been violated by the trial court's omission to order a psychological evaluation in McFarland. We there vacated the defendant's sentence for second degree murder and robbery because the circumstances demonstrated that a psychological evaluation was essential for the district court's consideration in fashioning a sentence. Those circumstances included the facts that the defendant was a young man of borderline mental functioning, came from a dysfunctional family with parents who abused alcohol, had a history of vacillating moods, had suddenly escalated from relatively petty crimes to a brutal murder in which the victim was stabbed to death, and claimed to have no memory of the crime. We also noted the trial court's own conclusion that the murderous act resulted from the defendant's seeming absence of impulse control. In State v. French, 95 Idaho 853, 522 P.2d 61 (1974), and State v. Sabin, 120 Idaho 780, 782-84, 820 P.2d 375, 377-79 (Ct.App.1991), the appellate courts likewise held that the trial court had abused its discretion by failing to order a psychological evaluation in aid of sentencing.
We conclude that the circumstances of the present case similarly demonstrate a compelling need for a psychological evaluation. From the point of Coonts's arraignment, it was known to the trial court that Coonts claimed to suffer from a serious mental illness, manic depression, and that he claimed an inability to remember having discussed a plea agreement that had been recently negotiated. By the time he pleaded *1208 guilty, Coonts was receiving Lithium, a prescription medication for mental disorders. Coonts reported to the presentence investigator that he had previously been treated with Lithium, had been self-medicating with illegal drugs, had a history of suicide attempts, and had received mental health treatment intermittently since 1968. These facts were sufficient to alert the district court that Coonts's mental condition would be an important consideration at sentencing. A psychological evaluation could have provided useful illumination for the evaluation of Coonts's level of culpability and for formulation of a sentence that would be appropriate to meet the goals of sentencing.[1]
The district court may have been understandably chagrined that defense counsel had not complied with the court's direction that he formalize, with a written motion, the request for a psychological evaluation that was initially made at Coonts's arraignment, and that counsel presented no request for a psychological evaluation for sentencing purposes until the day of the sentencing hearing. These frustrations with defense counsel's lack of diligence do not, however, excuse the trial court from compliance with § 19-2522.
Nor does the availability of a mental health evaluation by the Department of Correction satisfy the statutory mandate. Section 19-2522 does not require a psychological evaluation merely to enlighten correctional officials who must make decisions on the defendant's conditions of confinement and treatment while incarcerated; the statute requires that the evaluation be conducted before sentencing so that the trial court will have the benefit of the evaluator's insights in fashioning an appropriate sentence.
Accordingly, we conclude that the district court erred in denying Coonts's motion for a psychological evaluation before sentencing. This necessitates that Coonts's sentences be vacated and that the case be remanded for preparation of a psychological evaluation report and for resentencing. Because of this disposition, we do not address whether Coonts's present sentences are reasonable nor whether the district court erred in denying Coonts's Rule 35 motion for reduction of the sentences.
Coonts's sentence is vacated, and this case is remanded for resentencing upon receipt of a psychological evaluation report.
Chief Judge PERRY and Judge GUTIERREZ concur.
NOTES
[1]  Under Idaho law, the goals of sentencing are the protection of society, the deterrence of crime, the rehabilitation of the offender, and punishment or retribution. State v. Toohill, 103 Idaho 565, 568, 650 P.2d 707, 710 (Ct.App.1982).
