The opinion of the court was delivered by
Plaintiff Arlette Wolkoff appeals fi-om the Law Division’s denial of her motion to vacate its order for the entry of judgment dismissing her case as settled. For the following reasons, we reverse and remand this matter for an evidentiary hearing.
Plaintiff sued defendants Carl Villane and Villane Construction Corporation for injuries which she allegedly sustained when the car that she was driving was struck from the rear by a vehicle driven by the individual defendant. The most serious of those injuries was a closed head injury. A clinical neuropsychologist whom plaintiff retained to testify at trial submitted a report which expressed the opinion that plaintiff suffered a “cerebral injury” and that, as a result, “she will have difficulty coping with novel situations or situations in which learning is prioritized.” He also stated that plaintiffs “abstract thinking is impaired, she will have difficulty in complex decision making and in complex problem solving.”
*284On December 7, 1994, the day the case was called for trial, the attorneys for the parties negotiated a settlement. The settlement discussions took most of the morning and were conducted in or near the courtroom where the case was scheduled to be tried. Plaintiff alleges that she waited on another floor of the courthouse. Her attorney conferred with her from time to time and she rejected several offers. Finally, her attorney reported to the court that the parties had agreed to settle for $85,000, and an order was entered dismissing the case.
The next day, plaintiff told her attorney “not to accept” the settlement. According to plaintiff, “he refused,” presumably because he had agreed to the settlement on the basis of what he understood to be his client’s approval of its terms. On December 9, 1994, plaintiff telephoned the trial judge’s chambers and left a message for the judge that she had not settled. On December 13, 1994, she wrote her attorney, requesting that he advise the court that her “understanding [was] that no settlement has been reached” and asking him to file a motion immediately. On February 7, 1994, represented by substituted counsel, she moved to vacate the settlement.
In the certification which plaintiff filed in support of her motion to set aside the settlement, she alleged:
3) On December 7, 1994 I came to the Union County Court House for what I believed was going to be the start of my trial on the injuries. I do not remember it all, but apparently a “settlement” was reached. Nothing was ever signed, nor was anything placed on the record.
4) On the day in question, I was in a lot of pain and under a lot of stress. I was in such pain that I could not find the handicapped entrance, I could not pour myself a cup of coffee, and found myself in a room with a glass ceiling in the court house basement alone and in pain. Because of my cognitive deficits and the overwhelming stress and pain, I had difficulty processing the information my attorney was giving to me and did not understand the terms and results of this alleged “settlement.”
5) Although ... my attorney was giving me information, I was incapable of processing that information. Although I remember figures were being mentioned, I could not retain them long enough to understand what they meant. I could not process the simplest of mathematical functions. I was unaware that we had reached a settlement. When I did leave the Courthouse I was aware that I had to *285meet [my attorney] at his office later that same afternoon, but because of the pain I want home to bed and stayed there.
7) On December 7, 1994, the day in question, I was in more pain than usual and had taken pain medication____ I was intimidated. The head injury I sustained in the accident interfered with my thought and memory process, as it does on many occasions, when aggravated by stress, fatigue and unusual pain.
Attached to plaintiffs certification are letters from a psychologist and a psychiatrist. The substance of both letters is that although neither of the writers can verify plaintiffs description of how she was feeling or what was happening to her cognitive processes during the settlement negotiations, her allegations are consistent with what she could have been experiencing in view of her condition.
Defendants did not submit any medical testimony to dispute plaintiffs claim that she underwent the deterioration of mental functions which she described. However, defendants’ attorney filed a certification in which he stated that he had observed at least one of plaintiffs conferences with her attorney from a distance and that plaintiff did not seem to him to be “confused, incapable of understanding [her attorney], or unaware of what was taking place.”
The motion judge decided plaintiffs application solely on Lhe basis of the certifications, without taking any live testimony. He found that plaintiff
was aware of her injuries and was cognizant of the figures that were being discussed for settlement. THer attorney] had numerous discussions with [plaintiff] and she was capable of understanding and ... rejecting lesser settlement amounts---- This court finds that Mrs. [Wolkoff] was able to process information to make this settlement based on her ability to reject lower settlement offers over the course of the day.
On the basis of these findings, the motion judge denied plaintiffs application to vacate the settlement. Plaintiff has appealed, arguing that because of her “cognitive defects,” “no settlement agreement was reached [and] even assuming that there had been a settlement, plaintiff is entitled under rule 4:50-1 to set aside the order of dismissal and to a trial on the merits.”
*286We begin our review of the order appealed from by reiterating the axiom that for “a trial court to decide contested issues of material fact on the basis of conflicting affidavits, without considering the demeanor of witnesses, is contrary to fundamental principles of our legal practice.” Conforti v. Guliadis, 245 N.J.Super. 561, 565, 586 A.2d 318 (App.Div.1991), aff'd on this point, 128 N.J. 318, 322-23, 608 A.2d 225 (1992). To the same effect, see Intek Auto Leasing, Inc. v. Zetes Microtech Corp., 268 N.J.Super. 426, 433, 633 A.2d 1029 (App.Div.1993); Prostak v. Prostak, 257 N.J.Super. 75, 81, 607 A.2d 1349 (App.Div.1992); Berrie v. Berrie, 252 N.J.Super. 635, 649, 600 A.2d 512 (App.Div.1991); Fusco v. Fusco, 186 N.J.Super. 321, 327, 452 A.2d 681 (App.Div.1982). In the present case, the parties clearly dispute issues of fact. Plaintiff alleges that brain damage prevented her from understanding and knowingly approving the settlement made in her name. Defendants deny these allegations. Whether the motion judge was correct in ruling on these disputed facts on the basis of the parties’ certifications, without an evidentiary hearing, therefore depends on whether the disputed facts are material. Another way to put that question is to ask whether plaintiff would be entitled to have the settlement vacated if she proves her allegations.
As we noted in Aponte v. Williard, 229 N.J.Super. 490, 493, 551 A.2d 1054 (App.Div.1989),
The settlement of a law suit has three aspects: the initial agreement, which is a contract between the parties; the order of the court dismissing the suit, which is subject to the court rule controlling the relief from an order or judgment, R. 4:50-1; and the delivery of a release, a document with independent legal significance.
In the present case, plaintiff has neither executed a release nor received any money. Whether plaintiff is entitled to vacate the order of judgment of dismissal depends on whether she is entitled to treat the settlement agreement as void or to have it rescinded.
The basic rule pertinent to our decision of that question was stated as follows in Hillsdale Nat. Bank v. Sansone, 11 N.J.Super. 390, 399, 78 A.2d 441 (App.Div.1951):
*287[W]here there is not the mental capacity to comprehend and understand, there is not the capacity to make a valid contract.
The rule is of long standing.1 In somewhat more antique language, it was stated this way in Eaton v. Eaton, 37 N.J.L. 108,113 (Sup.Ct.1874):
The test of capacity to make an agreement ... is, that a man shall have the ability to understand the nature and effect of the act in which he is engaged, and the business he is transacting____ [I]f the mind be so clouded or perverted by age, disease, or affliction, that he cannot comprehend the business in which he is engaging, then the writing is not his deed..
Furthermore, subject to exceptions which are inapplicable here, “transactions of third parties, which, under the circumstances, would be invalid if had directly with the principal, must be equally invalid though they be done with the agent.” Matthiessen & *288 Weichers Refining Co. v. McMahon’s Adm’r, 38 N.J.L. 536, 546 (E. & A. 1876).
Applying these principles, courts in other jurisdictions have recognized that a settlement in a personal injury case mil be set aside, even after a release has been delivered, if the proofs show with sufficient clarity that the plaintiff was incompetent to authorize the settlement. For example, in Pattison v. Highway Insurance Underwriters, 292 S.W.2d 694 (Tex.Civ.App.1956), a husband and wife were severely injured as the result of their car’s colliding with a truck that was making a U-turn at.night on a dark highway. They sued for damages and defendants moved for summary judgment. One of the grounds upon which defendants sought summary judgment was that plaintiffs’ suit was barred by their execution of a release. However, plaintiffs had suffered a complete loss of memory of the collision as the result of head concussion injuries which they sustained in the crash, and they alleged that the husband was incompetent when he executed the release. The opinion implies that his incompetence was the result of his injuries, but it does not say so explicitly.
The trial court granted defendant’s motion for summary judgment. Reversing the grant of summary judgment, the appeals court said:
It is not denied that plaintiffs can make an issue on the mental capacity of [the husband] at the time he signed the releases in question. If [his] mental incapacity can be established, the releases are voidable and will be voided on a showing of what would otherwise be injury, if [his wife’s] joinder does not bar the community existing between herself and husband.
[Id. at 696].
In Norfolk Southern Corp. v. Smith, 262 Ga. 80, 414 S.E. 2d 485 (1992), plaintiff was injured in an on-the-job accident. He began undergoing treatment by a psychologist, who diagnosed him as suffering from depression. Thereafter he was hospitalized following a psychotic episode. His mental state improved and he was released from the hospital. He then negotiated a $25,000 settlement of his claim for personal injuries suffered as the result of the accident and a $25,000 payment in connection with his resignation *289from his employment, and he signed and delivered releases in exchange for those payments. Subsequently, he sued his employer under the FELA and state tort law. The employer moved to dismiss on the basis of his releases and plaintiff responded by amending his complaint to seek cancellation of the releases on the ground of mental incapacity. The jury found in plaintiffs favor and defendant appealed from the resulting judgment, alleging, among other things, that the trial court’s jury instructions were erroneous and, in addition, that the court should have directed a verdict in defendant’s favor on the issue of competency. The Georgia Supreme Court granted a new trial because of error in the instructions, but on the question of whether or not there should have been a directed verdict, the Court stated:
[Plaintiff] had the burden of showing that he lacked the necessary mental capacity at the time he executed the releases. The requisite degree of mental capacity has been defined in two alternative but equivalent ways, which is that a contract is subject to cancellation if the person executing the contract was entirely without understanding of the contract or if the person lacked a full and clear understanding of the nature and consequences of the contract____
Our review of the record shows that the evidence was in conflict concerning whether, at the time he executed the releases, [plaintiff] was entirely without understanding of them or lacked a full and clear understanding of their nature and consequences. Accordingly, we hold that the trial court did not err by denying a directed verdict on the question of [plaintiffs] mental capacity at the time he executed the releases.
[Id. 414 S.E.2d at 488-89].
In Carey v. Levy, 329 Mich. 458, 45 N.W.2d 352 (1951), the plaintiffs sued to recover damages for severe injuries, including brain damage to one of the plaintiffs, allegedly suffered as the result of an automobile accident caused solely by defendants’ negligence. Defendants moved to dismiss the suit on the basis of a release which plaintiffs had given them in exchange for $725. The plaintiffs claimed that because of the brain damage caused by defendants’ negligence, the releasor was incompetent when he delivered the release. The trial court entered an order dismissing the suit unless plaintiffs returned the $725. Plaintiffs did not make restitution and their claim was dismissed. They appealed. The Michigan Supreme Court affirmed on the ground that restitu*290tion was a condition for vacating the settlement when the settlement had been executed by the delivery of a release in exchange for cash, thus implicitly recognizing that the settlement would have been set aside if the plaintiffs had made restitution and then proved their allegations of incompetency. See also Jimenez v. O’Brien, 117 Utah 82, 213 P.2d 337 (1949) (reversing for lack of sufficient evidence to support jury’s finding that release should be vacated because personal injury plaintiff was incompetent as the result of his injuries when he executed the release).
Our court’s decision in Peskin v. Peskin, 271 N.J.Super. 261, 638 A.2d 849 (App.Div.), certif. denied, 137 N.J. 165, 644 A.2d 613 (1994), although it involved a divorce settlement and not the settlement of a personal injury claim, is instructive for the present case. The defendant husband in Peskin sought to set aside the divorce judgment and the settlement incorporated therein on the ground that “he was suffering from severe clinical depression, he was taking powerful anti-depression medication at the time the settlement was negotiated,” and he “was forced by way of a withering cross-examination conducted by the [trial court]” to submit to what he characterized as an extraordinarily unfair settlement. Id. at 263-64, 638 A.2d 849. The facts were that just before plaintiff was about to call her first witness for the tort claim portion of the divorce trial, defendant told the court that he would like to settle the case but was concerned whether he would be able to meet the financial obligations that the settlement would entail. In response to comments from the court and from his own attorney, defendant repeated his expressions of indecision. There were further settlement discussions after two witnesses had testified. The trial judge then asked him whether he wanted to settle or whether another witness should be called to the stand. Defendant responded, “Okay, I’ll settle the case.” But as the settlement was being put on the record, defendant indicated that he was “having a problem” and that he was “overwhelmed.” Id. at 265, 638 A.2d 849. After further adjournments, discussions and expressions of indecision by defendant, the trial judge became frustrated. He strongly and repeatedly pressed defendant for a *291“yes or no” answer. At length, defendant agreed to a settlement and, in response to questioning, testified that his consent was “voluntary.” The next day, the defendant consulted with another lawyer and, after two weeks’ of hospitalization at the Carrier Foundation for psychiatric treatment related to “severe depression,” and further treatment thereafter, defendant moved to set aside the divorce judgment. The physicians’ certifications submitted in support of his motion expressed the opinion that defendant suffered from “a paralyzing degree of ambivalence and indecision” and that his “‘capacity to participate in decision making with regard to important issues with emotional implications was significantly impaired’ ... due to his ‘anxiety, depression, and impaired cognition.’ ” Id. at 270, 638 A.2d 849. The motion judge, who had presided over the divorce trial and the settlement discussions, denied defendant’s motion to vacate and denied his application for an evidentiary hearing.
We stated, “If a settlement agreement is achieved through coercion, deception, fraud, undue pressure, or unseemly conduct, or if one party was not competent to voluntarily consent thereto, the settlement agreement must be set aside.” Id. at 276, 638 A.2d 849 (emphasis added) (citations omitted). We reversed the orders denying the defendant’s motion to vacate, vacated the judgment of divorce and the settlement incorporated therein, and remanded the matter to another trial judge. We also explained, “Since we hold that the settlement was coerced, and that the judgment and settlement be vacated, there is no need to remand the matter to the trial court for a plenary hearing as to defendant’s lack of capacity to consent to the settlement.” Id. at 279, 638 A.2d 849. The implication of our opinion is that the defendant’s “lack of capacity to consent to the settlement,” if it were proved at a plenary hearing, would also have sufficed to vacate the judgment of divorce and the settlement.
In the present case, plaintiffs right to vacate the settlement depends upon her proving at a plenary hearing, on the basis of relevant, competent evidence, including testimony of plaintiff and *292her medical and psychiatric or neuropsychological experts, that when she approved the settlement, she lacked “the ability to understand the nature and effect of the act in which [s]he [was] engaged and the business [s]he [was] transacting.” Eaton v. Eaton, supra, 37 N.J.L. at 113. If plaintiff sustains her burden of proof, she will be entitled to have the settlement vacated. However, the motion judge will have the discretion to condition setting aside the settlement on plaintiffs compensating defendants for reasonable attorneys’ fees incurred for services rendered in connection with the settlement negotiations. We add that if the settlement is set aside on the ground of plaintiffs incompetency, a guardian ad litem will have to be appointed for her so that a recurrence of her incompetence will not again frustrate the disposition of this law suit.
The order appealed from is reversed and this matter is remanded to the Law Division for further proceedings not inconsistent with this opinion.