delivered the opinion of the court:
On June 7, 1974, a grand jury indicted John William Bilyew for rape, murder and concealment of homicidal death in connection with the death of Frances Buckner. On defendant’s motion the circuit court of Williamson County appointed two psychiatrists and two psychologists to examine the defendant regarding his fitness to stand trial. The court held a fitness hearing on November 21 and 22, 1974; three weeks later the trial judge ruled that defendant was fit to stand trial. On March 3, 1975, defendant pleaded guilty to murder and concealment of homicidal death, and was sentenced to 50 to 100 years’ imprisonment for murder and 1 to 3 years’ imprisonment for concealment of homicidal death, the sentences to run consecutively. On appeal, the appellate court vacated the finding of fitness and all subsequent proceedings and remanded for a new fitness hearing. (55 Ill. App. 3d 69.) The appellate court held that the trial judge presumably had erroneously allocated the burden of proof to the defendant in the fitness hearing, pursuant to a statute then in effect but subsequently held unconstitutional by this court in People v. McCullum (1977), 66 Ill. 2d 306. We *297granted the People leave to appeal.
Defendant’s confession, introduced in support of the guilty plea, stated that on June 1, 1974, defendant was sitting on the front steps of his apartment building when he saw the deceased, a young girl to whom he had spoken once before, walking down the street. He approached her and asked her to come over and sit on his porch. She began to comply, but as they reached his yard he asked her for sex. When she refused he lost his temper and choked her to death with his hands. After undressing the body, he wrapped it in a blanket that he got from his apartment and hid it under a nearby house. Three days later, after hearing a “voice” commanding him to turn himself in, defendant dragged the body into the street and threw a rock through a neighbor’s window to attract attention.
At the fitness hearing two of the expert witnesses, Dr. Harris B. Rubin and Dr. Gordon E. Rader, testified for the defendant and the deposition of a third defense witness, Dr. A.S. Norris, was admitted into evidence. One expert witness, Dr. Leonard Horecker, testified for the People. Two of defendant’s witnesses were of the opinion that defendant was not fit to stand trial; one of defendant’s witnesses and the People’s witness were of the opinion that defendant was fit.
Dr. Rubin, a psychologist specializing in sexual problems, testified that defendant had never matured socially and had difficulty relating to people, especially females. The witness expressed doubt about how meaningful the defendant’s understanding of the charges against him and of the legal process were. The defendant appeared not to understand the seriousness of the charges because he thought that he would be sentenced to only 1 to 12 years’ imprisonment. Dr. Rubin further testified that during the interview he had been able to manipulate the defendant’s responses to questions. He concluded from this that defendant could not always tell fact from fantasy and *298would not be able to assist counsel effectively because he would attempt to respond in the way his attorney considered appropriate.
The evidence deposition of Dr. Norris, a psychiatrist, relied heavily on I.O. scores. In 1968 defendant was classified as mildly mentally retarded, with an I.O. of 63, equivalent to a mental age of approximately 10 years. In 1972 his I.O. was measured as 41, equivalent to a mental age of approximately six years. Dr. Norris based much of his testimony on this latter score. The witness observed that defendant was functionally illiterate, knew little arithmetic, and could not recall the witness’ name although it had been told to him several times. Dr. Norris testified that defendant understood the charges against him but did not appreciate their seriousness, since he kept asking when he was going to get out of jail. Defendant understood what bond was and was aware of prison but would not, in Dr. Norris’ opinion, appreciate what 20 years in prison meant. The witness testified that defendant could cooperate with counsel, but only to the degree that a six-year-old child could.
Dr. Rader, a clinical psychologist, gave defendant standardized psychological tests, one of which measured defendant’s I.O. at 66. The witness concluded that defendant was mentally deficient. He testified, however, that defendant could understand the basic purposes of the legal proceedings and the potential consequences of a conviction and could assist counsel with his defense, although “to a lesser extent than a person who is fully functioning.”
Dr. Horecker, a psychiatrist, testified that defendant was alert, spoke coherently and rationally, and gave the witness a detailed chronological history of himself. Defendant understood what murder and rape were and considered them serious charges, and he was aware in a general sense of criminal trial proceedings and prison. The *299witness testified that defendant could make judgments concerning questions and suggestions of his counsel and therefore could assist in his own defense. Dr. Horecker stated in response to cross-examination that defendant may have been better able to answer his questions because of the prior interviews with the other doctors.
In ruling that defendant was fit, the trial judge analyzed the evidence in detail; her findings clearly indicate what evidence she considered most probative. Noting that fitness involves only the defendant’s ability to function within the context of the trial, the judge disregarded the evidence of defendant’s social immaturity and his hearing of voices, neither of which the experts had testified would make him unfit. The judge found the evidence to indicate that defendant understood what rape and murder were and what the purpose of the proceedings was. The judge noted that all the experts agreed that defendant could communicate with his counsel, though they differed on the degree of communication. The judge further noted Dr. Norris’ reliance on the I.O. score of 41 and she specifically found that the score of 66, recorded after Dr. Norris’ examination, was more reliable. Finding that defendant understood the nature and purpose of the proceedings and could cooperate with his attorneys in his defense, the trial judge ruled that defendant was fit to stand trial.
The statute governing fitness to stand trial at the time of the hearing had been amended in 1972 to include a provision allocating this burden of proof at a fitness hearing:
“The burden of proving the defendant is not fit is on the defendant if he raises the question and on the State if the State or the court raises the question. ” (Ill. Rev. Stat. 1975, ch. 38, par. 1005 — 2—l(i).)
The Council Commentary stated that this provision merely clarified prior law. (Ill. Ann. Stat., ch. 38, par. 1005—2—1, *300Council Commentary, at 220 (Smith-Hurd 1973).) In fact, however, this court had consistently held that in a competency hearing the People bore the ultimate burden of establishing the defendant’s fitness by a preponderance of the evidence and that any allocation of this burden to the defendant denied him due process of law. (People v. Thompson (1967), 36 Ill. 2d 332, 334-35; People v. Bedford (1964), 31 Ill. 2d 227, 228-29; People v. Bender (1960), 20 Ill. 2d 45, 53-54.) Consequently, section 5—2—1(i) was unconstitutional on its face when enacted.
In People v. McCullum (1977), 66 Ill. 2d 306, this court held section 5—2—1 (i) unconstitutional as a violation of due process “to the extent that it places on the defendant the ultimate burden of proving unfitness to stand trial.” (66 Ill. 2d 306, 314.) The Appellate Court for the Fifth Judicial District had previously held the statute unconstitutional on the same grounds. (People v. Garlick (1977), 46 Ill. App. 3d 216.) That court in this case held that McCullum required reversal of the trial judge’s determination that defendant Bilyew was fit to stand trial.
We agree with defendant that the trial judge must be presumed to have followed the fitness statute in effect at the time of the hearing. Unless a trial court holds a statute unconstitutional, the court must follow the mandate of the statute until its validity is determined. (People v. Papas (1942), 381 Ill. 90, 94.) However, not every determination made pursuant to a statute, one provision of which is unconstitutional, requires automatic reversal. In this case the record fails to support the conclusion that the unconstitutional burden of proof provision entered into the trial court’s determination.
The statutory allocation of the burden of proof becomes significant in a given case only when the evidence is so nicely balanced that neither fitness nor unfitness is established by a preponderance of the evidence. In such a *301case, the determination must be adverse to the party bearing the burden. As the United States Court of Appeals for the Third Circuit said in United States v. DiGilio (3d Cir. 1976), 538 F.2d 972, 988:
“Allocation of the burden of proof will be significant, in theory at least, only in the rare case when, assuming the evidence is weighed by the preponderance of evidence standard, the conflicting evidence is in equipoise in the mind of the fact finder. At that point the triability of a defendant will depend on where the burden of proof is placed. To put the question another way, what we are determining is a rule of law, of due process dimensions, that a defendant, about whom the evidence of competency to stand trial is in equipoise, should or should not be tried.”
In this case the trial judge’s lengthy and careful statement of her reasons for finding defendant fit, fairly read, gives no indication that she was concerned about the burden of proof or believed that defendant had not met anything required of him. Rather the statement is entirely consonant with, and gives substantial confirmation to, the conclusion that the trial judge found defendant fit by a preponderance of the evidence.
The fact that the defendant offered his witnesses first at the hearing is not incompatible with this conclusion. This fact indicates only that the court required, in accordance with the statutory provision, that defendant proceed first. Since its first reference to the subject in 1963, the statute has always placed the burden of going forward with the evidence on the party raising the issue, and this provision has not been held unconstitutional. (Ill. Rev. Stat. 1977, ch. 38, par. 1005—2—l(j).) There is no indication that this provision refers, as defendant argues, only to the defendant’s raising of a bona fide doubt requiring the court to grant a fitness hearing. (Ill. Rev. *302Stat. 1977, ch. 38, par. 1005—2—1(c).) In this case the trial judge granted the hearing on the basis of the experts’ reports, the substance of which was the same as the experts’ testimony at the hearing.
Similarly, the fact that the four medical experts were evenly divided on the ultimate question of whether the defendant was fit is not controlling here. The appellate court found:
“[T]his case is an ideal example of a situation where the allocation of the burden of proof would be most likely to influence the court’s decision for the experts were equally divided on the ultimate issue. Thus, we feel it is insignificant that the court did not articulate that its decision turned on which party bore the burden.” (55 Ill. App. 3d 69, 73.)
However, the opinions of the expert witnesses on the ultimate question of fitness were not the most important parts of their testimony, and the appellate court has unduly emphasized those opinions, which are only as valid as the bases or reasons for them. The ultimate issue was for the trial court, not the experts, to decide. In reaching her determination, the trial judge properly analyzed and evaluated the factual bases for the experts’ opinions rather than relying on the ultimate opinions themselves. The credibility and weight to be given psychiatric testimony are for the trier of fact. (People v. Burress (1971), 1 Ill. App. 3d 17, 19.) While the judge did not refer expressly either to preponderance of the evidence or burden of proof, she clearly indicated that she had disregarded some evidence, discounted other evidence, and relied most heavily on evidence about which the experts were essentially in agreement. Specifically, all four experts found that defendant understood the charges and the legal process and could cooperate with counsel, although they differed on the depth of his understanding and the extent *303of his ability to communicate.
The present case is also distinguishable on its facts from McCullum. There a jury was the fact finder at the fitness hearing and was instructed that the burden was on the defendant to prove herself unfit. (66 Ill. 2d 306, 310.) Because a court of review cannot know what entered into the jury’s determination, such instructions were held to constitute reversible error. As this court said in People v. Thompson (1967), 36 Ill. 2d 332, 334:
“In view of the fact that the jury may have considered the entire pretrial sanity hearing upon an erroneous theory, we hold defendant was deprived of due process of law.”
The case is otherwise here, however. Here the trial judge was the fact finder and her careful analysis of the evidence does not support the conclusion that she resorted to the burden of proof in reaching her determination.
The appellate decision invalidating the burden of proof provision in People v. Garlick (1977), 46 Ill. App. 3d 216, is also distinguishable from the present case. In Garlick the trial judge was the fact finder, but his findings indicate that he did rely on the burden of proof in reaching his determination:
“The party who filed the Petition has the burden of proving this by the preponderance of the evidence. As counsel has said, there has been one psychiatrist who has said that he is able to assist in his defense; the other psychiatrist says no. One psychologist says yes; the other says no. *** The court has heard all this evidence and believes that the motion has not been sustained; that the defendant is fit to stand trial under the statute and will make an order so finding ***.” 46 Ill. App. 3d 216, 218-19. See also United States v. DiGilio (3d Cir. 1976), 538 F.2d 972, 988-89.
*304Defendant concedes that the presumed fact that the trial judge followed the statute’s unconstitutional mandate would be harmless error had the judge specifically stated that defendant’s fitness had been established by a preponderance of the evidence. However, an automatic reversal in the absence of such statement is not required by McCullum where, as here, the record contains no specific indication that the burden of proof was a factor in the trial judge’s conclusion.
The record does not substantiate defendant’s claim that he has been denied due process of law, and the judgment of the Appellate Court for the Fifth Judicial District is accordingly reversed and the judgment of the circuit court is affirmed.
Appellate court reversed; circuit court affirmed.