Lacy, J.,
delivered the opinion of the court.
This is an appeal from a decree of the circuit court of Roanoke city, rendered at the April term, 1888. On the first Monday in February, 1886, the appellants filed their bill in the hustings court for the city of Roanoke, against the appellees, to have specific performance of a parol agreement made about the 1st day of April, 1880, by which Isham M. Ferguson had contracted with them, to give and grant unto them his house and lot of six acres of land, and the furniture therein, upon the condition of their giving up their own home, and living in his, the said Ferguson’s, house, to protect, provide for, and take care of the said Ferguson, an old man, then diseased, childless, and a widower, much distressed and upset by the recent death of his wife; which agreement was consummated by the delivery of possession to the said plaintiffs, and their change of circumstances, by abandoning their own home, and by the sale of it; and the expenditure by them of large sums of money in erecting and constructing valuable improvements on the said house and lot, with the approbation of the said Ferguson; such as. re-fencing the said lot, erecting a small house thereon, and roofing the dwelling-house with slate, and repainting the same, which *323cost them $1,000. And that they oared for the said Ferguson in sickness and in health until his decease. That he, the said Isham M. Ferguson, was in sound mind, and competent to contract when this contract was made; and afterwards on the 15th of September, 1880, when his mind was perfectly sound, he voluntarily executed a deed of conveyance, conveying to them the said house and lot and furniture in effectuation of the said parol contract. That the said Isham M. Ferguson having had an attack of mental aberration about the 1st of May, 1880, and another, lasting a few hours, about the 10th of August, 1880, after his death his brothers and his sister, the two Fergusons and Mrs. Tench, brought suit in the county of Franklin to set aside the said deed of conveyance to the appellants, Fishburne and wife, upon the ground that the grantor therein, their brother, Isham M. Ferguson, was insane and incompetent to execute it; in which they succeeded, and the same was set aside, and the decision affirmed on appeal by this court. But that there was no evidence adduced, and none can be adduced, tending to show any unsound ness of mind on the part of Isham M. Ferguson at the time the parol agreement was made; and the deed having been set aside for a cause which did not vitiate nor in anywise affect the parol agreement to convey, that they were entitled, upon well-settled principles, to have the said agreement, which was upon a valuable consideration and fully executed on their part, specifically performed. The defendants demurred to the bill, and depositions were taken in the cause; whereupon, for reasons personal to the judge of Roanoke city, which rendered it improper in his opinion for him to preside at the trial and decide the cause, it was removed to the circuit court of Roanoke; when the said circuit court, at the December term, 1886, overruled the demurrer so far as it rested upon the ground that this suit had been concluded by the suit to set aside the deed; but so far as it rested upon an alleged variance between the contract set up in the bill and the one set forth in the deed alleged to be in furtherance of the said agreement, sustained the said demurrer, *324and granted leave to amend. An amended bill having been filed, and the defendants having filed their answer, by decree in the cause, rendered at the April term, 1888, the demurrer was overruled, and the bill of the plaintiffs dismissed for reasons which the decree recites are in writing and made a part of the record, but which do not appear therein. Whereupon the appellants, Fishburne and Callie L., his wife, applied for and obtained an appeal to this court.
It is sought to maintain the decree of the circuit court—-first, upon the ground that the decision in the Franklin county case is conclusive of this case, and the question here is res adjudicata ; and, secondly, because the contract sought to be enforced is not such as a court of equity should enforce, because it is not fair and equal; that full possession did not accompany it, and because the conduct of the parties procuring it was not such as would entitle them to the aid of a court of equity; and if fair, certain and just in all its parts, still it is not sufficiently proved.
It is necessary first to consider whether this suit is concluded by the suit referred to in Franklin county; for, if the question is res adjudicata, the whole matter ends there; for, when a matter is adjudicated and finally determined by a competent tribunal, it is considered as forever at rest. This is a principle upon which the repose of society materially depends, and it therefore prevails with very few exceptions throughout the civilized world. This principle not only embraces what actually was determined, but also extends to every other matter which the parties might have litigated in the case; and when the facts which constitute the cause of action or defense have been between the same parties submitted to the consideration of the court, and passed upon by the court, they cannot again be the proper subjects for an action or defense, unless the finding and judgment of the court are opened up or set aside by competent authority. This principle of law extends still further in quieting litigation. A party cannot relitigate matters which he might have interposed, but failed to do in a prior action between the same parties, or their *325privies, in reference to the same subject-matter. Bates v. Spooner, 45 Ind. 493, 7 Rob. Pr. 172; Hopkins v. Lee, 6 Wheat. 109. Courts of justice do not, in stating the rule, always employ the same language; but when every objection urged in the second suit was open to the party, within the legitimate scope of the pleadings in the first suit, and might have been presented at that trial, the matter must be considered as having, passed in rem judicatam, and the former judgment in such a case is conclusive between the parties. Aurora City v. West, 7 Wall. 82, 103; Lee v. Kingsbury, 13 Tex. 68; Blackwell v. Bragg, 78 Va. 529. Mr. Wells, in his work on this subject, says (section 252): “The first step in determining whether the matter might have been decided in the prior action is to ascertain whether it was relevant or not; that is, whether it was within the scope of the pleadings. So that, when one sets up, in a subsequent suit, a former judgment, he must show that the matter alleged by the other party either was actually litigated, or that it might have been under the issues; it being only matters involved in the issues that are regarded as res ad/judicata.” And the general language of a decree will be restrained to the issue made, and the subject-matter under consideration when it was rendered.
The original record in the Franklin suit, by Ferguson’s Adm’r and others v. Fishburne and Wife, was by consent brought here with this cause, so that the depositions therein may be read in this cause. Upon looking into that suit, the bill is filed to set aside and annul the conveyance of September, 1880. An issue was directed out of chancery to try the following issues: (1) Whether the deed in the proceedings mentioned, from Isham M. Ferguson to T. T. Fishburne and O. L. Fishburne, was obtained by fraud or undue influence. (2) Whether or not, at the time of the execution of the said deed, the grantor, Isham M. Ferguson, was incapable, by reason of disease, old age, or other causes, of clearly understanding the purport and object of the deed. The jury found the following verdict, which was recorded and approved by the court: “We, the jury, find for the defen*326dants on the first issue; but find that Isham M. Ferguson, on the 13th September, 1880, was incapable of understanding the purport and object of the deed executed by him on that day to Tipton T. Fishburne and Callie, his wife, and we therefore find for the plaintiffs on the second issue.” On appeal, the decree of the court below rendered on this verdict was affirmed.
It appeai-s from the foregoing statement of the issues and judgment thereunder in the first suit that the sole question in issue there was as to the validity of the said deed, and the sole finding therein was that the said deed was not valid and binding on the grantor and those claiming as his heirs at law, because of his mental incapacity at the time of its execution. The question as to the validity of this deed was the sole question in the case to be determined, and the question in this suit as to the parol partly executed contract, for the conveyance of the said house and lot, etc., was not in anywise pertinent to the issue. If evidence of it had been offered, it must have been excluded under the scope of the pleadings in that case; and whenever any attempt was made to refer to this in the course of taking the testimony, it was promptly objected to as irrelevant. It was excepted to and properly ruled out, as it could not have been introduced under the pleadings in that cause. But it is suggested that it might have been brought in by way of defense to the action by a cross-bill, by the defendants setting it up against the plaintiffs. But this would have been in effect the institution of a new suit, making new pleadings, which would have been independent of the pending suit; and the original bill might have been dismissed, and the cross-bill remain unaffected, and the court might have proceeded to decree upon the issues in the cross-bill. A cross-bill is proper whenever the defendants, or either of them, have equities arising out of the subject-matter of the original suit, which entitle them to affirmative relief which they cannot obtain in that suit. Ragland v. Broadnax, 29 Gratt. 420. In a subsequent case, decided in the court of appeals of West Virginia (O. & O. L. Co. v. Vinal, and Vinal v. *327O. & O. L. Co., 16 W. Va. 637), the subject is elaborately treated by Green, J., and upon this subject the foregoing case is followed. Such a bill is an auxiliary suit brought by the defendants for their purposes, and such they might have brought if they were so advised; and the controversy would have been a distinct controversy, arising under the issues therein, upon which the court might have decreed after the original bill had been dismissed or otherwise disposed of. They were not obliged to bring their suit in this way, however. The question thus to be raised was distinct from the issue made by the suit against them, and the decision of that suit, therefore, in nowise affected their rights in this regard, which stood on wholly distinct and unconnected ground. And they have a right now to maintain this suit, upon the same or kindred principles which entitled them, if they had been so advised, to have filed their cross-bill in the other suit. They had a right to take either course, but, it would seem, not both. If they had pursued the one and brought the matter into that suit, and it had been decided, it would have been res adjudicaba, and they would have had no right to pursue the other. The case of Stearns v. Beckham, 31 Gratt. 381, is referred to by counsel, and is a case in point. On the 29th of November, 1862, the vendor agreed to sell, for $100,000, a tract of land, and received $45,000 in cash, with the understanding that the residue, $55,000, should be paid in ten days. On the 3d of December following the vendor was stricken with paralysis; hut the matter was carried on, and the $55,000 was paid, and the deed made and possession given of the land. Thus the matter stood for some years, when the grantor, growing worse, a committee was appointed for him, and in September, 1866, the said committee instituted his suit to set aside, the deed, on the ground of mental incapacity of the grantor at the time of its, execution, and also to have the contract rescinded, because of improper influences exercised over him, and the inadequacy of consideration. The court set aside the deed, and directed that the vendees should surrender the land, unless within ninety days they *328should file a hill for the specific execution of the contract, which bill for specific execution was filed; and in that case, while the contract was not specifically- executed, the vendees were required to make restitution of the money they had received, which was declared to he a lien on the land. Notwithstanding the cancellation of the deed because of imbecility of the grantor at the date of its execution, such action was held not to have concluded or to have adjudged the rights of the parties to claim the specific execution of the agreement made under different circumstances; that is, before the stroke of paralysis which wrought the imbecility. So, in this case, the cancellation of the deed, because of incompetency existing at the date of its execution, does not affect in anywise a contract made and performed before any incapacity or insanity had set in; and we think the plaintiffs have a right to maintain this suit.
Upon the question as to whether this contract is such as should be specifically performed in the light of the decided cases, we have no doubt. An agreement, to be entitled to be carried into specific performance, ought to be certain, fair, and just in all its parts. It is not considered as a matter of right in either party ; but it is matter of discretion in the court; a matter of sound and reasonable discretion, which grants relief according to the circumstances of each particular case. Courts of equity will not decree a specific performance in cases of fraud or mistake, or of hard or unconscionable bargains; or when the decree would produce injustice; or when it would compel the party to an illegal or immoral act; or when it would be against public policy; or when it would involve a breach of trust; or when a performance has become impossible; and generally not in any case when such a decree would be inequitable under all the circumstances. 2 Story Eq. Jur. §769; Sugd. Vend., c. 3, § 4, p. 123. In this case an old man sixty-six years of age, a widower, and childless, finds himself, upon the death of his wife, lonely and unhappy in their former home. He has relatives who appear to have been anxious to get a share of his property at his *329death, but they do not fill the measure of his need. His wife’s niece, the appellant, Mrs. Fishburne, had been reared in his house from early childhood, had been married a short time before his wife’s death to T. T. Fishburne, who was a protege of his, and they together had gone to live in their own home. Heeding womanly ministrations about his home, he said this foster child was most suited to his wants. She knew his ways ; he knew her; there was nothing strange between them; and he asked her to give up her home and come to his house, and with her husband make it a home for him, provide for him, feed him in health, nurse him in sickness. He might -live for years; he might survive a short time only. For this care and nurture he could not offer hire or wages. He wanted a daughter, not a servant ; and he agreed to give this property to the two; to be a home for him and for them as long as he lived, and for them when he died. He was otherwise wealthy, and this was hut a small part of his estate. They fully performed on their part— left their home, changed their circumstances, and, with unchallenged kindness and affection, cared for him tenderly as long as he lived. He made them a deed to the property; but before this was done, old age and disease had made more rapid strides than he thought, and he has been adjudged to be incompetent, by reason of mental and bodily infirmity, to make a deed in September, 1880. But there is not a hint in all the evidence in the cause that he was in anywise affected mentally or bodily when he made this contract. All his maladies came long after-wards. He received, at the hands of Fishburne and wife, all he bargained for; and much or little, speaking generally, it was a great deal to him in his old age, his loneliness and infirmity. It was what, in his right mind, in unimpaired mental and bodily vigor, he agreed to give this house and lot for, and for which he did give a deed. Why should this contract not he enforced ? These parties have expended their money on it and greatly improved it. They have fully performed on their partj and the contract should he specifically executed. The principles *330upon which this should be decreed are fully set forth in the late case of Halsey v. Peters, 79 Va. 66, and authorities cited. Burkholder v. Ludlam, 30 Gratt. 225. The first-named case was similar to this in. its details, and the contract was there specifically executed by decree of this court.
The decree of the circuit court of Roanoke city having dismissed the hill of the plaintiffs, the same will be reversed and annulled, and a decree rendered here in accordance with the foregoing opinion.
Lewis, P., and Hinton, J., concurred in the opinion of the court as to the question of res judicata, but dissented as to the merits.
Decree reversed.