This was an action by Sallie Watkins against Eliza Nugen, to recover real property, and for certain equitable relief. Some of the allegations of the original petition were stricken by amendment. Other allegations were thus added. The petition as it finally stood was, in substance, as follows: James H. Watkins was the owner of the property in dispute. In 1870 petitioner was married to Watkins, and thereafter they lived together on the land, “ and he continued to own the same until he died intestate in 1891,” leaving petitioner as his sole heir at law, and as such she is entitled to the possession of the property, there being no administration upon the estate of Watkins and no debts. Wilson Watkins was the father of James H. Watkins, and received the property for the latter from the executor of Richard Wages.' Petitioner, being left in easy circumstances by her husband, and in view of the advanced age of Wilson Watkins and the fact that he was her father-in-law, “ agreed with him, while she was in possession of said property,” that he might have possession of the property and receive the rents, issues, and profits thereof as long as he lived. This was simply a family arrangement, and no deed or writing indicating this agreement was made. Wilson Watkins often stated that he had no interest in the property, and that petitioner was the sole owner thereof. Pursuant to this agreement, Wilson Watkins received the rents, issues, and profits from the land until his death, which occurred on February 17, 1902. Petitioner has learned that in 1897 Wilson Watkins executed a paper conveying the property to the defendant, and this instrument constitutes a cloud upon the title of petitioner. It is alleged that this instrument is void, because it is testamentary and executed in the presence of only two witnesses, because it was procured by fraud, and because based upon a promise of the defendant to live thereafter in unlawful sexual intercourse with the grantor. Since the death of Wilson Watkins the defendant has taken possession of the property, claiming it as her own. The defendant is insolvent. The prayers were, that, pending the determination of the issues involved, a receiver be appointed; that *377the deed from Wilson Watkins to defendant be cancelled as a cloud upon petitioner’s title; that petitioner be decreed to be the owner of the property ; arid for general relief. The court appointed a temporary receiver, and at-the hearing discharged him and dismissed the petition on demurrer. To this the plaintiff excepted.
The right of the plaintiff to the relief sought depends upon whether or not her allegations show prior possession either in herself or her husband, and whether under the facts alleged she can recover on this prior possession alone; it not being contended that the allegations show title in James H. Watkins otherwise than by the presumption which would arise from possession. An heir at law may recover on the prior possession of his ancestor; but in order to make out a prima facie case, it must appear that the ancestor was in possession under a bona fide claim of right at the date of his death. See Brown v. Colson, 41 Ga. 42; Boynton v. Brown, 67 Ga. 396; Wolfe v. Baxter, 86 Ga. 705; Bagley v. Kennedy, 85 Ga. 703. Construing the plaintiff’s petition most strongly against her, it is not averred that James H. Watkins, her husband, was in possession at the time of his death. It is alleged ■ that he and plaintiff lived together on the land after their marriage in 1870, and that he continued to own the property until his death. It is not alleged how long after marriage Watkins lived on the property, and the averment that he owned the property until his death is not at all inconsistent with the idea that he may have resided on the land for a- few years and then moved away,leaving some one else in possession, but still retaining the title. We think it is clear, therefore, that the allegations of the petition do not make out a prima facie case on the theory of prior possession of plaintiff’s husband.
“ A plaintiff in ejectment may recover the premises in dispute upon his prior possession alone, against one who subsequently acquires possession of the land by mere entry, and without any lawful right whatever.” Civil Code, § 5008. See also Civil Code, § 3875; Wood v. Haines, 72 Ga. 190 (2); Nolan v. Pelham, 77 Ga. 263; Bagley v. Kennedy, 85 Ga. 706; Horton v. Murden, 117 Ga. 72. The allegations of the petition are sufficient to show a claim of title based on prior possession of the plaintiff. It is alleged distinctly that when the agreement was made with Wilson Watkins that he might have the rents, issues, and profits of the land, the plaintiff wasdrrpossession. It is inferable that this agreement *378was made shortly after the death of James H. Watkins in 1891. At any rate, it was made before the defendant acquired possession, because she entered after the death of Wilson Watkins. The plaintiff, therefore, had prior possession; and this was sufficient to make out a prima facie case for recovery, if the defendant acquired her possession “ by mere entry, and without any lawful authority whatever.” As Wilson Watkins was in possession for at least six'years before the defendant’s deed was executed, and there is in the petition no suggestion that defendant knew of the parol arrangement between plaintiff and Wilson Watkins, but, so far as appears, took her deed in good faith, believing that he was the owner, she could not be treated as a mere intruder, if her deed had been valid.
But the plaintiff alleges that the deed was void for several reasons. So far as the allegations with respect to fraud and that the instrument was testamentary are concerned, the decision in Watkins v. Nugen, ante, which involved this same deed, is conclusive. It was there held that the instrument was a deed, and that the allegations of fraud were too loose and general to authorize the setting aside of the deed on that ground. It is, however, further alleged, as it was also in the case just referred to, that the deed was-void because of the promise of the defendant to continue in unlawful sexual intercourse with the grantor; the petition distinctly averring that the consideration of the deed was the defendant’s promise-to unlawfully cohabit with the grantor in the future. There can be no question that an instrument founded solely on such a consideration is absolutely void and can not operate to vest title. 15 Am. & Eng. Enc. L. (2d ed.) 960; 2 Pars. Cont. (8th ed) * 746; Bish. Cont. (En. ed.) § 509; Hammon, Cont. § 226. See also Civil Code,. § 3666. It would be otherwise if the consideration were past unlawful intercourse. 15 Am. & Eng. Enc. L. (2d.ed.) 961; Smith v. Dubose, 78 Ga. 413. In Watkins v. Nugen, supra, an effort was made by the heirs at law of Wilson Watkins to prevent the enforcement of this same deed; and we held, that, the contract-being executed, the court could afford them no relief. But this-is a very different thing from saying that the contract was valid and enforceable. The ruling then made proceeded upon the theory that the parties were in pari delicto and therefore could not invoke a ruling from the court as to whether the deed was valid or void; that the court would wash its hands of the whole matter and leave. *379the parties where it fqund. them. But the reason of this rulé is wholly inapplicable where one of the parties to the controversy is neither a party to the contract nor in privity with either party thereto, but claims under an independent title and seeks to have the illegal contract declared void because it constitutes a cloud on his title. In such a case the court is not called upon to enforce the contract but simply to declare, what is palpably true, that the whole contract is illegal and void. Why should the court refuse to do this when called upon to do so by a party wholly innocent of any wrong-doing and not in privity with either party to the illegal contract ? Surely the court will not turn from its doors a party entirely guiltless of any wrong, merely because to enforce his right it must declare void and cancel an illegal contract. This is what courts are for; to enforce rights and prevent wrongs. Where both are parties to the contract or in privity with them, neither is in the right. Both are in pari delicto, and there is no right to enforce. Hence no relief will be granted. But there is every reason why this rule should not apply to a case like the present. Here one is seeking to enforce a right, and the other is interposing a wrong to prevent its enforcement, and that, too, her own wrong. She will not be allowed thus to take advantage of her own wrong in a controversy with a party wholly innocent of any wrong-doing. In such a case the court will interfere to prevent the wrong and enforce the right.
Treating the plaintiff as being in a position to attack the deed on this ground, what is the result? Her allegations show that the contract is void because based upon a promise to do an illegal and immoral thing; that the defendant was herself the promisor; that she induced the execution of the deed by threats to discontinue illicit relations with the grantor; and that the deed was executed upon the consideration of the promise to continue these relations in the future. Under these allegations the defendant is to be treated as having, entered into possession of the land without any lawful right whatever. Her deed was wholly void. She was a mere trespasser, and as against such a person recovery may be had upon proof of prior possession alone. We think, therefore, that the court erred in dismissing the petition on demurrer. And this renders unnecessary the determination of the question whether cer-s tain demurrers were properly before the court for consideration. *380The deed under which the defendant claimed was a cloud upon the plaintiff’s title. The deed was not void on its face, but a recovery could be had on the deed upon proof of possession in the grantor for such a length of time as would give him a title by prescription. In other words, if the plaintiff were in possession and relying upon possession alone, the defendant could recover the land from her under the deed upon proof that the grantor had been in possession twenty years when the deed was made. This would render necessary further proof by -the owner to show that the deed was void. Such being the case, the deed was manifestly a cloud, and the court should have ordered it to be delivered up and cancelled. See Thompson v. Etowah Iron Co., 91 Ga. 538; Hanesley v. Bagley, 109 Ga. 346. None of the demurrers which were not met by amendment were well taken, and the court erred in dismissing the petition:
Nothing herein said is to be understood as in any way qualifying or modifying the ruling made in Martin v. White, 115 Ga. 866, to the effect that a conveyance which expresses as a consideration a sum of money, no matter how small, can not be said as matter of law to be a voluntary conveyance or one not based upon a valuable consideration. It is true that the deed from Wilson Watkins to Eliza Nugen expressed as a consideration ten dollars and the interest which the grantor had in the grantee, and that looking only at the face of the deed it is to be treated as having been based upon a valuable consideration. But in this State the consideration of a deed can always be inquired into, and the petition distinctly alleges that the sole consideration for the deed was the illegal agreement above referred to. Considering the petition on demurrer, this allegation must be taken as true. It may be that if the consideration of the deed was really in part valuable and in part the illegal agreement, the deed would still be void. See Civil Code, § 3662. But it is not necessary in the present case to determine this question.
Judgment reversed.
By five Justices.